mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 20:25:33 +08:00
Fixed display of alerts on top of modal window
Reviewed By: javache Differential Revision: D2616170 fb-gh-sync-id: f72f728008099fff6fc966d7a2ce4c0d27a4fefd
This commit is contained in:
committed by
facebook-github-bot-5
parent
0da2004e88
commit
11df4cb08c
@@ -60,8 +60,7 @@ RCT_EXPORT_METHOD(openCameraDialog:(NSDictionary *)config
|
||||
return;
|
||||
}
|
||||
|
||||
UIWindow *keyWindow = RCTSharedApplication().keyWindow;
|
||||
UIViewController *rootViewController = keyWindow.rootViewController;
|
||||
UIViewController *rootViewController = RCTKeyWindow().rootViewController;
|
||||
|
||||
UIImagePickerController *imagePicker = [UIImagePickerController new];
|
||||
imagePicker.delegate = self;
|
||||
@@ -87,8 +86,7 @@ RCT_EXPORT_METHOD(openSelectDialog:(NSDictionary *)config
|
||||
return;
|
||||
}
|
||||
|
||||
UIWindow *keyWindow = RCTSharedApplication().keyWindow;
|
||||
UIViewController *rootViewController = keyWindow.rootViewController;
|
||||
UIViewController *rootViewController = RCTKeyWindow().rootViewController;
|
||||
|
||||
UIImagePickerController *imagePicker = [UIImagePickerController new];
|
||||
imagePicker.delegate = self;
|
||||
@@ -121,8 +119,7 @@ didFinishPickingMediaWithInfo:(NSDictionary *)info
|
||||
[_pickerCallbacks removeObjectAtIndex:index];
|
||||
[_pickerCancelCallbacks removeObjectAtIndex:index];
|
||||
|
||||
UIWindow *keyWindow = RCTSharedApplication().keyWindow;
|
||||
UIViewController *rootViewController = keyWindow.rootViewController;
|
||||
UIViewController *rootViewController = RCTKeyWindow().rootViewController;
|
||||
[rootViewController dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
callback(@[[info[UIImagePickerControllerReferenceURL] absoluteString]]);
|
||||
@@ -137,8 +134,7 @@ didFinishPickingMediaWithInfo:(NSDictionary *)info
|
||||
[_pickerCallbacks removeObjectAtIndex:index];
|
||||
[_pickerCancelCallbacks removeObjectAtIndex:index];
|
||||
|
||||
UIWindow *keyWindow = RCTSharedApplication().keyWindow;
|
||||
UIViewController *rootViewController = keyWindow.rootViewController;
|
||||
UIViewController *rootViewController = RCTKeyWindow().rootViewController;
|
||||
[rootViewController dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
callback(@[]);
|
||||
|
||||
Reference in New Issue
Block a user