我正在将我的大项目更新到 ios7 。当我更新左侧导航按钮时出现问题。 我不明白什么是问题。
ios6:左键图像没有问题:
ios7:左键有问题
此外,当我进入下一个 View Controller 后退按钮时,在 ios7 中也有同样的问题:
我正在使用此图像作为菜单:link 。图像是透明的。
如何在 ios7 中解决这个问题。 这是一个大项目,我无法共享所有代码。当我阅读文章时,文章说问题是 setTintColor。正确的 ?
对不起我的英语。
谢谢。
最佳答案
我更改了全局色调并使用这种方式使我的 UIBarButtonItem 保持正常。
#define kColorGlobalTint [UIColor redColor]
UIColor *defaultColor = [UIView appearanceWhenContainedIn:[UINavigationBar class], nil].tintColor;
[[UIView appearance] setTintColor:kColorGlobalTint];
[[UIView appearanceWhenContainedIn:[UINavigationBar class], nil] setTintColor:defaultColor];
[[UINavigationBar appearance] setBarTintColor:kColorGlobalTint];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
关于iphone - ios7 导航栏左侧 UIBarButtonItem 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19265786/