Failed to call UIWebViewDelegate methods

I want to use UIWebViewDelegate methods. I put my delegate on myself, but still did not work

-(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]);
}
+4
source share
1 answer

Do not write anything in viewDidLoad. Try putting webview-related code viewDidAppearor any other method. Recheck if your web view in the storyboard is connected correctly.

+1
source

Source: https://habr.com/ru/post/1568957/


All Articles