ios - Allow preview option for PDF through UIDocumentInteractionController -

hi all,
i'm creating uidocumentinteractioncontroller display .pdf file saved locally in app's document folder. here code:
if (theurlofthefile != nil && [theurlofthefile path] != nil && [[nsfilemanager defaultmanager] fileexistsatpath:filepath]) { uidocumentinteractioncontroller *myinteractioncontroller = [self setupcontrollerwithurl:theurlofthefile usingdelegate:self]; self.custominteractioncontroller = myinteractioncontroller; self.custominteractioncontroller.uti = @"com.adobe.pdf"; self.custominteractioncontroller.delegate = self; #define abf self.actionbutton.frame //spot difference: if (!_interactioncontrollervisible) { bool isvalid = [self.custominteractioncontroller presentopeninmenufromrect:cgrectmake(self.view.frame.size.height-100, 100, 500, 500) inview:self.view animated:yes]; } } else { nslog(@"failed open file. escapedurl: %@",filepath); } i'm not getting preview option, can open in ibooks , works fine. i'd enable print , copy. :(
use presentoptionsmenufromrect:inview:animated: instead of presentopeninmenufromrect:inview:animated:.
the "openin" method shows other apps. "options" method gives of other options.
Comments
Post a Comment