Key Concepts: UIWebView/Delegation
UIWebView is a powerful and simple to use UIKit user interface element.
- handles displaying web content
- retrieves content asynchronously
- deals in NSURLRequest objects, not just strings
- uses delegation to offload specific tasks it does not know how to deal with
Using components (like UIActivityIndicator) is good UX. You always want to let the user know that something is going on and that the application is not stuck or crashing. Since UIWebView handles content loading asynchronously, it’s very important to pay attention to the user and the overall user experience.
Delegation is a very heavily used pattern by Apple. Many classes rely on delegate objects to supplement functionality or hand off functional responsibility. UIWebView and UITextField are just two of Apple's classes that use the delegation software pattern.