【问题标题】:UIBarButtonItem setTintColor white but when run in a real phone it change to grayUIBarButtonItem setTintColor 白色,但在真实手机中运行时变为灰色
【发布时间】:2015-09-28 04:35:34
【问题描述】:

我把UIBarButtonItemtintColor设置为白色,在storyboard和模拟器中都是白色的,但是在真机上运行就变成灰色了!为什么这么奇怪?

在真实手机中:

模拟器:

另外当设置UIBarButtonItem图片时也有同样的问题

在真实手机中:

在模拟器中:

【问题讨论】:

  • 你使用相同的iOS版本?
  • 是的,和iOS 8.3一样的版本

标签: ios storyboard uibarbuttonitem tintcolor


【解决方案1】:

我遇到了同样的问题,下一个方法帮助了我:

  1. 进入 iPhone 设置 -> 通用 -> 辅助功能 -> 增加对比度
  2. 深色关闭;

【讨论】:

    【解决方案2】:

    您可以将此行用作导航按钮

    [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多