| Conforms to | |
| Framework | /System/Library/Frameworks/UIKit.framework |
| Availability | Available in iPhone OS 2.0 and later. |
| Declared in | UIWebView.h |
| Related sample code |
The UIWebViewDelegate protocol defines methods that a delegate of a UIWebView object can optionally implement to intervene when web content is loaded.
Important: Before releasing an instance of UIWebView for which you have set a delegate, you must first set the UIWebView delegate property to nil before disposing of the UIWebView instance. This can be done, for example, in the dealloc method where you dispose of the UIWebView.
– webView:shouldStartLoadWithRequest:navigationType:
– webViewDidStartLoad:
– webViewDidFinishLoad:
– webView:didFailLoadWithError:
Sent if a web view failed to load content.
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
The web view that failed to load content.
The error that occurred during loading.
UIWebView.hSent before a web view begins loading content.
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
The web view that is about to load content.
The content location.
The type of user action that started the load request.
YES if the web view should begin loading content; otherwise, NO .
UIWebView.hSent after a web view finishes loading content.
- (void)webViewDidFinishLoad:(UIWebView *)webView
The web view has finished loading.
– webView:shouldStartLoadWithRequest:navigationType:– webViewDidStartLoad:– webView:didFailLoadWithError:UIWebView.hSent after a web view starts loading content.
- (void)webViewDidStartLoad:(UIWebView *)webView
The web view that has begun loading content.
– webView:shouldStartLoadWithRequest:navigationType:– webViewDidFinishLoad:– webView:didFailLoadWithError:UIWebView.h
Last updated: 2008-10-15