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

Text color of toolbar buttons #175

Closed
mzgaljic opened this issue Apr 30, 2015 · 3 comments
Closed

Text color of toolbar buttons #175

mzgaljic opened this issue Apr 30, 2015 · 3 comments
Assignees
Labels

Comments

@mzgaljic
Copy link

Hello,

I looked at the source code but it is not immediately obvious (at all) where I could change the text color of the toolbar buttons. I am using the date picker, and would like the "cancel" and "start" buttons to be a different color.

@mzgaljic
Copy link
Author

mzgaljic commented May 1, 2015

Never mind, this can be done very easily. Like so:

UIColor *desiredColor = [UIColor redColor];
NSDictionary *attributes = @{ NSForegroundColorAttributeName : desiredColor };

[[UIBarButtonItem appearanceWhenContainedIn:[UISearchBar class], nil]
 setTitleTextAttributes:attributes forState:UIControlStateNormal];

@skywinder
Copy link
Owner

Thanks for solution! 👍

@skywinder
Copy link
Owner

it will be fixed with #54 pretty soon. I will make some easier way to set tint color for buttons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants