objective c - iOS UIWebView PDF Not Showing First Time -


i have uiviewcontroller uiwebview i'm placing pdf.

the issue i'm facing when click on table cell show pdf not show first time if go table , click on cell again appears.

i call pdf loaded using following:

if ([indexpath row] == 2) {         nsstring *path = [[nsbundle mainbundle] pathforresource:@"myfirstpdf" oftype:@"pdf"];         nsurl *url = [nsurl fileurlwithpath:path];         nsurlrequest *request = [nsurlrequest requestwithurl:url];         [webviewvc.webview loadrequest:request];         webviewvc.parent = _parent;         [_parent pushviewcontroller:webviewvc];  } 

the webviewvc allocate using initwithnib has uiwebview - nothing fancy there, uiwebview iboutlet.

any ideas?

i think should try 2 things:

(1) first, try loading pdf web view controller. standard way this, rather doing load request web view not on screen yet. outlets guaranteed loaded in viewdidload of controller.

(2) second, try making use of uiwebviewdelegate. example, call setneedsdisplay on web view once loading finished.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -