UIBarButtonItem 的默认后退按钮背景图像出现在我的自定义

Posted

技术标签:

【中文标题】UIBarButtonItem 的默认后退按钮背景图像出现在我的自定义【英文标题】:Default back button background image of UIBarButtonItem appears over my custom 【发布时间】:2013-12-19 09:26:39 【问题描述】:

在 AppDelegate 中,我正在使用 UIAppearence 设置自定义后退按钮背景图像。

[[UIBarButtonItem appearance] setBackButtonBackgroundImage:image forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:highlightedImage forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault];

在某些情况下,按下视图控制器后,默认的后退按钮背景图像会出现在我的自定义上。

【问题讨论】:

【参考方案1】:

它帮助我隐藏了默认图像。

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

【讨论】:

以上是关于UIBarButtonItem 的默认后退按钮背景图像出现在我的自定义的主要内容,如果未能解决你的问题,请参考以下文章