全局更改所有 UIButtons 背景颜色的最佳方法是什么?我已经全局设置了色调
[[UIApplication sharedApplication] delegate].window.tintColor =
Best Answer-推荐答案 strong>
[[UIButton appearance] setBackgroundImage:[UIImage imageNamed"button.png"]
forState:UIControlStateNormal];
或者
[[UIButton appearance] setBackgroundColor:[UIColor purpleColor]];
以下是有关外观代理的更多信息:http://developer.apple.com/library/ios/documentation/uikit/reference/UIAppearance_Protocol/Reference/Reference.html
关于ios - 在 UIButtons 上全局设置背景颜色,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/20874279/
|