Browse Source

Implement layout options

yogevbd 6 years ago
parent
commit
f822fac935

+ 10
- 0
lib/ios/RNNLayoutOptions.h View File

1
+#import "RNNOptions.h"
2
+
3
+@interface RNNLayoutOptions : RNNOptions
4
+
5
+@property (nonatomic, strong) NSNumber* screenBackgroundColor;
6
+@property (nonatomic, strong) id orientation;
7
+
8
+- (UIInterfaceOrientationMask)supportedOrientations;
9
+
10
+@end

+ 40
- 0
lib/ios/RNNLayoutOptions.m View File

1
+#import "RNNLayoutOptions.h"
2
+#import <React/RCTConvert.h>
3
+
4
+@implementation RNNLayoutOptions
5
+
6
+- (void)applyOn:(UIViewController *)viewController {
7
+	if (self.screenBackgroundColor) {
8
+		UIColor* screenColor = [RCTConvert UIColor:self.screenBackgroundColor];
9
+		viewController.view.backgroundColor = screenColor;
10
+	}
11
+}
12
+
13
+- (UIInterfaceOrientationMask)supportedOrientations {
14
+	NSArray* orientationsArray = [self.orientation isKindOfClass:[NSString class]] ? @[self.orientation] : self.orientation;
15
+	NSUInteger supportedOrientationsMask = 0;
16
+	if (!orientationsArray || [self.orientation isEqual:@"default"]) {
17
+		return [[UIApplication sharedApplication] supportedInterfaceOrientationsForWindow:[[UIApplication sharedApplication] keyWindow]];
18
+	} else {
19
+		for (NSString* orientation in orientationsArray) {
20
+			if ([orientation isEqualToString:@"all"]) {
21
+				supportedOrientationsMask = UIInterfaceOrientationMaskAll;
22
+				break;
23
+			}
24
+			if ([orientation isEqualToString:@"landscape"]) {
25
+				supportedOrientationsMask = (supportedOrientationsMask | UIInterfaceOrientationMaskLandscape);
26
+			}
27
+			if ([orientation isEqualToString:@"portrait"]) {
28
+				supportedOrientationsMask = (supportedOrientationsMask | UIInterfaceOrientationMaskPortrait);
29
+			}
30
+			if ([orientation isEqualToString:@"upsideDown"]) {
31
+				supportedOrientationsMask = (supportedOrientationsMask | UIInterfaceOrientationMaskPortraitUpsideDown);
32
+			}
33
+		}
34
+	}
35
+	
36
+	return supportedOrientationsMask;
37
+}
38
+
39
+
40
+@end

+ 2
- 5
lib/ios/RNNNavigationOptions.h View File

9
 #import "RNNAnimationOptions.h"
9
 #import "RNNAnimationOptions.h"
10
 #import "RNNTransitionsOptions.h"
10
 #import "RNNTransitionsOptions.h"
11
 #import "RNNStatusBarOptions.h"
11
 #import "RNNStatusBarOptions.h"
12
+#import "RNNLayoutOptions.h"
12
 
13
 
13
 extern const NSInteger BLUR_TOPBAR_TAG;
14
 extern const NSInteger BLUR_TOPBAR_TAG;
14
 extern const NSInteger TOP_BAR_TRANSPARENT_TAG;
15
 extern const NSInteger TOP_BAR_TRANSPARENT_TAG;
25
 @property (nonatomic, strong) RNNAnimationOptions* customTransition;
26
 @property (nonatomic, strong) RNNAnimationOptions* customTransition;
26
 @property (nonatomic, strong) RNNTransitionsOptions* animations;
27
 @property (nonatomic, strong) RNNTransitionsOptions* animations;
27
 @property (nonatomic, strong) RNNStatusBarOptions* statusBar;
28
 @property (nonatomic, strong) RNNStatusBarOptions* statusBar;
29
+@property (nonatomic, strong) RNNLayoutOptions* layout;
28
 
30
 
29
-
30
-@property (nonatomic, strong) NSNumber* screenBackgroundColor;
31
 @property (nonatomic, strong) NSMutableDictionary* originalTopBarImages;
31
 @property (nonatomic, strong) NSMutableDictionary* originalTopBarImages;
32
 @property (nonatomic, strong) NSString* backButtonTransition;
32
 @property (nonatomic, strong) NSString* backButtonTransition;
33
-@property (nonatomic, strong) id orientation;
34
 @property (nonatomic, strong) NSNumber* popGesture;
33
 @property (nonatomic, strong) NSNumber* popGesture;
35
 @property (nonatomic, strong) NSDictionary* backgroundImage;
34
 @property (nonatomic, strong) NSDictionary* backgroundImage;
36
 @property (nonatomic, strong) NSDictionary* rootBackgroundImage;
35
 @property (nonatomic, strong) NSDictionary* rootBackgroundImage;
37
 @property (nonatomic, strong) NSString* modalPresentationStyle;
36
 @property (nonatomic, strong) NSString* modalPresentationStyle;
38
 @property (nonatomic, strong) NSString* modalTransitionStyle;
37
 @property (nonatomic, strong) NSString* modalTransitionStyle;
39
 
38
 
40
-- (UIInterfaceOrientationMask)supportedOrientations;
41
-
42
 - (void)applyModalOptions:(UIViewController*)viewController;
39
 - (void)applyModalOptions:(UIViewController*)viewController;
43
 
40
 
44
 @end
41
 @end

+ 1
- 31
lib/ios/RNNNavigationOptions.m View File

50
 	[self.sideMenu applyOn:viewController];
50
 	[self.sideMenu applyOn:viewController];
51
 	[self.overlay applyOn:viewController];
51
 	[self.overlay applyOn:viewController];
52
 	[self.statusBar applyOn:viewController];
52
 	[self.statusBar applyOn:viewController];
53
-	
53
+	[self.layout applyOn:viewController];
54
 	[self applyOtherOptionsOn:viewController];
54
 	[self applyOtherOptionsOn:viewController];
55
 	
55
 	
56
 	[viewController optionsUpdated];
56
 	[viewController optionsUpdated];
61
 		viewController.navigationController.interactivePopGestureRecognizer.enabled = [self.popGesture boolValue];
61
 		viewController.navigationController.interactivePopGestureRecognizer.enabled = [self.popGesture boolValue];
62
 	}
62
 	}
63
 	
63
 	
64
-	if (self.screenBackgroundColor) {
65
-		UIColor* screenColor = [RCTConvert UIColor:self.screenBackgroundColor];
66
-		viewController.view.backgroundColor = screenColor;
67
-	}
68
-	
69
 	if (self.backgroundImage) {
64
 	if (self.backgroundImage) {
70
 		UIImageView* backgroundImageView = (viewController.view.subviews.count > 0) ? viewController.view.subviews[0] : nil;
65
 		UIImageView* backgroundImageView = (viewController.view.subviews.count > 0) ? viewController.view.subviews[0] : nil;
71
 		if (![backgroundImageView isKindOfClass:[UIImageView class]]) {
66
 		if (![backgroundImageView isKindOfClass:[UIImageView class]]) {
102
     }
97
     }
103
 }
98
 }
104
 
99
 
105
-- (UIInterfaceOrientationMask)supportedOrientations {
106
-	NSArray* orientationsArray = [self.orientation isKindOfClass:[NSString class]] ? @[self.orientation] : self.orientation;
107
-	NSUInteger supportedOrientationsMask = 0;
108
-	if (!orientationsArray || [self.orientation isEqual:@"default"]) {
109
-		return [[UIApplication sharedApplication] supportedInterfaceOrientationsForWindow:[[UIApplication sharedApplication] keyWindow]];
110
-	} else {
111
-		for (NSString* orientation in orientationsArray) {
112
-			if ([orientation isEqualToString:@"all"]) {
113
-				supportedOrientationsMask = UIInterfaceOrientationMaskAll;
114
-				break;
115
-			}
116
-			if ([orientation isEqualToString:@"landscape"]) {
117
-				supportedOrientationsMask = (supportedOrientationsMask | UIInterfaceOrientationMaskLandscape);
118
-			}
119
-			if ([orientation isEqualToString:@"portrait"]) {
120
-				supportedOrientationsMask = (supportedOrientationsMask | UIInterfaceOrientationMaskPortrait);
121
-			}
122
-			if ([orientation isEqualToString:@"upsideDown"]) {
123
-				supportedOrientationsMask = (supportedOrientationsMask | UIInterfaceOrientationMaskPortraitUpsideDown);
124
-			}
125
-		}
126
-	}
127
-	
128
-	return supportedOrientationsMask;
129
-}
130
 
100
 
131
 @end
101
 @end

+ 2
- 1
lib/ios/RNNRootViewController.m View File

163
 	} else if ([self.options.statusBar.hideWithTopBar boolValue]) {
163
 	} else if ([self.options.statusBar.hideWithTopBar boolValue]) {
164
 		return self.navigationController.isNavigationBarHidden;
164
 		return self.navigationController.isNavigationBarHidden;
165
 	}
165
 	}
166
+
166
 	return NO;
167
 	return NO;
167
 }
168
 }
168
 
169
 
175
 }
176
 }
176
 
177
 
177
 - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
178
 - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
178
-	return self.options.supportedOrientations;
179
+	return self.options.layout.supportedOrientations;
179
 }
180
 }
180
 
181
 
181
 - (BOOL)hidesBottomBarWhenPushed
182
 - (BOOL)hidesBottomBarWhenPushed

+ 8
- 0
lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj View File

73
 		50451D0A2042E20600695F00 /* RNNTransitionsOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50451D082042E20600695F00 /* RNNTransitionsOptions.m */; };
73
 		50451D0A2042E20600695F00 /* RNNTransitionsOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50451D082042E20600695F00 /* RNNTransitionsOptions.m */; };
74
 		50451D0D2042F70900695F00 /* RNNTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = 50451D0B2042F70900695F00 /* RNNTransition.h */; };
74
 		50451D0D2042F70900695F00 /* RNNTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = 50451D0B2042F70900695F00 /* RNNTransition.h */; };
75
 		50451D0E2042F70900695F00 /* RNNTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 50451D0C2042F70900695F00 /* RNNTransition.m */; };
75
 		50451D0E2042F70900695F00 /* RNNTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 50451D0C2042F70900695F00 /* RNNTransition.m */; };
76
+		5048862D20BE976D000908DE /* RNNLayoutOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 5048862B20BE976D000908DE /* RNNLayoutOptions.h */; };
77
+		5048862E20BE976D000908DE /* RNNLayoutOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 5048862C20BE976D000908DE /* RNNLayoutOptions.m */; };
76
 		504AFE641FFE53070076E904 /* RNNOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 504AFE621FFE53070076E904 /* RNNOptions.h */; };
78
 		504AFE641FFE53070076E904 /* RNNOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 504AFE621FFE53070076E904 /* RNNOptions.h */; };
77
 		504AFE651FFE53070076E904 /* RNNOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 504AFE631FFE53070076E904 /* RNNOptions.m */; };
79
 		504AFE651FFE53070076E904 /* RNNOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 504AFE631FFE53070076E904 /* RNNOptions.m */; };
78
 		504AFE741FFFF0540076E904 /* RNNTopTabsOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 504AFE721FFFF0540076E904 /* RNNTopTabsOptions.h */; };
80
 		504AFE741FFFF0540076E904 /* RNNTopTabsOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 504AFE721FFFF0540076E904 /* RNNTopTabsOptions.h */; };
276
 		50451D082042E20600695F00 /* RNNTransitionsOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNTransitionsOptions.m; sourceTree = "<group>"; };
278
 		50451D082042E20600695F00 /* RNNTransitionsOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNTransitionsOptions.m; sourceTree = "<group>"; };
277
 		50451D0B2042F70900695F00 /* RNNTransition.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNTransition.h; sourceTree = "<group>"; };
279
 		50451D0B2042F70900695F00 /* RNNTransition.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNTransition.h; sourceTree = "<group>"; };
278
 		50451D0C2042F70900695F00 /* RNNTransition.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNTransition.m; sourceTree = "<group>"; };
280
 		50451D0C2042F70900695F00 /* RNNTransition.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNTransition.m; sourceTree = "<group>"; };
281
+		5048862B20BE976D000908DE /* RNNLayoutOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNLayoutOptions.h; sourceTree = "<group>"; };
282
+		5048862C20BE976D000908DE /* RNNLayoutOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNLayoutOptions.m; sourceTree = "<group>"; };
279
 		504AFE621FFE53070076E904 /* RNNOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNOptions.h; sourceTree = "<group>"; };
283
 		504AFE621FFE53070076E904 /* RNNOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNOptions.h; sourceTree = "<group>"; };
280
 		504AFE631FFE53070076E904 /* RNNOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNOptions.m; sourceTree = "<group>"; };
284
 		504AFE631FFE53070076E904 /* RNNOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNOptions.m; sourceTree = "<group>"; };
281
 		504AFE721FFFF0540076E904 /* RNNTopTabsOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNTopTabsOptions.h; sourceTree = "<group>"; };
285
 		504AFE721FFFF0540076E904 /* RNNTopTabsOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNTopTabsOptions.h; sourceTree = "<group>"; };
525
 				50570B252061473D006A1B5C /* RNNTitleOptions.m */,
529
 				50570B252061473D006A1B5C /* RNNTitleOptions.m */,
526
 				50C4A494206BDDBB00DB292E /* RNNSubtitleOptions.h */,
530
 				50C4A494206BDDBB00DB292E /* RNNSubtitleOptions.h */,
527
 				50C4A495206BDDBB00DB292E /* RNNSubtitleOptions.m */,
531
 				50C4A495206BDDBB00DB292E /* RNNSubtitleOptions.m */,
532
+				5048862B20BE976D000908DE /* RNNLayoutOptions.h */,
533
+				5048862C20BE976D000908DE /* RNNLayoutOptions.m */,
528
 				50BE951120B5A787004F5DF5 /* RNNStatusBarOptions.h */,
534
 				50BE951120B5A787004F5DF5 /* RNNStatusBarOptions.h */,
529
 				50BE951020B5A787004F5DF5 /* RNNStatusBarOptions.m */,
535
 				50BE951020B5A787004F5DF5 /* RNNStatusBarOptions.m */,
530
 				50EB4ED52068EBE000D6ED34 /* RNNBackgroundOptions.h */,
536
 				50EB4ED52068EBE000D6ED34 /* RNNBackgroundOptions.h */,
816
 				263905B91E4C6F440023D7D3 /* RCCDrawerController.h in Headers */,
822
 				263905B91E4C6F440023D7D3 /* RCCDrawerController.h in Headers */,
817
 				263905B31E4C6F440023D7D3 /* MMDrawerVisualState.h in Headers */,
823
 				263905B31E4C6F440023D7D3 /* MMDrawerVisualState.h in Headers */,
818
 				50451D092042E20600695F00 /* RNNTransitionsOptions.h in Headers */,
824
 				50451D092042E20600695F00 /* RNNTransitionsOptions.h in Headers */,
825
+				5048862D20BE976D000908DE /* RNNLayoutOptions.h in Headers */,
819
 				E8A5CD621F49114F00E89D0D /* RNNElement.h in Headers */,
826
 				E8A5CD621F49114F00E89D0D /* RNNElement.h in Headers */,
820
 				50570B262061473D006A1B5C /* RNNTitleOptions.h in Headers */,
827
 				50570B262061473D006A1B5C /* RNNTitleOptions.h in Headers */,
821
 				504AFE741FFFF0540076E904 /* RNNTopTabsOptions.h in Headers */,
828
 				504AFE741FFFF0540076E904 /* RNNTopTabsOptions.h in Headers */,
946
 				263905B41E4C6F440023D7D3 /* MMDrawerVisualState.m in Sources */,
953
 				263905B41E4C6F440023D7D3 /* MMDrawerVisualState.m in Sources */,
947
 				263905C51E4C6F440023D7D3 /* SidebarFacebookAnimation.m in Sources */,
954
 				263905C51E4C6F440023D7D3 /* SidebarFacebookAnimation.m in Sources */,
948
 				50451D0E2042F70900695F00 /* RNNTransition.m in Sources */,
955
 				50451D0E2042F70900695F00 /* RNNTransition.m in Sources */,
956
+				5048862E20BE976D000908DE /* RNNLayoutOptions.m in Sources */,
949
 				7BEF0D191E437684003E96B0 /* RNNRootViewController.m in Sources */,
957
 				7BEF0D191E437684003E96B0 /* RNNRootViewController.m in Sources */,
950
 				50415CBB20553B8E00BB682E /* RNNScreenTransition.m in Sources */,
958
 				50415CBB20553B8E00BB682E /* RNNScreenTransition.m in Sources */,
951
 				263905C31E4C6F440023D7D3 /* SidebarAnimation.m in Sources */,
959
 				263905C31E4C6F440023D7D3 /* SidebarAnimation.m in Sources */,

+ 9
- 9
lib/ios/ReactNativeNavigationTests/RNNRootViewControllerTest.m View File

131
 
131
 
132
 -(void)testScreenBackgroundColor_validColor{
132
 -(void)testScreenBackgroundColor_validColor{
133
 	NSNumber* inputColor = @(0xFFFF0000);
133
 	NSNumber* inputColor = @(0xFFFF0000);
134
-	self.options.screenBackgroundColor = inputColor;
134
+	self.options.layout.screenBackgroundColor = inputColor;
135
 	[self.uut viewWillAppear:false];
135
 	[self.uut viewWillAppear:false];
136
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
136
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
137
 	XCTAssertTrue([self.uut.view.backgroundColor isEqual:expectedColor]);
137
 	XCTAssertTrue([self.uut.view.backgroundColor isEqual:expectedColor]);
283
 
283
 
284
 -(void)testOrientation_portrait {
284
 -(void)testOrientation_portrait {
285
 	NSArray* supportedOrientations = @[@"portrait"];
285
 	NSArray* supportedOrientations = @[@"portrait"];
286
-	self.options.orientation = supportedOrientations;
286
+	self.options.layout.orientation = supportedOrientations;
287
 	__unused UINavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:self.uut];
287
 	__unused UINavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:self.uut];
288
 	[self.uut viewWillAppear:false];
288
 	[self.uut viewWillAppear:false];
289
 	UIInterfaceOrientationMask expectedOrientation = UIInterfaceOrientationMaskPortrait;
289
 	UIInterfaceOrientationMask expectedOrientation = UIInterfaceOrientationMaskPortrait;
292
 
292
 
293
 -(void)testOrientation_portraitString {
293
 -(void)testOrientation_portraitString {
294
 	NSString* supportedOrientation = @"portrait";
294
 	NSString* supportedOrientation = @"portrait";
295
-	self.options.orientation = supportedOrientation;
295
+	self.options.layout.orientation = supportedOrientation;
296
 	__unused UINavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:self.uut];
296
 	__unused UINavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:self.uut];
297
 	[self.uut viewWillAppear:false];
297
 	[self.uut viewWillAppear:false];
298
 	UIInterfaceOrientationMask expectedOrientation = (UIInterfaceOrientationMaskPortrait);
298
 	UIInterfaceOrientationMask expectedOrientation = (UIInterfaceOrientationMaskPortrait);
301
 
301
 
302
 -(void)testOrientation_portraitAndLandscape {
302
 -(void)testOrientation_portraitAndLandscape {
303
 	NSArray* supportedOrientations = @[@"portrait", @"landscape"];
303
 	NSArray* supportedOrientations = @[@"portrait", @"landscape"];
304
-	self.options.orientation = supportedOrientations;
304
+	self.options.layout.orientation = supportedOrientations;
305
 	__unused UINavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:self.uut];
305
 	__unused UINavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:self.uut];
306
 	[self.uut viewWillAppear:false];
306
 	[self.uut viewWillAppear:false];
307
 	UIInterfaceOrientationMask expectedOrientation = (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscape);
307
 	UIInterfaceOrientationMask expectedOrientation = (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscape);
310
 
310
 
311
 -(void)testOrientation_all {
311
 -(void)testOrientation_all {
312
 	NSArray* supportedOrientations = @[@"all"];
312
 	NSArray* supportedOrientations = @[@"all"];
313
-	self.options.orientation = supportedOrientations;
313
+	self.options.layout.orientation = supportedOrientations;
314
 	__unused UINavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:self.uut];
314
 	__unused UINavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:self.uut];
315
 	[self.uut viewWillAppear:false];
315
 	[self.uut viewWillAppear:false];
316
 	UIInterfaceOrientationMask expectedOrientation = UIInterfaceOrientationMaskAll;
316
 	UIInterfaceOrientationMask expectedOrientation = UIInterfaceOrientationMaskAll;
319
 
319
 
320
 -(void)testOrientation_default {
320
 -(void)testOrientation_default {
321
 	NSString* supportedOrientations = @"default";
321
 	NSString* supportedOrientations = @"default";
322
-	self.options.orientation = supportedOrientations;
322
+	self.options.layout.orientation = supportedOrientations;
323
 	__unused UINavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:self.uut];
323
 	__unused UINavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:self.uut];
324
 	[self.uut viewWillAppear:false];
324
 	[self.uut viewWillAppear:false];
325
 	UIInterfaceOrientationMask expectedOrientation = [[UIApplication sharedApplication] supportedInterfaceOrientationsForWindow:[[UIApplication sharedApplication] keyWindow]];
325
 	UIInterfaceOrientationMask expectedOrientation = [[UIApplication sharedApplication] supportedInterfaceOrientationsForWindow:[[UIApplication sharedApplication] keyWindow]];
329
 
329
 
330
 -(void)testOrientationTabsController_portrait {
330
 -(void)testOrientationTabsController_portrait {
331
 	NSArray* supportedOrientations = @[@"portrait"];
331
 	NSArray* supportedOrientations = @[@"portrait"];
332
-	self.options.orientation = supportedOrientations;
332
+	self.options.layout.orientation = supportedOrientations;
333
 	__unused RNNTabBarController* vc = [[RNNTabBarController alloc] init];
333
 	__unused RNNTabBarController* vc = [[RNNTabBarController alloc] init];
334
 	NSMutableArray* controllers = [NSMutableArray new];
334
 	NSMutableArray* controllers = [NSMutableArray new];
335
 	
335
 	
343
 
343
 
344
 -(void)testOrientationTabsController_portraitAndLandscape {
344
 -(void)testOrientationTabsController_portraitAndLandscape {
345
 	NSArray* supportedOrientations = @[@"portrait", @"landscape"];
345
 	NSArray* supportedOrientations = @[@"portrait", @"landscape"];
346
-	self.options.orientation = supportedOrientations;
346
+	self.options.layout.orientation = supportedOrientations;
347
 	__unused RNNTabBarController* vc = [[RNNTabBarController alloc] init];
347
 	__unused RNNTabBarController* vc = [[RNNTabBarController alloc] init];
348
 	NSMutableArray* controllers = [NSMutableArray new];
348
 	NSMutableArray* controllers = [NSMutableArray new];
349
 	
349
 	
357
 
357
 
358
 -(void)testOrientationTabsController_all {
358
 -(void)testOrientationTabsController_all {
359
 	NSArray* supportedOrientations = @[@"all"];
359
 	NSArray* supportedOrientations = @[@"all"];
360
-	self.options.orientation = supportedOrientations;
360
+	self.options.layout.orientation = supportedOrientations;
361
 	__unused RNNTabBarController* vc = [[RNNTabBarController alloc] init];
361
 	__unused RNNTabBarController* vc = [[RNNTabBarController alloc] init];
362
 	NSMutableArray* controllers = [NSMutableArray new];
362
 	NSMutableArray* controllers = [NSMutableArray new];
363
 	
363