Browse Source

Fix system & back button color (#4592)

* Add color to tintColor
Mary Jenel 6 years ago
parent
commit
57d8ff7858
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      lib/ios/RNNNavigationButtons.m

+ 5
- 0
lib/ios/RNNNavigationButtons.m View File

@@ -44,6 +44,10 @@
44 44
 		if(barButtonItem) {
45 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 53
 	if ([side isEqualToString:@"left"]) {
@@ -118,6 +122,7 @@
118 122
 	if (color) {
119 123
 		[textAttributes setObject:color forKey:NSForegroundColorAttributeName];
120 124
 		[barButtonItem setImage:[[iconImage withTintColor:color] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
125
+		barButtonItem.tintColor = color;
121 126
 	}
122 127
 	
123 128
 	NSNumber* fontSize = [self fontSize:dictionary[@"fontSize"] defaultFontSize:[defaultStyle.fontSize getWithDefaultValue:nil]];