iphone - ios7 导航栏左侧 UIBarButtonItem 问题

标签 iphone ios objective-c uinavigationcontroller uinavigationbar

我正在将我的大项目更新到 ios7 。当我更新左侧导航按钮时出现问题。 我不明白什么是问题。

ios6:左键图像没有问题:

enter image description here

ios7:左键有问题

enter image description here

此外,当我进入下一个 View Controller 后退按钮时,在 ios7 中也有同样的问题:

enter image description here

我正在使用此图像作为菜单: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/

相关文章:

iphone - 发布需要用户注册的 iPhone 应用程序

iphone - WebView :shouldStartLoadWithRequest:navigationType: not getting called on webkit with youtube video link iphone

ios - 如何让相机功能仅显示在一个标签栏项目中?

c++ - OpenAL 中播放缓冲区之间的静音?

objective-c - 从 NSMutableData 保存和检索 Sint16

ios - RestKit 基本 URL - 域名后的目录

ios - 动画 GIF 在 iPhone 上不起作用

iphone - UILabel 不换行(如果我更改默认字体大小)

ios - 自定义 UIButton,-(IBAction)action :(id)sender fail

ios - CGContext 转换,提取旋转的矩形