Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix system & back button color #4592

Merged
merged 3 commits into from
Jan 24, 2019
Merged

Conversation

maryjenel
Copy link
Contributor

@maryjenel maryjenel commented Jan 16, 2019

This PR sets the system button color and back button color.

When a user sets the color to a system icon, the colors were not being applied because nothing was setting the value. The current values that were being set were text and icon based buttons, but not system buttons.

@@ -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;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This handles the back button tint color. If anyone has a better way of handling this, please feel free to comment :D Feedback is much appreciated :)

Copy link
Contributor

@eliperkins eliperkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems good to me. It looks like we handled the case of coloring icons and text buttons, but never system buttons. 👍

@yogevbd yogevbd merged commit 57d8ff7 into wix:master Jan 24, 2019
vshkl pushed a commit to vshkl/react-native-navigation that referenced this pull request Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants