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
 		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]];