mirror of
https://github.com/status-im/react-native.git
synced 2025-02-05 06:04:15 +00:00
Fix showing alerts when modals are presented
Reviewed By: nicklockwood Differential Revision: D2638505 fb-gh-sync-id: ebecc82baa46be4302fc8d3231f859de572eda10
This commit is contained in:
parent
5931089677
commit
51a5b60a1a
@ -95,6 +95,12 @@ RCT_EXPORT_METHOD(alertWithArgs:(NSDictionary *)args
|
||||
return;
|
||||
}
|
||||
|
||||
// Walk the chain up to get the topmost modal view controller. If modals are presented,
|
||||
// the root view controller's view might not be in the window hierarchy, and presenting from it will fail.
|
||||
while (presentingController.presentedViewController) {
|
||||
presentingController = presentingController.presentedViewController;
|
||||
}
|
||||
|
||||
#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_8_0
|
||||
|
||||
if ([UIAlertController class] == nil) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user