I'm using the following code attached to a button, to attempt to open a PDF file in iBooks, but nothing's happening when I click the button. The method's definitely being called.
- (IBAction)openDocs
{
NSURL *url = [NSURL fileURLWithPath:@"MS.pdf"];
UIDocumentInteractionController *docController = [[UIDocumentInteractionController alloc] init];
docController = [UIDocumentInteractionController interactionControllerWithURL:url];
docController.delegate = self;
BOOL isValid = [docController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES];
}
I've declared the class itself as the relevant delegate, and since the documentation says there are no required delegate methods, that's all I've done. Nothing's happening when I tap the button, and I'm trying to figure out what I'm missing – any help is greatly appreciated!