Reputation: 24315
What is the best to change globally all UIButtons background color? I already set the tint globally
[[UIApplication sharedApplication] delegate].window.tintColor =
Upvotes: 2
Views: 464
Reputation: 66234
[[UIButton appearance] setBackgroundImage:[UIImage imageNamed:@"button.png"]
forState:UIControlStateNormal];
Or
[[UIButton appearance] setBackgroundColor:[UIColor purpleColor]];
Here's some more info on the appearance proxy: http://developer.apple.com/library/ios/documentation/uikit/reference/UIAppearance_Protocol/Reference/Reference.html
Upvotes: 4
Reputation: 4248
Check this out:
[[UIButton appearance] setBackgroundColor:[UIColor redColor]];
Upvotes: 0