UIwebview open document (pdf) in other app -


hello everyone, trying open pdf file in uiwebview other app. can display popup this.

screen http://i33.tinypic.com/axv1i.jpg

i write code this. put delegate also. uidocumentinteractioncontrollerdelegate

-(void)webviewdidfinishload:(uiwebview *)webview {   //other code  if([filetype isequaltostring:@"pdf"])  {      nslog(@"it pdf file.");      //other code save nsdocumentdirectory , path      // file://localhost/var/mobile/applications/024d40ff-4518-4526-beab-   2a0679fd6308/documents/iphone_user_guide.pdf            nsurl *pdfurl = [nsurl fileurlwithpath:pathtodownloadto];          uidocumentinteractioncontroller *doccontroller = [uidocumentinteractioncontroller interactioncontrollerwithurl:pdfurl];           [doccontroller setdelegate:self];           [doccontroller presentopeninmenufromrect:cgrectzero inview:self.view animated:yes];   } }  - (uiviewcontroller *) documentinteractioncontrollerviewcontrollerforpreview: (uidocumentinteractioncontroller *) controller {     return self; } 

i got error. void senddelegatemessage(nsinvocation *): delegate (webview:didfinishloadforframe:) failed return after waiting 10 seconds. main run loop mode: kcfrunloopdefaultmode

in link, due javascript. need use this. stringbyevaluatingjavascriptfromstring

but have disabled function , tested. then, there no error app crashes.

i know if there left transfer document. also, know how add uibarbutton "open in ibook or sth" in uiwebview programmatically code in safari when open pdf file.

with regards,


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -