您的位置:首页 > 产品设计 > UI/UE

UIActivityViewController iOS8 iPad Crash处理

2015-02-09 10:01 239 查看
在iPhone 上程序一切正常,但独在iPad iOS8的系统上,UIActivityViewController会崩溃,经查阅资料:

On iPad the activity view controller will be displayed as a popover using the newUIPopoverPresentationController,
it requires that you specify an anchor point for the presentation of the popover using one of the three following properties:

barButtonItem

sourceView

sourceRect
In order to specify the anchor point you will need to obtain a reference to the UIActivityController's UIPopoverPresentationController and set one of the properties as follows:activityViewController.popoverPresentationController.sourceView = parentView;
// 或者
activityViewController.popoverPresentationController.barButtonItem = _actionButton;
// 或者SourceRect(不再举例)

资料地址:  http://stackoverflow.com/questions/25644054/uiactivityviewcontroller-crashing-on-ios8-ipads
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息