I want to change the color to red.
Go to Format > Font > Font. + D to open the Font dialog box. Select the arrow next to Font color, and then choose a color. Select Default and then select Yes to apply the change to all new documents based on the template.
In iOS 5 you can use: [[UIBarButtonItem appearance] setTintColor:[UIColor greenColor]]; Please check these links for more: UIAppearance Protocol.
I found a simpler way to just change the color of title: iOS7:
UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithTitle:@"Title" style:UIBarButtonItemStyleBordered target:nil action:nil]; [button setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys: [UIColor redColor], NSForegroundColorAttributeName,nil] forState:UIControlStateNormal];
and prior iOS7:
UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithTitle:@"Title" style:UIBarButtonItemStyleBordered target:nil action:nil]; [button setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys: [UIColor redColor], UITextAttributeTextColor,nil] forState:UIControlStateNormal];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With