Skip to content

Instantly share code, notes, and snippets.

@geoffalday
Last active December 12, 2015 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geoffalday/4731700 to your computer and use it in GitHub Desktop.
Save geoffalday/4731700 to your computer and use it in GitHub Desktop.
Setting the color of button text to black in CSS vs. Objective-C.
.button { color: black; }
- (void)customizeAppearance
{
[[UIBarButtonItem appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor colorWithRed:0.0/255.0 green:0.0/255.0 blue:0.0/255.0 alpha:1.0],
UITextAttributeTextColor,
[UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:0.0],
UITextAttributeTextShadowColor,
nil]
forState:UIControlStateNormal];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment