Hi all,
I'm creating a UIDocumentInteractionController to display a .pdf file which is saved locally in my app's document folder. Here is the 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 THE 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 to open file. EscapedURL: %@",filePath);
}
I'm not getting the preview option, but I can open it up in iBooks and it works just fine. I'd like to enable print and copy. :(