iOS UIWebView webViewDidFinishLoad is not called sometimes -
everything works fine, uiwebview did not finish load. guess uiwebview waits long response , not finish load. had have familiar issue?
yes, have implemented next methods:
- (void)webviewdidstartload:(uiwebview *)webview - (void)webview:(uiwebview *)webview didfailloadwitherror:(nserror *)error - (void)webviewdidfinishload:(uiwebview *)webview
yes, setup delegate. said - works fine, not finish load, not receives error.
- (void)mytimer:(nstimer *)timer { nslog(@"wv=%@ delegate=%@ isloading=%d", self.webview, self.webview.delegate, self.webview.isloading); }
it prints time:
[378:c07] wv=uiwebview: 0x755f690; frame = (0 0; 320 416); autoresize = w+h; layer = calayer: 0x755f6f0>> delegate=mainviewcontroller: 0x755b130> isloading=1;
i tried setup cache policy , disable it. didn't help. can problem html frame? when loading elements webpage disappear (it happens when webpage loaded, after elements disappeared shows new page, in case not).
did implement didfailloadwitherror:
? implement delegate methods, , log various ones, , see happens - if stalls or happens before appears stall.
edit: use schedule nstimer fires every few seconds, , log following:
- the webview object
- the delegate
- the webview
loading
property
here ist code:
- (void)mytimer:(nstimer *)timer { nslog(@"wv=%@ delegate=%@ isloading=%d", self.webview, self.webview.delegate, self.webview.isloading); }
let run @ least 10 minutes (go out , coffee), report here. if prints out info long time (like 10 min), if can post url here big help, others can try duplicate problem.
Comments
Post a Comment