UIDocumentInteractionController视图不显示

时间:2015-10-05 10:30:09

标签: ios objective-c xcode uiactivityviewcontroller uidocumentinteraction

我正在尝试使用UIDocumentInteractionController与其他应用共享我在应用内创建的pdf。同样的事情是使用UIActivityViewController

为此,我调用- presentOptionsMenuFromRect:inView:animated:方法,该方法返回YES但屏幕上没有显示任何内容。

// 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];
}

任何想法为什么?

0 个答案:

没有答案