【发布时间】:2014-07-07 02:52:01
【问题描述】:
我想将条形按钮的颜色更改为白色。
例子:
[UINavigationBar appearance].barTintColor = [UIColor colorWithRed:251/255.0 green:108/255.0 blue:108/255.0 alpha:1.0];
[UINavigationBar appearance].tintColor = [UIColor whiteColor];
[UINavigationBar appearance].titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor]};
但是,在 iOS 7.1.1 上运行时,按钮显示为灰色,而不是白色。 模拟器上不会出现这个问题。
另外,UISegmentedControl也会出现同样的问题。
如何使用白色作为 tintColor?
【问题讨论】:
-
检查此链接 stackoverflow.com/questions/1340639/…> 可能会对您有所帮助。谢谢
标签: ios iphone objective-c uiappearance tintcolor