瀏覽代碼

fixes e2e

yogevbd 6 年之前
父節點
當前提交
59da2dbe03
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11
    0
      lib/ios/RNNOverlayManager.m

+ 11
- 0
lib/ios/RNNOverlayManager.m 查看文件

@@ -30,9 +30,20 @@
30 30
 	[overlayWindow setHidden:YES];
31 31
 	[overlayWindow setRootViewController:nil];
32 32
 	[overlayWindow resignKeyWindow];
33
+	[self assignKeyWindow];
33 34
 	[_overlayWindows removeObject:overlayWindow];
34 35
 }
35 36
 
37
+- (void)assignKeyWindow {
38
+	NSArray* windows = [[[UIApplication sharedApplication].windows reverseObjectEnumerator] allObjects];
39
+	for (UIWindow* window in windows) {
40
+		if (window.rootViewController) {
41
+			[window makeKeyAndVisible];
42
+			return;
43
+		}
44
+	}
45
+}
46
+
36 47
 - (UIWindow *)findWindowByRootViewController:(UIViewController *)viewController {
37 48
 	for (UIWindow* window in _overlayWindows) {
38 49
 		if ([window.rootViewController isEqual:viewController]) {