Ver código fonte

Large title options (#3331)

* add addicional options to tabbar

* fix tests
Yogev B 6 anos atrás
pai
commit
725068d5d4
Nenhuma conta vinculada ao e-mail do autor do commit

+ 12
- 2
docs/docs/styling.md Ver arquivo

@@ -10,7 +10,6 @@ export default class StyledScreen extends Component {
10 10
     return {
11 11
       topBar: {
12 12
         title: {
13
-          largeTitle: false,
14 13
           text: 'My Screen'
15 14
         },
16 15
         drawBehind: true,
@@ -81,6 +80,12 @@ Navigation.mergeOptions(this.props.componentId, {
81 80
     component: {
82 81
       name: 'example.CustomTopBar'
83 82
     },
83
+    largeTitle: {
84
+      visible: true,
85
+      fontSize: 30,
86
+      color: 'red',
87
+      fontFamily: 'Helvetica'
88
+    },
84 89
     title: {
85 90
       text: 'Title',
86 91
       fontSize: 14,
@@ -167,11 +172,16 @@ Navigation.mergeOptions(this.props.componentId, {
167 172
     transparent: false,
168 173
     noBorder: false,
169 174
     blur: false,
170
-    largeTitle: false,
171 175
     backButtonImage: require('icon.png'),
172 176
     backButtonHidden: false,
173 177
     backButtonTitle: 'Back',
174 178
     hideBackButtonTitle: false,
179
+    largeTitle: {
180
+      visible: true,
181
+      fontSize: 30,
182
+      color: 'red',
183
+      fontFamily: 'Helvetica'
184
+    },
175 185
   },
176 186
   bottomTabs: {
177 187
     translucent: true,

+ 10
- 0
lib/ios/RNNLargeTitleOptions.h Ver arquivo

@@ -0,0 +1,10 @@
1
+#import "RNNOptions.h"
2
+#import "RNNComponentOptions.h"
3
+
4
+@interface RNNLargeTitleOptions : RNNOptions
5
+
6
+@property (nonatomic, strong) NSNumber* fontSize;
7
+@property (nonatomic, strong) NSNumber* visible;
8
+@property (nonatomic, strong) NSNumber* color;
9
+@property (nonatomic, strong) NSString* fontFamily;
10
+@end

+ 49
- 0
lib/ios/RNNLargeTitleOptions.m Ver arquivo

@@ -0,0 +1,49 @@
1
+#import "RNNLargeTitleOptions.h"
2
+#import "RNNTitleViewHelper.h"
3
+
4
+
5
+@implementation RNNLargeTitleOptions
6
+
7
+- (void)applyOn:(UIViewController *)viewController {
8
+
9
+	if (@available(iOS 11.0, *)) {
10
+		
11
+		viewController.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeNever;
12
+	
13
+		if ([self.visible boolValue]){
14
+			viewController.navigationController.navigationBar.prefersLargeTitles = YES;
15
+			viewController.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeAlways;
16
+		} else {
17
+			viewController.navigationController.navigationBar.prefersLargeTitles = NO;
18
+		}
19
+		
20
+		NSDictionary* fontAttributes = [self fontAttributes];
21
+		viewController.navigationController.navigationBar.largeTitleTextAttributes = fontAttributes;
22
+	}
23
+}
24
+
25
+- (NSDictionary *)fontAttributes {
26
+	NSMutableDictionary* navigationBarTitleTextAttributes = [NSMutableDictionary new];
27
+	if (self.fontFamily || self.fontSize || self.color) {
28
+		if (self.color) {
29
+			navigationBarTitleTextAttributes[NSForegroundColorAttributeName] = [RCTConvert UIColor:self.color];
30
+		}
31
+		if (self.fontFamily){
32
+			if (self.fontSize) {
33
+				navigationBarTitleTextAttributes[NSFontAttributeName] = [UIFont fontWithName:self.fontFamily size:[self.fontSize floatValue]];
34
+			} else {
35
+				navigationBarTitleTextAttributes[NSFontAttributeName] = [UIFont fontWithName:self.fontFamily size:20];
36
+			}
37
+		} else if (self.fontSize) {
38
+			navigationBarTitleTextAttributes[NSFontAttributeName] = [UIFont systemFontOfSize:[self.fontSize floatValue]];
39
+		}
40
+	}
41
+	
42
+	return navigationBarTitleTextAttributes;
43
+}
44
+
45
+- (NSNumber *)fontSize {
46
+	return _fontSize ? _fontSize : nil;
47
+}
48
+
49
+@end

+ 1
- 4
lib/ios/RNNTitleOptions.m Ver arquivo

@@ -12,10 +12,7 @@
12 12
 	NSDictionary* fontAttributes = [self fontAttributes];
13 13
 	
14 14
 	viewController.navigationController.navigationBar.titleTextAttributes = fontAttributes;
15
-	if (@available(iOS 11.0, *)){
16
-		viewController.navigationController.navigationBar.largeTitleTextAttributes = fontAttributes;
17
-	}
18
-	
15
+
19 16
 	if (self.subtitle.text) {
20 17
 		RNNTitleViewHelper* titleViewHelper = [[RNNTitleViewHelper alloc] init:viewController title:self.text subtitle:self.subtitle.text titleImageData:nil isSetSubtitle:NO];
21 18
 		[titleViewHelper setup:self];

+ 2
- 1
lib/ios/RNNTopBarOptions.h Ver arquivo

@@ -1,4 +1,5 @@
1 1
 #import "RNNOptions.h"
2
+#import "RNNLargeTitleOptions.h"
2 3
 #import "RNNTitleOptions.h"
3 4
 #import "RNNSubtitleOptions.h"
4 5
 #import "RNNBackgroundOptions.h"
@@ -17,8 +18,8 @@
17 18
 @property (nonatomic, strong) NSNumber* noBorder;
18 19
 @property (nonatomic, strong) NSNumber* blur;
19 20
 @property (nonatomic, strong) NSNumber* animate;
20
-@property (nonatomic, strong) NSNumber* largeTitle;
21 21
 @property (nonatomic, strong) NSString* testID;
22
+@property (nonatomic, strong) RNNLargeTitleOptions* largeTitle;
22 23
 @property (nonatomic, strong) RNNTitleOptions* title;
23 24
 @property (nonatomic, strong) RNNSubtitleOptions* subtitle;
24 25
 @property (nonatomic, strong) RNNBackgroundOptions* background;

+ 1
- 11
lib/ios/RNNTopBarOptions.m Ver arquivo

@@ -28,20 +28,10 @@ extern const NSInteger BLUR_TOPBAR_TAG;
28 28
 
29 29
 - (void)applyOn:(UIViewController*)viewController {
30 30
 	[self.title applyOn:viewController];
31
+	[self.largeTitle applyOn:viewController];
31 32
 	[self.background applyOn:viewController];
32 33
 	
33 34
 	if (@available(iOS 11.0, *)) {
34
-		if (self.largeTitle){
35
-			if ([self.largeTitle boolValue]) {
36
-				viewController.navigationController.navigationBar.prefersLargeTitles = YES;
37
-				viewController.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeAlways;
38
-			} else {
39
-				viewController.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeNever;
40
-			}
41
-		} else {
42
-			viewController.navigationController.navigationBar.prefersLargeTitles = NO;
43
-			viewController.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeNever;
44
-		}
45 35
 		if ([self.searchBar boolValue] && !viewController.navigationItem.searchController) {
46 36
 			UISearchController *search = [[UISearchController alloc]initWithSearchResultsController:nil];
47 37
 			search.dimsBackgroundDuringPresentation = NO;

+ 8
- 2
lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj Ver arquivo

@@ -61,6 +61,8 @@
61 61
 		2DCD9196200014A900EDC75D /* RNNBridgeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DCD9194200014A900EDC75D /* RNNBridgeManager.m */; };
62 62
 		390AD477200F499D00A8250D /* RNNSwizzles.h in Headers */ = {isa = PBXBuildFile; fileRef = 390AD475200F499D00A8250D /* RNNSwizzles.h */; };
63 63
 		390AD478200F499D00A8250D /* RNNSwizzles.m in Sources */ = {isa = PBXBuildFile; fileRef = 390AD476200F499D00A8250D /* RNNSwizzles.m */; };
64
+		4534E72520CB6724009F8185 /* RNNLargeTitleOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4534E72320CB6724009F8185 /* RNNLargeTitleOptions.h */; };
65
+		4534E72620CB6724009F8185 /* RNNLargeTitleOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4534E72420CB6724009F8185 /* RNNLargeTitleOptions.m */; };
64 66
 		5016E8EF20209690009D4F7C /* RNNCustomTitleView.h in Headers */ = {isa = PBXBuildFile; fileRef = 5016E8ED2020968F009D4F7C /* RNNCustomTitleView.h */; };
65 67
 		5016E8F020209690009D4F7C /* RNNCustomTitleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5016E8EE2020968F009D4F7C /* RNNCustomTitleView.m */; };
66 68
 		50175CD1207A2AA1004FE91B /* RNNComponentOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 50175CCF207A2AA1004FE91B /* RNNComponentOptions.h */; };
@@ -76,7 +78,6 @@
76 78
 		50451D0E2042F70900695F00 /* RNNTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 50451D0C2042F70900695F00 /* RNNTransition.m */; };
77 79
 		5048862D20BE976D000908DE /* RNNLayoutOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 5048862B20BE976D000908DE /* RNNLayoutOptions.h */; };
78 80
 		5048862E20BE976D000908DE /* RNNLayoutOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 5048862C20BE976D000908DE /* RNNLayoutOptions.m */; };
79
-		504AFE641FFE53070076E904 /* RNNOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 504AFE621FFE53070076E904 /* RNNOptions.h */; };
80 81
 		504AFE651FFE53070076E904 /* RNNOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 504AFE631FFE53070076E904 /* RNNOptions.m */; };
81 82
 		504AFE741FFFF0540076E904 /* RNNTopTabsOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 504AFE721FFFF0540076E904 /* RNNTopTabsOptions.h */; };
82 83
 		504AFE751FFFF0540076E904 /* RNNTopTabsOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 504AFE731FFFF0540076E904 /* RNNTopTabsOptions.m */; };
@@ -267,6 +268,8 @@
267 268
 		2DCD9194200014A900EDC75D /* RNNBridgeManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNBridgeManager.m; sourceTree = "<group>"; };
268 269
 		390AD475200F499D00A8250D /* RNNSwizzles.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNSwizzles.h; sourceTree = "<group>"; };
269 270
 		390AD476200F499D00A8250D /* RNNSwizzles.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNSwizzles.m; sourceTree = "<group>"; };
271
+		4534E72320CB6724009F8185 /* RNNLargeTitleOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNLargeTitleOptions.h; sourceTree = "<group>"; };
272
+		4534E72420CB6724009F8185 /* RNNLargeTitleOptions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNLargeTitleOptions.m; sourceTree = "<group>"; };
270 273
 		5016E8ED2020968F009D4F7C /* RNNCustomTitleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNCustomTitleView.h; sourceTree = "<group>"; };
271 274
 		5016E8EE2020968F009D4F7C /* RNNCustomTitleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNCustomTitleView.m; sourceTree = "<group>"; };
272 275
 		50175CCF207A2AA1004FE91B /* RNNComponentOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNComponentOptions.h; sourceTree = "<group>"; };
@@ -519,6 +522,8 @@
519 522
 		504AFE611FFE52EF0076E904 /* Options */ = {
520 523
 			isa = PBXGroup;
521 524
 			children = (
525
+				4534E72320CB6724009F8185 /* RNNLargeTitleOptions.h */,
526
+				4534E72420CB6724009F8185 /* RNNLargeTitleOptions.m */,
522 527
 				E33AC20220B5C3880090DB8A /* RNNStatusBarOptions.h */,
523 528
 				E33AC20320B5C3890090DB8A /* RNNStatusBarOptions.m */,
524 529
 				504AFE621FFE53070076E904 /* RNNOptions.h */,
@@ -822,10 +827,10 @@
822 827
 				507F44201FFA8A8800D9425B /* RNNRootViewProtocol.h in Headers */,
823 828
 				50570BEA2063E09B006A1B5C /* RNNTitleViewHelper.h in Headers */,
824 829
 				263905CA1E4C6F440023D7D3 /* SidebarLuvocracyAnimation.h in Headers */,
830
+				4534E72520CB6724009F8185 /* RNNLargeTitleOptions.h in Headers */,
825 831
 				50762D08205E96C200E3D18A /* RNNModalAnimation.h in Headers */,
826 832
 				390AD477200F499D00A8250D /* RNNSwizzles.h in Headers */,
827 833
 				263905B11E4C6F440023D7D3 /* MMDrawerController.h in Headers */,
828
-				504AFE641FFE53070076E904 /* RNNOptions.h in Headers */,
829 834
 				263905B91E4C6F440023D7D3 /* RCCDrawerController.h in Headers */,
830 835
 				263905B31E4C6F440023D7D3 /* MMDrawerVisualState.h in Headers */,
831 836
 				502CB43A20CBCA180019B2FE /* RNNBridgeManagerDelegate.h in Headers */,
@@ -996,6 +1001,7 @@
996 1001
 				263905BA1E4C6F440023D7D3 /* RCCDrawerController.m in Sources */,
997 1002
 				50F5DFC21F407A8C001A00BC /* RNNTabBarController.m in Sources */,
998 1003
 				263905BC1E4C6F440023D7D3 /* RCCDrawerHelper.m in Sources */,
1004
+				4534E72620CB6724009F8185 /* RNNLargeTitleOptions.m in Sources */,
999 1005
 				507E7D58201DDD3000444E6C /* RNNAnimationOptions.m in Sources */,
1000 1006
 				2145452A1F4DC85F006E8DA1 /* RCTHelpers.m in Sources */,
1001 1007
 				2DCD9196200014A900EDC75D /* RNNBridgeManager.m in Sources */,

+ 72
- 20
lib/ios/ReactNativeNavigationTests/RNNRootViewControllerTest.m Ver arquivo

@@ -225,6 +225,78 @@
225 225
 	
226 226
 }
227 227
 
228
+
229
+-(void)testTopBarLargeTitle_default {
230
+	__unused UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:self.uut];
231
+	[self.uut viewWillAppear:false];
232
+	
233
+	XCTAssertEqual(self.uut.navigationItem.largeTitleDisplayMode,  UINavigationItemLargeTitleDisplayModeNever);
234
+}
235
+-(void)testTopBarLargeTitle_true {
236
+	self.options.topBar.largeTitle.visible = @(1);
237
+	__unused UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:self.uut];
238
+	[self.uut viewWillAppear:false];
239
+	
240
+	XCTAssertEqual(self.uut.navigationItem.largeTitleDisplayMode, UINavigationItemLargeTitleDisplayModeAlways);
241
+}
242
+-(void)testTopBarLargeTitle_false {
243
+	self.options.topBar.largeTitle.visible  = @(0);
244
+	__unused UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:self.uut];
245
+	[self.uut viewWillAppear:false];
246
+	
247
+	XCTAssertEqual(self.uut.navigationItem.largeTitleDisplayMode, UINavigationItemLargeTitleDisplayModeNever);
248
+}
249
+
250
+
251
+-(void)testTopBarLargeTitleFontSize_withoutTextFontFamily_withoutTextColor {
252
+	NSNumber* topBarTextFontSizeInput = @(15);
253
+	self.options.topBar.largeTitle.fontSize = topBarTextFontSizeInput;
254
+	__unused RNNNavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:self.uut];
255
+	[self.uut viewWillAppear:false];
256
+	UIFont* expectedFont = [UIFont systemFontOfSize:15];
257
+	XCTAssertTrue([self.uut.navigationController.navigationBar.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
258
+}
259
+
260
+-(void)testTopBarLargeTitleFontSize_withoutTextFontFamily_withTextColor {
261
+	NSNumber* topBarTextFontSizeInput = @(15);
262
+	NSNumber* inputColor = @(0xFFFF0000);
263
+	self.options.topBar.largeTitle.fontSize = topBarTextFontSizeInput;
264
+	self.options.topBar.largeTitle.color = inputColor;
265
+	__unused RNNNavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:self.uut];
266
+	[self.uut viewWillAppear:false];
267
+	UIFont* expectedFont = [UIFont systemFontOfSize:15];
268
+	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
269
+	XCTAssertTrue([self.uut.navigationController.navigationBar.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
270
+	XCTAssertTrue([self.uut.navigationController.navigationBar.largeTitleTextAttributes[@"NSColor"] isEqual:expectedColor]);
271
+}
272
+
273
+-(void)testTopBarLargeTitleFontSize_withTextFontFamily_withTextColor {
274
+	NSNumber* topBarTextFontSizeInput = @(15);
275
+	NSNumber* inputColor = @(0xFFFF0000);
276
+	NSString* inputFont = @"HelveticaNeue";
277
+	self.options.topBar.largeTitle.fontSize = topBarTextFontSizeInput;
278
+	self.options.topBar.largeTitle.color = inputColor;
279
+	self.options.topBar.largeTitle.fontFamily = inputFont;
280
+	__unused RNNNavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:self.uut];
281
+	[self.uut viewWillAppear:false];
282
+	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
283
+	UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
284
+	XCTAssertTrue([self.uut.navigationController.navigationBar.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
285
+	XCTAssertTrue([self.uut.navigationController.navigationBar.largeTitleTextAttributes[@"NSColor"] isEqual:expectedColor]);
286
+}
287
+
288
+-(void)testTopBarLargeTitleFontSize_withTextFontFamily_withoutTextColor {
289
+	NSNumber* topBarTextFontSizeInput = @(15);
290
+	NSString* inputFont = @"HelveticaNeue";
291
+	self.options.topBar.largeTitle.fontSize = topBarTextFontSizeInput;
292
+	self.options.topBar.largeTitle.fontFamily = inputFont;
293
+	__unused RNNNavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:self.uut];
294
+	[self.uut viewWillAppear:false];
295
+	UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
296
+	XCTAssertTrue([self.uut.navigationController.navigationBar.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
297
+}
298
+
299
+
228 300
 -(void)testTopBarTextFontSize_withoutTextFontFamily_withoutTextColor {
229 301
 	NSNumber* topBarTextFontSizeInput = @(15);
230 302
 	self.options.topBar.title.fontSize = topBarTextFontSizeInput;
@@ -492,26 +564,6 @@
492 564
 	XCTAssertNil([self.uut.navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]);
493 565
 }
494 566
 
495
--(void)testTopBarLargeTitle_default {
496
-	__unused UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:self.uut];
497
-	[self.uut viewWillAppear:false];
498
-	
499
-	XCTAssertEqual(self.uut.navigationItem.largeTitleDisplayMode,  UINavigationItemLargeTitleDisplayModeNever);
500
-}
501
--(void)testTopBarLargeTitle_true {
502
-	self.options.topBar.largeTitle = @(1);
503
-	__unused UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:self.uut];
504
-	[self.uut viewWillAppear:false];
505
-	
506
-	XCTAssertEqual(self.uut.navigationItem.largeTitleDisplayMode, UINavigationItemLargeTitleDisplayModeAlways);
507
-}
508
--(void)testTopBarLargeTitle_false {
509
-	self.options.topBar.largeTitle  = @(0);
510
-	__unused UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:self.uut];
511
-	[self.uut viewWillAppear:false];
512
-	
513
-	XCTAssertEqual(self.uut.navigationItem.largeTitleDisplayMode, UINavigationItemLargeTitleDisplayModeNever);
514
-}
515 567
 -(void)testTopBarBlur_false {
516 568
 	NSNumber* topBarBlurInput = @(0);
517 569
 	self.options.topBar.blur = topBarBlurInput;

+ 3
- 1
playground/src/screens/CustomTransitionDestination.js Ver arquivo

@@ -18,7 +18,9 @@ class CustomTransitionDestination extends Component {
18 18
           text: 'ye babyyyyyy',
19 19
           fontFamily: 'HelveticaNeue-Italic'
20 20
         },
21
-        largeTitle: false
21
+        largeTitle: {
22
+          visible: false
23
+        }      
22 24
       }
23 25
     };
24 26
   }

+ 3
- 1
playground/src/screens/CustomTransitionOrigin.js Ver arquivo

@@ -15,7 +15,9 @@ class CustomTransitionOrigin extends Component {
15 15
           fontFamily: 'HelveticaNeue-Italic',
16 16
           fontSize: 16
17 17
         },
18
-        largeTitle: false,
18
+        largeTitle: {
19
+          visible: false
20
+        },
19 21
         translucent: true
20 22
       }
21 23
     };

+ 7
- 3
playground/src/screens/OptionsScreen.js Ver arquivo

@@ -28,8 +28,10 @@ class OptionsScreen extends Component {
28 28
           color: 'black',
29 29
           fontSize: 16,
30 30
           alignment: 'center',
31
-          fontFamily: 'HelveticaNeue-Italic',
32
-          largeTitle: false
31
+          fontFamily: 'HelveticaNeue-Italic'
32
+        },
33
+        largeTitle: {
34
+          visible: false
33 35
         },
34 36
         subtitle: {
35 37
           text: 'Static Subtitle',
@@ -179,9 +181,11 @@ class OptionsScreen extends Component {
179 181
         title: {
180 182
           text: 'Dynamic Title',
181 183
           color: '#00FFFF',
182
-          largeTitle: false,
183 184
           fontSize: 20,
184 185
           fontFamily: 'HelveticaNeue-CondensedBold'
186
+        },
187
+        largeTitle: {
188
+          visible: false
185 189
         }
186 190
       }
187 191
     });

+ 3
- 1
playground/src/screens/SearchScreen.js Ver arquivo

@@ -22,7 +22,9 @@ class SearchControllerScreen extends Component {
22 22
         title: {
23 23
           text: 'Search'
24 24
         },
25
-        largeTitle: true,
25
+        largeTitle: {
26
+          visible: true
27
+        },
26 28
         searchBar: true,
27 29
         searchBarHiddenWhenScrolling: true,
28 30
         translucent: true,

+ 3
- 1
playground/src/screens/TopTabOptionsScreen.js Ver arquivo

@@ -41,7 +41,9 @@ class TopTabOptionsScreen extends PureComponent {
41 41
           fontSize: 16,
42 42
           fontFamily: 'HelveticaNeue-CondensedBold'
43 43
         },
44
-        largeTitle: false,
44
+        largeTitle: {
45
+          visible: false,
46
+        },
45 47
         buttonColor: 'red',
46 48
       }
47 49
     });

+ 3
- 1
playground/src/screens/WelcomeScreen.js Ver arquivo

@@ -17,9 +17,11 @@ class WelcomeScreen extends Component {
17 17
       },
18 18
       topBar: {
19 19
         title: {
20
-          largeTitle: false,
21 20
           title: 'My Screen'
22 21
         },
22
+        largeTitle: {
23
+          visible: false,
24
+        },
23 25
         drawBehind: true,
24 26
         visible: false,
25 27
         animate: false