Browse Source

topBar subtitle options ios

yogevbd 6 years ago
parent
commit
f441db3fc7

lib/ios/RNNBackgrounOptions.h → lib/ios/RNNBackgroundOptions.h View File

@@ -1,6 +1,6 @@
1 1
 #import "RNNOptions.h"
2 2
 
3
-@interface RNNBackgrounOptions : RNNOptions
3
+@interface RNNBackgroundOptions : RNNOptions
4 4
 
5 5
 @property (nonatomic, strong) NSNumber* color;
6 6
 @property (nonatomic, strong) NSString* component;

lib/ios/RNNBackgrounOptions.m → lib/ios/RNNBackgroundOptions.m View File

@@ -1,6 +1,6 @@
1
-#import "RNNBackgrounOptions.h"
1
+#import "RNNBackgroundOptions.h"
2 2
 
3
-@implementation RNNBackgrounOptions
3
+@implementation RNNBackgroundOptions
4 4
 
5 5
 - (void)applyOn:(UIViewController *)viewController {
6 6
 	if (self.color) {

+ 13
- 0
lib/ios/RNNSubtitleOptions.h View File

@@ -0,0 +1,13 @@
1
+#import "RNNOptions.h"
2
+
3
+@interface RNNSubtitleOptions : RNNOptions
4
+
5
+@property (nonatomic, strong) NSString* text;
6
+@property (nonatomic, strong) NSNumber* fontSize;
7
+@property (nonatomic, strong) NSNumber* color;
8
+@property (nonatomic, strong) NSString* fontFamily;
9
+@property (nonatomic, strong) NSString* alignment;
10
+
11
+@property (nonatomic, strong) NSDictionary* fontAttributes;
12
+
13
+@end

+ 30
- 0
lib/ios/RNNSubtitleOptions.m View File

@@ -0,0 +1,30 @@
1
+#import "RNNSubtitleOptions.h"
2
+
3
+@implementation RNNSubtitleOptions
4
+
5
+- (NSDictionary *)fontAttributes {
6
+	NSMutableDictionary* navigationBarTitleTextAttributes = [NSMutableDictionary new];
7
+	if (self.fontFamily || self.fontSize || self.color) {
8
+//		if (self.color) {
9
+//			navigationBarTitleTextAttributes[NSForegroundColorAttributeName] = [RCTConvert UIColor:self.color];
10
+//		}
11
+		if (self.fontFamily){
12
+			if (self.fontSize) {
13
+				navigationBarTitleTextAttributes[NSFontAttributeName] = [UIFont fontWithName:self.fontFamily size:[self.fontSize floatValue]];
14
+			} else {
15
+				navigationBarTitleTextAttributes[NSFontAttributeName] = [UIFont fontWithName:self.fontFamily size:14];
16
+			}
17
+		} else if (self.fontSize) {
18
+			navigationBarTitleTextAttributes[NSFontAttributeName] = [UIFont systemFontOfSize:[self.fontSize floatValue]];
19
+		}
20
+	}
21
+	
22
+	return navigationBarTitleTextAttributes;
23
+}
24
+
25
+- (NSNumber *)fontSize {
26
+	return _fontSize ? _fontSize : @(14);
27
+}
28
+
29
+
30
+@end

+ 3
- 6
lib/ios/RNNTitleOptions.h View File

@@ -1,4 +1,5 @@
1 1
 #import "RNNOptions.h"
2
+#import "RNNSubtitleOptions.h"
2 3
 
3 4
 @interface RNNTitleOptions : RNNOptions
4 5
 
@@ -7,15 +8,11 @@
7 8
 @property (nonatomic, strong) NSNumber* color;
8 9
 @property (nonatomic, strong) NSString* fontFamily;
9 10
 
10
-@property (nonatomic, strong) NSString* subtitle;
11
-@property (nonatomic, strong) NSString* subtitleFontFamily;
12
-@property (nonatomic, strong) NSString* subtitleFontSize;
13
-@property (nonatomic, strong) NSString* subtitleColor;
14
-
15 11
 @property (nonatomic, strong) NSString* component;
16 12
 @property (nonatomic, strong) NSString* componentAlignment;
17 13
 
14
+@property (nonatomic, strong) RNNSubtitleOptions* subtitle;
15
+
18 16
 @property (nonatomic, strong) NSDictionary* fontAttributes;
19
-@property (nonatomic, strong) NSDictionary* subtitleFontAttributes;
20 17
 
21 18
 @end

+ 4
- 20
lib/ios/RNNTitleOptions.m View File

@@ -16,8 +16,8 @@
16 16
 		viewController.navigationController.navigationBar.largeTitleTextAttributes = fontAttributes;
17 17
 	}
18 18
 	
19
-	if (self.subtitle) {
20
-		RNNTitleViewHelper* titleViewHelper = [[RNNTitleViewHelper alloc] init:viewController title:self.text subtitle:self.subtitle titleImageData:nil isSetSubtitle:NO];
19
+	if (self.subtitle.text) {
20
+		RNNTitleViewHelper* titleViewHelper = [[RNNTitleViewHelper alloc] init:viewController title:self.text subtitle:self.subtitle.text titleImageData:nil isSetSubtitle:NO];
21 21
 		[titleViewHelper setup:self];
22 22
 	}
23 23
 }
@@ -42,24 +42,8 @@
42 42
 	return navigationBarTitleTextAttributes;
43 43
 }
44 44
 
45
-- (NSDictionary *)subtitleFontAttributes {
46
-	NSMutableDictionary* navigationBarTitleTextAttributes = [NSMutableDictionary new];
47
-	if (self.subtitleFontFamily || self.subtitleFontSize || self.subtitleColor) {
48
-		if (self.subtitleColor) {
49
-			navigationBarTitleTextAttributes[NSForegroundColorAttributeName] = [RCTConvert UIColor:self.subtitleColor];
50
-		}
51
-		if (self.subtitleFontFamily){
52
-			if (self.subtitleFontSize) {
53
-				navigationBarTitleTextAttributes[NSFontAttributeName] = [UIFont fontWithName:self.subtitleFontFamily size:[self.subtitleFontSize floatValue]];
54
-			} else {
55
-				navigationBarTitleTextAttributes[NSFontAttributeName] = [UIFont fontWithName:self.subtitleFontFamily size:14];
56
-			}
57
-		} else if (self.subtitleFontSize) {
58
-			navigationBarTitleTextAttributes[NSFontAttributeName] = [UIFont systemFontOfSize:[self.subtitleFontSize floatValue]];
59
-		}
60
-	}
61
-	
62
-	return navigationBarTitleTextAttributes;
45
+- (NSNumber *)fontSize {
46
+	return _fontSize ? _fontSize : @(20);
63 47
 }
64 48
 
65 49
 @end

+ 10
- 5
lib/ios/RNNTitleViewHelper.m View File

@@ -131,15 +131,20 @@
131 131
 	subtitleLabel.backgroundColor = [UIColor clearColor];
132 132
 	subtitleLabel.autoresizingMask = self.titleView.autoresizingMask;
133 133
 	
134
-	[subtitleLabel setAttributedText:[[NSAttributedString alloc] initWithString:self.subtitle attributes:style.fontAttributes]];
134
+	[subtitleLabel setAttributedText:[[NSAttributedString alloc] initWithString:self.subtitle attributes:style.subtitle.fontAttributes]];
135 135
 	
136 136
 	
137
-	CGSize labelSize = [subtitleLabel.text sizeWithAttributes:style.fontAttributes];
137
+	CGSize labelSize = [subtitleLabel.text sizeWithAttributes:style.subtitle.fontAttributes];
138 138
 	CGRect labelframe = subtitleLabel.frame;
139 139
 	labelframe.size = labelSize;
140 140
 	subtitleLabel.frame = labelframe;
141 141
 	[subtitleLabel sizeToFit];
142 142
 	
143
+	if (style.subtitle.color) {
144
+		UIColor *color = style.subtitle.color != (id)[NSNull null] ? [RCTConvert UIColor:style.subtitle.color] : nil;
145
+		subtitleLabel.textColor = color;
146
+	}
147
+	
143 148
 	[self.titleView addSubview:subtitleLabel];
144 149
 	
145 150
 	return subtitleLabel;
@@ -159,13 +164,13 @@
159 164
 	
160 165
 	UIFont *titleFont = [UIFont boldSystemFontOfSize:17.f];
161 166
 	
162
-	id fontSize = style.subtitleFontSize;
167
+	id fontSize = style.fontSize;
163 168
 	if (fontSize) {
164 169
 		CGFloat fontSizeFloat = [RCTConvert CGFloat:fontSize];
165 170
 		titleFont = [UIFont boldSystemFontOfSize:fontSizeFloat];
166 171
 	}
167 172
 	
168
-	[titleLabel setAttributedText:[[NSAttributedString alloc] initWithString:self.title attributes:style.subtitleFontAttributes]];
173
+	[titleLabel setAttributedText:[[NSAttributedString alloc] initWithString:self.title attributes:style.fontAttributes]];
169 174
 	
170 175
 	CGSize labelSize = [titleLabel.text sizeWithAttributes:@{NSFontAttributeName:titleFont}];
171 176
 	CGRect labelframe = titleLabel.frame;
@@ -176,7 +181,7 @@
176 181
 		titleLabel.center = self.titleView.center;
177 182
 	}
178 183
 	
179
-	id navBarTextColor = style.subtitleColor;
184
+	id navBarTextColor = style.color;
180 185
 	if (navBarTextColor) {
181 186
 		UIColor *color = navBarTextColor != (id)[NSNull null] ? [RCTConvert UIColor:navBarTextColor] : nil;
182 187
 		titleLabel.textColor = color;

+ 4
- 2
lib/ios/RNNTopBarOptions.h View File

@@ -1,6 +1,7 @@
1 1
 #import "RNNOptions.h"
2 2
 #import "RNNTitleOptions.h"
3
-#import "RNNBackgrounOptions.h"
3
+#import "RNNSubtitleOptions.h"
4
+#import "RNNBackgroundOptions.h"
4 5
 
5 6
 @interface RNNTopBarOptions : RNNOptions
6 7
 
@@ -18,7 +19,8 @@
18 19
 @property (nonatomic, strong) NSNumber* largeTitle;
19 20
 @property (nonatomic, strong) NSString* testID;
20 21
 @property (nonatomic, strong) RNNTitleOptions* title;
21
-@property (nonatomic, strong) RNNBackgrounOptions* background;
22
+@property (nonatomic, strong) RNNSubtitleOptions* subtitle;
23
+@property (nonatomic, strong) RNNBackgroundOptions* background;
22 24
 @property (nonatomic, strong) NSNumber* backButtonImage;
23 25
 @property (nonatomic, strong) NSNumber* backButtonHidden;
24 26
 @property (nonatomic, strong) NSString* backButtonTitle;

+ 8
- 1
lib/ios/RNNTopBarOptions.m View File

@@ -16,11 +16,18 @@ extern const NSInteger BLUR_TOPBAR_TAG;
16 16
 - (instancetype)initWithDict:(NSDictionary *)dict {
17 17
 	self = [super initWithDict:dict];
18 18
 	self.title = [[RNNTitleOptions alloc] initWithDict:dict[@"title"]];
19
-	self.background = [[RNNBackgrounOptions alloc] initWithDict:dict[@"background"]];
19
+	self.subtitle = [[RNNSubtitleOptions alloc] initWithDict:dict[@"subtitle"]];
20
+	self.background = [[RNNBackgroundOptions alloc] initWithDict:dict[@"background"]];
21
+	self.title.subtitle = self.subtitle;
20 22
 	
21 23
 	return self;
22 24
 }
23 25
 
26
+- (void)mergeWith:(NSDictionary *)otherOptions {
27
+	[super mergeWith:otherOptions];
28
+	self.title.subtitle = self.subtitle;
29
+}
30
+
24 31
 - (void)applyOn:(UIViewController*)viewController {
25 32
 	[self.title applyOn:viewController];
26 33
 	[self.background applyOn:viewController];

+ 16
- 12
lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj View File

@@ -96,12 +96,14 @@
96 96
 		507F44201FFA8A8800D9425B /* RNNRootViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 507F441F1FFA8A8800D9425B /* RNNRootViewProtocol.h */; };
97 97
 		50A00C37200F84D6000F01A6 /* RNNOverlayOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 50A00C35200F84D6000F01A6 /* RNNOverlayOptions.h */; };
98 98
 		50A00C38200F84D6000F01A6 /* RNNOverlayOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50A00C36200F84D6000F01A6 /* RNNOverlayOptions.m */; };
99
+		50C4A496206BDDBB00DB292E /* RNNSubtitleOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 50C4A494206BDDBB00DB292E /* RNNSubtitleOptions.h */; };
100
+		50C4A497206BDDBB00DB292E /* RNNSubtitleOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50C4A495206BDDBB00DB292E /* RNNSubtitleOptions.m */; };
99 101
 		50CB3B691FDE911400AA153B /* RNNSideMenuOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 50CB3B671FDE911400AA153B /* RNNSideMenuOptions.h */; };
100 102
 		50CB3B6A1FDE911400AA153B /* RNNSideMenuOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50CB3B681FDE911400AA153B /* RNNSideMenuOptions.m */; };
101 103
 		50D031342005149000386B3D /* RNNOverlayManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 50D031322005149000386B3D /* RNNOverlayManager.h */; };
102 104
 		50D031352005149000386B3D /* RNNOverlayManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 50D031332005149000386B3D /* RNNOverlayManager.m */; };
103
-		50EB4ED72068EBE000D6ED34 /* RNNBackgrounOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 50EB4ED52068EBE000D6ED34 /* RNNBackgrounOptions.h */; };
104
-		50EB4ED82068EBE000D6ED34 /* RNNBackgrounOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50EB4ED62068EBE000D6ED34 /* RNNBackgrounOptions.m */; };
105
+		50EB4ED72068EBE000D6ED34 /* RNNBackgroundOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 50EB4ED52068EBE000D6ED34 /* RNNBackgroundOptions.h */; };
106
+		50EB4ED82068EBE000D6ED34 /* RNNBackgroundOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50EB4ED62068EBE000D6ED34 /* RNNBackgroundOptions.m */; };
105 107
 		50EB93421FE14A3E00BD8EEE /* RNNBottomTabOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50EB93401FE14A3E00BD8EEE /* RNNBottomTabOptions.m */; };
106 108
 		50F5DFC11F407A8C001A00BC /* RNNTabBarController.h in Headers */ = {isa = PBXBuildFile; fileRef = 50F5DFBF1F407A8C001A00BC /* RNNTabBarController.h */; };
107 109
 		50F5DFC21F407A8C001A00BC /* RNNTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 50F5DFC01F407A8C001A00BC /* RNNTabBarController.m */; };
@@ -285,12 +287,14 @@
285 287
 		507F441F1FFA8A8800D9425B /* RNNRootViewProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNRootViewProtocol.h; sourceTree = "<group>"; };
286 288
 		50A00C35200F84D6000F01A6 /* RNNOverlayOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNOverlayOptions.h; sourceTree = "<group>"; };
287 289
 		50A00C36200F84D6000F01A6 /* RNNOverlayOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNOverlayOptions.m; sourceTree = "<group>"; };
290
+		50C4A494206BDDBB00DB292E /* RNNSubtitleOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNSubtitleOptions.h; sourceTree = "<group>"; };
291
+		50C4A495206BDDBB00DB292E /* RNNSubtitleOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNSubtitleOptions.m; sourceTree = "<group>"; };
288 292
 		50CB3B671FDE911400AA153B /* RNNSideMenuOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNSideMenuOptions.h; sourceTree = "<group>"; };
289 293
 		50CB3B681FDE911400AA153B /* RNNSideMenuOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNSideMenuOptions.m; sourceTree = "<group>"; };
290 294
 		50D031322005149000386B3D /* RNNOverlayManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNOverlayManager.h; sourceTree = "<group>"; };
291 295
 		50D031332005149000386B3D /* RNNOverlayManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNOverlayManager.m; sourceTree = "<group>"; };
292
-		50EB4ED52068EBE000D6ED34 /* RNNBackgrounOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNBackgrounOptions.h; sourceTree = "<group>"; };
293
-		50EB4ED62068EBE000D6ED34 /* RNNBackgrounOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNBackgrounOptions.m; sourceTree = "<group>"; };
296
+		50EB4ED52068EBE000D6ED34 /* RNNBackgroundOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNBackgroundOptions.h; sourceTree = "<group>"; };
297
+		50EB4ED62068EBE000D6ED34 /* RNNBackgroundOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNBackgroundOptions.m; sourceTree = "<group>"; };
294 298
 		50EB933F1FE14A3E00BD8EEE /* RNNBottomTabOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNBottomTabOptions.h; sourceTree = "<group>"; };
295 299
 		50EB93401FE14A3E00BD8EEE /* RNNBottomTabOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNBottomTabOptions.m; sourceTree = "<group>"; };
296 300
 		50F5DFBF1F407A8C001A00BC /* RNNTabBarController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNTabBarController.h; sourceTree = "<group>"; };
@@ -491,8 +495,10 @@
491 495
 				A7626BFC1FC2FB2C00492FB8 /* RNNTopBarOptions.m */,
492 496
 				50570B242061473D006A1B5C /* RNNTitleOptions.h */,
493 497
 				50570B252061473D006A1B5C /* RNNTitleOptions.m */,
494
-				50EB4ED52068EBE000D6ED34 /* RNNBackgrounOptions.h */,
495
-				50EB4ED62068EBE000D6ED34 /* RNNBackgrounOptions.m */,
498
+				50C4A494206BDDBB00DB292E /* RNNSubtitleOptions.h */,
499
+				50C4A495206BDDBB00DB292E /* RNNSubtitleOptions.m */,
500
+				50EB4ED52068EBE000D6ED34 /* RNNBackgroundOptions.h */,
501
+				50EB4ED62068EBE000D6ED34 /* RNNBackgroundOptions.m */,
496 502
 				A7626BFF1FC578AB00492FB8 /* RNNBottomTabsOptions.h */,
497 503
 				A7626C001FC5796200492FB8 /* RNNBottomTabsOptions.m */,
498 504
 				50EB933F1FE14A3E00BD8EEE /* RNNBottomTabOptions.h */,
@@ -546,12 +552,8 @@
546 552
 				E8AEDB461F58414D000F5A6A /* Animations */,
547 553
 				504AFE611FFE52EF0076E904 /* Options */,
548 554
 				50D031312005146C00386B3D /* Managers */,
549
-				5032774C2015E86D00ECD75D /* RNNNavigationEvent.h */,
550
-				5032774D2015E86D00ECD75D /* RNNNavigationEvent.m */,
551 555
 				50570BE82063E09B006A1B5C /* RNNTitleViewHelper.h */,
552 556
 				50570BE92063E09B006A1B5C /* RNNTitleViewHelper.m */,
553
-				5032775E2016302900ECD75D /* RNNComponentLifecycleEvent.h */,
554
-				5032775F2016302900ECD75D /* RNNComponentLifecycleEvent.m */,
555 557
 				26916C941E4B9CCC00D13680 /* RNNRootViewCreator.h */,
556 558
 				26916C961E4B9E7700D13680 /* RNNReactRootViewCreator.h */,
557 559
 				26916C971E4B9E7700D13680 /* RNNReactRootViewCreator.m */,
@@ -723,7 +725,7 @@
723 725
 			buildActionMask = 2147483647;
724 726
 			files = (
725 727
 				261F0E6A1E6F028A00989DE2 /* RNNNavigationStackManager.h in Headers */,
726
-				50EB4ED72068EBE000D6ED34 /* RNNBackgrounOptions.h in Headers */,
728
+				50EB4ED72068EBE000D6ED34 /* RNNBackgroundOptions.h in Headers */,
727 729
 				504AFE761FFFF1E00076E904 /* RNNNavigationOptions.h in Headers */,
728 730
 				504AFE771FFFF1E20076E904 /* RNNTopBarOptions.h in Headers */,
729 731
 				26916C981E4B9E7700D13680 /* RNNReactRootViewCreator.h in Headers */,
@@ -764,6 +766,7 @@
764 766
 				50D031342005149000386B3D /* RNNOverlayManager.h in Headers */,
765 767
 				7B1126A71E2D2B6C00F9B03B /* RNNEventEmitter.h in Headers */,
766 768
 				E8A430111F9CB87B00B61A20 /* RNNAnimatedView.h in Headers */,
769
+				50C4A496206BDDBB00DB292E /* RNNSubtitleOptions.h in Headers */,
767 770
 				268692821E5054F800E2C612 /* RNNStore.h in Headers */,
768 771
 				E8AEDB3C1F55A1C2000F5A6A /* RNNElementView.h in Headers */,
769 772
 				E8E518321F83B3E0000467AC /* RNNUtils.h in Headers */,
@@ -902,6 +905,7 @@
902 905
 			buildActionMask = 2147483647;
903 906
 			files = (
904 907
 				263905C71E4C6F440023D7D3 /* SidebarFeedlyAnimation.m in Sources */,
908
+				50C4A497206BDDBB00DB292E /* RNNSubtitleOptions.m in Sources */,
905 909
 				263905B41E4C6F440023D7D3 /* MMDrawerVisualState.m in Sources */,
906 910
 				263905C51E4C6F440023D7D3 /* SidebarFacebookAnimation.m in Sources */,
907 911
 				50451D0E2042F70900695F00 /* RNNTransition.m in Sources */,
@@ -940,7 +944,7 @@
940 944
 				2DCD9196200014A900EDC75D /* RNNBridgeManager.m in Sources */,
941 945
 				263905C11E4C6F440023D7D3 /* SidebarAirbnbAnimation.m in Sources */,
942 946
 				263905D71E4C94970023D7D3 /* RNNSideMenuController.m in Sources */,
943
-				50EB4ED82068EBE000D6ED34 /* RNNBackgrounOptions.m in Sources */,
947
+				50EB4ED82068EBE000D6ED34 /* RNNBackgroundOptions.m in Sources */,
944 948
 				507F43CA1FF4F9CC00D9425B /* RNNTopTabOptions.m in Sources */,
945 949
 				26916C991E4B9E7700D13680 /* RNNReactRootViewCreator.m in Sources */,
946 950
 				214545251F4DC125006E8DA1 /* RNNUIBarButtonItem.m in Sources */,

+ 1
- 2
lib/src/commands/Commands.ts View File

@@ -63,7 +63,7 @@ export class Commands {
63 63
 
64 64
   public push(componentId, simpleApi) {
65 65
     const input = _.cloneDeep(simpleApi);
66
-    this.optionsProcessor.processOptions(input);
66
+
67 67
     const layout = this.layoutTreeParser.parse(input);
68 68
     this.layoutTreeCrawler.crawl(layout);
69 69
 
@@ -92,7 +92,6 @@ export class Commands {
92 92
 
93 93
   public showOverlay(simpleApi) {
94 94
     const input = _.cloneDeep(simpleApi);
95
-    this.optionsProcessor.processOptions(input);
96 95
 
97 96
     const layout = this.layoutTreeParser.parse(input);
98 97
     this.layoutTreeCrawler.crawl(layout);

+ 8
- 1
playground/src/screens/WelcomeScreen.js View File

@@ -223,7 +223,14 @@ class WelcomeScreen extends Component {
223 223
         options: {
224 224
           topBar: {
225 225
             title: {
226
-              text: 'pushed'
226
+              text: 'pushed',
227
+              color: '#0000ff',
228
+              fontSize: 14
229
+            },
230
+            subtitle: {
231
+              text: 'subtitle',
232
+              fontSize: 10,
233
+              color: '#00ff00'
227 234
             }
228 235
           }
229 236
         }