Swift iOS demo crash showing alert
Closed this issue · 2 comments
pepone commented
Terminating app due to uncaught exception 'NSGenericException', reason: 'Your application has presented
a UIAlertController (<UIAlertController: 0x12f014600>) of style UIAlertControllerStyleActionSheet from
UINavigationController (<UINavigationController: 0x12a816e00>). The modalPresentationStyle of a UIAlertController
with this style is UIModalPresentationPopover. You must provide location information for this popover through the
alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem.
If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate
method -prepareForPopoverPresentation.'
pepone commented
This only happens with the iPad, works fine with iPhone
Seems that on iPad we need to set popoverPresentationController