Pārlūkot izejas kodu

Revert "fix overlay options bug"

This reverts commit fc493775eb.
Guy Carmeli 6 gadus atpakaļ
vecāks
revīzija
6c451d3744

+ 2
- 11
lib/ios/RNNOverlayManager.m Parādīt failu

@@ -1,11 +1,9 @@
1 1
 #import "RNNOverlayManager.h"
2 2
 #import "RNNErrorHandler.h"
3
-#import "RNNOverlayWindow.h"
4 3
 
5 4
 @implementation RNNOverlayManager {
6 5
 	NSMutableDictionary* _overlayDict;
7 6
 	RNNStore* _store;
8
-	RNNOverlayWindow *_overlayWindow;
9 7
 }
10 8
 
11 9
 - (instancetype)initWithStore:(RNNStore *)store {
@@ -19,11 +17,7 @@
19 17
 
20 18
 - (void)showOverlay:(RNNRootViewController *)viewController completion:(RNNTransitionCompletionBlock)completion {
21 19
 	[self cacheOverlay:viewController];
22
-	_overlayWindow = [[RNNOverlayWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
23
-	[_overlayWindow setWindowLevel:UIWindowLevelNormal];
24
-	[_overlayWindow setRootViewController:viewController];
25
-	[_overlayWindow makeKeyAndVisible];
26
-	
20
+	[[[UIApplication sharedApplication] keyWindow] addSubview:viewController.view];
27 21
 	completion();
28 22
 }
29 23
 
@@ -44,10 +38,7 @@
44 38
 }
45 39
 
46 40
 - (void)removeCachedOverlay:(RNNRootViewController*)viewController {
47
-	[_overlayWindow setRootViewController:nil];
48
-	[_overlayWindow resignKeyWindow];
49
-	_overlayWindow = nil;
50
-	
41
+	[viewController.view removeFromSuperview];
51 42
 	[_overlayDict removeObjectForKey:viewController.componentId];
52 43
 	[_store removeComponent:viewController.componentId];
53 44
 }

+ 0
- 5
lib/ios/RNNOverlayWindow.h Parādīt failu

@@ -1,5 +0,0 @@
1
-#import <UIKit/UIKit.h>
2
-
3
-@interface RNNOverlayWindow : UIWindow
4
-
5
-@end

+ 0
- 15
lib/ios/RNNOverlayWindow.m Parādīt failu

@@ -1,15 +0,0 @@
1
-#import "RNNOverlayWindow.h"
2
-
3
-@implementation RNNOverlayWindow
4
-
5
-- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
6
-	UIView *hitTestResult = [super hitTest:point withEvent:event];
7
-	
8
-	if ([hitTestResult isKindOfClass:[UIWindow class]]) {
9
-		return nil;
10
-	}
11
-	
12
-	return hitTestResult;
13
-}
14
-
15
-@end

+ 0
- 8
lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj Parādīt failu

@@ -112,8 +112,6 @@
112 112
 		507F44201FFA8A8800D9425B /* RNNRootViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 507F441F1FFA8A8800D9425B /* RNNRootViewProtocol.h */; };
113 113
 		50887C1520ECC5C200D06111 /* RNNButtonOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 50887C1320ECC5C200D06111 /* RNNButtonOptions.h */; };
114 114
 		50887C1620ECC5C200D06111 /* RNNButtonOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50887C1420ECC5C200D06111 /* RNNButtonOptions.m */; };
115
-		50887CA920F26BFE00D06111 /* RNNOverlayWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 50887CA720F26BFD00D06111 /* RNNOverlayWindow.m */; };
116
-		50887CAA20F26BFE00D06111 /* RNNOverlayWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 50887CA820F26BFE00D06111 /* RNNOverlayWindow.h */; };
117 115
 		50A00C37200F84D6000F01A6 /* RNNOverlayOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 50A00C35200F84D6000F01A6 /* RNNOverlayOptions.h */; };
118 116
 		50A00C38200F84D6000F01A6 /* RNNOverlayOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50A00C36200F84D6000F01A6 /* RNNOverlayOptions.m */; };
119 117
 		50BE951220B5A787004F5DF5 /* RNNStatusBarOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50BE951020B5A787004F5DF5 /* RNNStatusBarOptions.m */; };
@@ -334,8 +332,6 @@
334 332
 		507F441F1FFA8A8800D9425B /* RNNRootViewProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNRootViewProtocol.h; sourceTree = "<group>"; };
335 333
 		50887C1320ECC5C200D06111 /* RNNButtonOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNButtonOptions.h; sourceTree = "<group>"; };
336 334
 		50887C1420ECC5C200D06111 /* RNNButtonOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNButtonOptions.m; sourceTree = "<group>"; };
337
-		50887CA720F26BFD00D06111 /* RNNOverlayWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNOverlayWindow.m; sourceTree = "<group>"; };
338
-		50887CA820F26BFE00D06111 /* RNNOverlayWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNOverlayWindow.h; sourceTree = "<group>"; };
339 335
 		50A00C35200F84D6000F01A6 /* RNNOverlayOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNOverlayOptions.h; sourceTree = "<group>"; };
340 336
 		50A00C36200F84D6000F01A6 /* RNNOverlayOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNOverlayOptions.m; sourceTree = "<group>"; };
341 337
 		50BE951020B5A787004F5DF5 /* RNNStatusBarOptions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNStatusBarOptions.m; sourceTree = "<group>"; };
@@ -671,8 +667,6 @@
671 667
 				507F441F1FFA8A8800D9425B /* RNNRootViewProtocol.h */,
672 668
 				E33AC1FF20B5BA0B0090DB8A /* RNNSplitViewController.m */,
673 669
 				E33AC20120B5BA550090DB8A /* RNNSplitViewController.h */,
674
-				50887CA820F26BFE00D06111 /* RNNOverlayWindow.h */,
675
-				50887CA720F26BFD00D06111 /* RNNOverlayWindow.m */,
676 670
 			);
677 671
 			name = Controllers;
678 672
 			sourceTree = "<group>";
@@ -884,7 +878,6 @@
884 878
 				50570B262061473D006A1B5C /* RNNTitleOptions.h in Headers */,
885 879
 				504AFE741FFFF0540076E904 /* RNNTopTabsOptions.h in Headers */,
886 880
 				E8E5182E1F83A48B000467AC /* RNNTransitionStateHolder.h in Headers */,
887
-				50887CAA20F26BFE00D06111 /* RNNOverlayWindow.h in Headers */,
888 881
 				507E7D57201DDD3000444E6C /* RNNAnimationOptions.h in Headers */,
889 882
 				2DCD9195200014A900EDC75D /* RNNBridgeManager.h in Headers */,
890 883
 				7B1126A91E2D2B6C00F9B03B /* RNNControllerFactory.h in Headers */,
@@ -1048,7 +1041,6 @@
1048 1041
 				504AFE651FFE53070076E904 /* RNNOptions.m in Sources */,
1049 1042
 				263905BA1E4C6F440023D7D3 /* RCCDrawerController.m in Sources */,
1050 1043
 				50F5DFC21F407A8C001A00BC /* RNNTabBarController.m in Sources */,
1051
-				50887CA920F26BFE00D06111 /* RNNOverlayWindow.m in Sources */,
1052 1044
 				263905BC1E4C6F440023D7D3 /* RCCDrawerHelper.m in Sources */,
1053 1045
 				4534E72620CB6724009F8185 /* RNNLargeTitleOptions.m in Sources */,
1054 1046
 				507E7D58201DDD3000444E6C /* RNNAnimationOptions.m in Sources */,