ios - How to wait until webViewDidFinishLoad is called? -
i'm creating ios app. i separated pdf has multi page each pages, and create uiwebviews show each pages. the code this. for( int = 0; < _pagenumbers; i++) { _webview = [[uiwebview alloc]init]; _webview.delegate = self; _webview.frame = imageviewframe; _webview.scalespagetofit = yes; _webview.autoresizingmask = uiviewautoresizingflexibleleftmargin | uiviewautoresizingflexiblewidth | uiviewautoresizingflexiblerightmargin | uiviewautoresizingflexibletopmargin | uiviewautoresizingflexibleheight | uiviewautoresizingflexiblebottommargin; [self setimageatindex:i toscrollview:imagescrollview]; } - (void)setimageatindex:(nsinteger)index toscrollview:(imagescrollview*)scrollview { uiwebview *thewebview = (scrollview.subviews)[0]; if (index < 0 || [webviews count] <= index) { thewebview = nil; return; } dispatch_queue_t queueloadpdf = dispatch_get_global_queue(dispatch_queue_p...