[ios] Only set preferred action on iOS 9+
Fixed a crash on iOS 8 when presenting the Add Offline Pack dialog. Fixes #4305.
This commit is contained in:
committed by
Minh Nguyễn
parent
e04fea8409
commit
6f86bee283
@@ -100,7 +100,9 @@ static NSString * const MBXOfflinePacksTableViewActiveCellReuseIdentifier = @"Ac
|
||||
}];
|
||||
}];
|
||||
[alertController addAction:downloadAction];
|
||||
alertController.preferredAction = downloadAction;
|
||||
if ([alertController respondsToSelector:@selector(setPreferredAction:)]) {
|
||||
alertController.preferredAction = downloadAction;
|
||||
}
|
||||
|
||||
[self presentViewController:alertController animated:YES completion:nil];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user