UIBarButtonItem setTintColor white 但是当 运行 在真实的 phone 中它变成灰色
UIBarButtonItem setTintColor white but when run in a real phone it change to gray
我把UIBarButtonItem
tintColor
设置成白色,在storyboard和模拟器里都是白色的,但是在真实的运行里phone就变成灰色了!为什么这么奇怪?
实际phone:
模拟器:
另外当设置一个UIBarButtonItem
图像时也有同样的问题
实际phone:
在模拟器中:
您可以将此行用作导航按钮
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
我遇到了同样的问题,下一个方法帮助了我:
- 转到 iPhone 设置 -> 常规 -> 辅助功能 -> 增加对比度
- 关闭颜色加深;
我把UIBarButtonItem
tintColor
设置成白色,在storyboard和模拟器里都是白色的,但是在真实的运行里phone就变成灰色了!为什么这么奇怪?
实际phone:
模拟器:
另外当设置一个UIBarButtonItem
图像时也有同样的问题
实际phone:
在模拟器中:
您可以将此行用作导航按钮
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
我遇到了同样的问题,下一个方法帮助了我:
- 转到 iPhone 设置 -> 常规 -> 辅助功能 -> 增加对比度
- 关闭颜色加深;