问题
I want to use UIWebViewDelegate methods. I set its delegate to self but still not working
-(void)webViewDidStartLoad:(UIWebView *)webView {
NSLog(@"Load view");
}
-(void)webViewDidFinishLoad:(UIWebView *)webView {
NSLog(@"Finish View");
}
-(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
NSLog(@"Error in loading: %@", [error description]);
}
回答1:
Do not write anything in viewDidLoad
. Try putting webview related code viewDidAppear
or any custom method. Cross check if your webview is connected properly in storyboard.
来源:https://stackoverflow.com/questions/27646876/uiwebviewdelegate-methods-not-getting-called