Runtime Exception coming when show UIAlertController(actionsheet) iOS8

后端 未结 1 1431
误落风尘
误落风尘 2021-01-15 03:55

Runtime exception is coming when i show UIAlertController(ActionSheet) in iOS8 Beta5+ Xcode6.

This Bug is only happening in

相关标签:
1条回答
  • 2021-01-15 04:39

    On iPad the alert will be displayed as a popover using the new UIPopoverPresentationController, 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 UIAlertController's UIPopoverPresentationController and set one of the properties as follows:

    alertController.popoverPresentationController.sourceView = parentView;
    
    0 讨论(0)
提交回复
热议问题