I have implemented UIDocumentInteractionController in my app for showing open in options. It's working fine on iOS8 devices, but in iOS7 when I open my PDF in the mail from options. It opens mail composer when I dismiss the mail composer it also removes a menu button from my view (which is added to the window). I spent my whole day struggling with this issue but could not find any solution. When I open my PDF in other options, there is no issue. The issue is only with mail composer with iOS7. I know UIDocumentInterfaceController has issue with iOS7. I found the same issue on SO but this is with preview option of a quick look.
Here is my code to open options
[self.docInteractionController presentOptionsMenuFromRect:self.view.frame inView:self.view animated:YES];
Any help on this will be appreciated.
Thanks in advance.
- (IBAction)previewDocument:(id)sender { NSURL *URL = [[NSBundle mainBundle] URLForResource:@"sample" withExtension:@"pdf"]; if (URL) { // Initialize Document Interaction Controller self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:URL]; // Configure Document Interaction Controller [self.documentInteractionController setDelegate:self]; // Preview PDF [self.documentInteractionController presentPreviewAnimated:YES]; } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With