ios - UIBarButtonItem setTintColor white 但在真实手机中运行时它变为灰色

标签 ios storyboard uibarbuttonitem tintcolor

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

在真实手机中: enter image description here

模拟器: enter image description here

另外当设置一个UIBarButtonItem图像时也有同样的问题

在真实手机中:

enter image description here

在模拟器中:

enter image description here

最佳答案

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

  1. 转至 iPhone 设置 -> 常规 -> 辅助功能 -> 增加对比度
  2. 关闭“加深颜色”;

关于ios - UIBarButtonItem setTintColor white 但在真实手机中运行时它变为灰色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32815751/

相关文章:

ios - 如何仅在自动布局中使用 Storyboard为 iPhone 5s 或 iPhone SE 设置约束?

ios - 使用 Swift 在 UIBarButtonItem 上进行字距调整

ios - 具有自动尺寸的嵌套 UITableView

ios - 来自 appStoreReceiptURL 的应用程序内购买 Objective C 状态

IOS Storyboard - 如何在 Storyboard屏幕上放置视觉元素

swift - 使用 swift IOS 使 UIBarButtonItem 消失

ios - Swift:将 UIButton 转换为 UIBarButtonItem,真的需要这么复杂吗?

iphone - 如何按创建顺序检索对象?

ios - 我们可以在没有程序员成员(member)资格的情况下在 Xcode 8 模拟器上测试 iOS 推送通知吗?

ios - 如何让 pushViewController 只显示目标 View ?