|
@@ -13,9 +13,9 @@
|
13
|
13
|
self.topBarBackgroundColor = [navigationOptions objectForKey:@"topBarBackgroundColor"];
|
14
|
14
|
self.statusBarHidden = [navigationOptions objectForKey:@"statusBarHidden"];
|
15
|
15
|
self.title = [navigationOptions objectForKey:@"title"];
|
16
|
|
- self.topBarTextColor = [navigationOptions objectForKey:@"topBarTextColor"];
|
17
|
16
|
self.screenBackgroundColor = [navigationOptions objectForKey:@"screenBackgroundColor"];
|
18
|
17
|
self.setTabBadge = [navigationOptions objectForKey:@"setTabBadge"];
|
|
18
|
+ self.topBarTextFontFamily = [navigationOptions objectForKey:@"topBarTextFontFamily"];
|
19
|
19
|
return self;
|
20
|
20
|
}
|
21
|
21
|
|
|
@@ -37,7 +37,13 @@
|
37
|
37
|
}
|
38
|
38
|
if (self.topBarTextColor) {
|
39
|
39
|
UIColor* textColor = [RCTConvert UIColor:self.topBarTextColor];
|
40
|
|
- viewController.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:textColor};
|
|
40
|
+ NSMutableDictionary* navigationBarTitleTextAttributes = [NSMutableDictionary dictionaryWithDictionary:@{NSForegroundColorAttributeName: textColor}];
|
|
41
|
+ if (self.topBarTextFontFamily) {
|
|
42
|
+ [navigationBarTitleTextAttributes addEntriesFromDictionary:@{NSFontAttributeName: [UIFont fontWithName:self.topBarTextFontFamily size:20]}];
|
|
43
|
+ }
|
|
44
|
+ viewController.navigationController.navigationBar.titleTextAttributes = navigationBarTitleTextAttributes;
|
|
45
|
+ } else if (self.topBarTextFontFamily){
|
|
46
|
+ viewController.navigationController.navigationBar.titleTextAttributes = @{NSFontAttributeName: [UIFont fontWithName:self.topBarTextFontFamily size:20]};
|
41
|
47
|
}
|
42
|
48
|
if (self.screenBackgroundColor) {
|
43
|
49
|
UIColor* screenColor = [RCTConvert UIColor:self.screenBackgroundColor];
|
|
@@ -55,5 +61,4 @@
|
55
|
61
|
|
56
|
62
|
|
57
|
63
|
|
58
|
|
-
|
59
|
64
|
@end
|