LaunchServices:invalidationHandler被调用 - iOS 8共享表 [英] LaunchServices: invalidationHandler called - iOS 8 share sheet
问题描述
在我使用 SLComposeViewController
打开Twitter或Facebook共享表时,在日志中看到此错误消息,尽管不一致。我没有使用任何新的iOS 8 API,只测试iOS 8上的现有代码。我看到其他人遇到了这个问题,甚至在使用Cocoa Touch SDK中的其他模态视图控制器时也发生了崩溃。
Seeing this error message in the logs, though not consistently, around the time that I use SLComposeViewController
to open a Twitter or Facebook share sheet. I am not using any new iOS 8 API, just testing existing code on iOS 8. I see others have had this problem and even seen crashes when using other modal view controllers from the Cocoa Touch SDK.
LaunchServices:invalidationHandler名为
LaunchServices: invalidationHandler called
<$ c是否有新的预防措施iOS 8中的$ c> SLComposeViewController 和 UIActivityViewController
?还需要考虑其他事项吗?
Are there new precautions to take with SLComposeViewController
and UIActivityViewController
in iOS 8? Something else to consider?
推荐答案
在您展示活动视图控制器后添加此代码:
Add this code after you present your activity view controller:
if ([activityVC respondsToSelector:@selector(popoverPresentationController)])
{
// iOS 8+
UIPopoverPresentationController *presentationController = [activityVC popoverPresentationController];
presentationController.sourceView = sender; // if button or change to self.view.
}
这篇关于LaunchServices:invalidationHandler被调用 - iOS 8共享表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!