【问题标题】:UIBarButtonItem from setTintColor back to its original colorUIBarButtonItem 从 setTintColor 变回原来的颜色
【发布时间】:2014-08-28 18:31:04
【问题描述】:

我在一个按钮上使用了 setTintColor,然后我想给它原来的颜色。由于它是双色的,我不能重复使用 setTintColor。

[myBtn setTintColor:[UIColor pxColorWithHexValue:@"#888888"]];

我该怎么办?

谢谢

【问题讨论】:

  • "由于它是双色的,我不能重复使用 setTintColor。"什么?
  • 按钮有蓝色和绿色两种颜色,我希望它们都出现。将 tintColor 设置为蓝色或绿色不是解决方案。

标签: objective-c iphone ios7 uibutton tintcolor


【解决方案1】:

我不知道你说的不能重复使用setTintColor 是什么意思。您应该可以将tintColor 设置回nil,它会继续从视图层次结构的更上层继承颜色。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-12-31
    • 1970-01-01
    • 2012-04-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多