presentOpenInMenuFromRect未显示

时间:2015-11-19 20:24:14

标签: ios whatsapp uidocumentinteraction

即使canOpen返回true,

presentOpenInMenuFromRect也不会显示。我正在尝试将.mov视频传递给Whats App。我在iPhone 5S上运行iOS 9。我已经尝试了CGRectZero以及其他视图,但我从来没有看过弹出窗口。我正在使用UINavigationController作为我的self.window.rootViewController

有关于这里发生了什么的任何想法?

self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[self urlOfVideoAsset:video]];
self.documentInteractionController.delegate = self;
self.documentInteractionController.UTI = @"net.whatsapp.movie";
self.documentInteractionController.annotation = @"Check out my video on www.channel.wtf";

_applicationWindow = [[UIApplication sharedApplication] keyWindow];
BOOL canOpen = [self.documentInteractionController presentOpenInMenuFromRect:_applicationWindow.bounds inView:_applicationWindow animated:YES];

1 个答案:

答案 0 :(得分:0)

我遇到了这个问题并通过调用presentOptionsMenuFromRect解决了这个问题。