I am trying to share a pdf, that I create within the app, with other apps using UIDocumentInteractionController
. The same thing was working with UIActivityViewController
.
To do that I call - presentOptionsMenuFromRect:inView:animated:
method which returns YES
but nothing shows up on the screen.
// view is a UIWindow
- (void)openDocumentFromRect:(UIView*)view withURL:(NSURL*)url {
UIDocumentInteractionController *documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:url];
// the following returns YES
[documentInteractionController presentOptionsMenuFromRect:[view frame] inView:view animated:YES];
}
Any ideas why ?