yogevbd 6 lat temu
rodzic
commit
59da2dbe03
1 zmienionych plików z 11 dodań i 0 usunięć
  1. 11
    0
      lib/ios/RNNOverlayManager.m

+ 11
- 0
lib/ios/RNNOverlayManager.m Wyświetl plik

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