浏览代码

Fix system & back button color (#4592)

* Add color to tintColor
Mary Jenel 6 年前
父节点
当前提交
57d8ff7858
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      lib/ios/RNNNavigationButtons.m

+ 5
- 0
lib/ios/RNNNavigationButtons.m 查看文件

44
 		if(barButtonItem) {
44
 		if(barButtonItem) {
45
 			[barButtonItems addObject:barButtonItem];
45
 			[barButtonItems addObject:barButtonItem];
46
 		}
46
 		}
47
+		UIColor* color = [self color:[RCTConvert UIColor:button[@"color"]] defaultColor:[defaultStyle.color getWithDefaultValue:nil]];
48
+		if (color) {
49
+			self.viewController.navigationController.navigationBar.tintColor = color;
50
+		}
47
 	}
51
 	}
48
 	
52
 	
49
 	if ([side isEqualToString:@"left"]) {
53
 	if ([side isEqualToString:@"left"]) {
118
 	if (color) {
122
 	if (color) {
119
 		[textAttributes setObject:color forKey:NSForegroundColorAttributeName];
123
 		[textAttributes setObject:color forKey:NSForegroundColorAttributeName];
120
 		[barButtonItem setImage:[[iconImage withTintColor:color] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
124
 		[barButtonItem setImage:[[iconImage withTintColor:color] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
125
+		barButtonItem.tintColor = color;
121
 	}
126
 	}
122
 	
127
 	
123
 	NSNumber* fontSize = [self fontSize:dictionary[@"fontSize"] defaultFontSize:[defaultStyle.fontSize getWithDefaultValue:nil]];
128
 	NSNumber* fontSize = [self fontSize:dictionary[@"fontSize"] defaultFontSize:[defaultStyle.fontSize getWithDefaultValue:nil]];