prevent crashes when ipads attempt to show an actionsheet without a source rect
This commit is contained in:
parent
0bef0c5b64
commit
13fd2015e5
@ -83,6 +83,11 @@
|
||||
[self removeAllAlertViews];
|
||||
}
|
||||
|
||||
if (alertStyle == UIAlertControllerStyleActionSheet && UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPhone) {
|
||||
// ActionSheets are not supported on iPad interfaces without a source rect (i.e. a source element) which isn't currently supported for our generic handling.
|
||||
alertStyle = UIAlertControllerStyleAlert;
|
||||
}
|
||||
|
||||
// Create the alert. Adds the actions one by one.
|
||||
MVMCoreAlertController *alertController = [MVMCoreAlertController alertControllerWithTitle:(title ?: @"") message:message preferredStyle:alertStyle];
|
||||
for (NSUInteger i = 0; i < [actions count]; i++) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user