Merge branch 'hotfix/ipad_action_sheet_handling' into 'release/10_4_1'

prevent crashes when ipads attempt to show an actionsheet without a source rect

### Summary
Fix iPad actionSheet handling crash.

### JIRA Ticket
(ticket URL here or remove the section)

See merge request https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui/-/merge_requests/910
This commit is contained in:
Hedden, Kyle Matthew 2022-11-10 15:15:18 +00:00
commit ddf973d9f6

View File

@ -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++) {