Skip to content

Commit

Permalink
Fix system & back button color (#4592)
Browse files Browse the repository at this point in the history
* Add color to tintColor
  • Loading branch information
maryjenel authored and yogevbd committed Jan 24, 2019
1 parent 34f37aa commit 57d8ff7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/ios/RNNNavigationButtons.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ -(void)setButtons:(NSArray*)buttons side:(NSString*)side animated:(BOOL)animated
if(barButtonItem) {
[barButtonItems addObject:barButtonItem];
}
UIColor* color = [self color:[RCTConvert UIColor:button[@"color"]] defaultColor:[defaultStyle.color getWithDefaultValue:nil]];
if (color) {
self.viewController.navigationController.navigationBar.tintColor = color;
}
}

if ([side isEqualToString:@"left"]) {
Expand Down Expand Up @@ -118,6 +122,7 @@ -(RNNUIBarButtonItem*)buildButton: (NSDictionary*)dictionary defaultStyle:(RNNBu
if (color) {
[textAttributes setObject:color forKey:NSForegroundColorAttributeName];
[barButtonItem setImage:[[iconImage withTintColor:color] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
barButtonItem.tintColor = color;
}

NSNumber* fontSize = [self fontSize:dictionary[@"fontSize"] defaultFontSize:[defaultStyle.fontSize getWithDefaultValue:nil]];
Expand Down

0 comments on commit 57d8ff7

Please sign in to comment.