ios - 后退按钮在屏幕上显示为不同的颜色?

标签 ios swift uinavigationcontroller

为了在导航 Controller 设置中试验后退按钮,我以编程方式添加了一个按钮,但没有使用 Storyboard,也没有使用导航 Controller 免费提供的默认导航栏和后退按钮。

在 App Delegate 中我只是说:

navigationController.isNavigationBarHidden = true

我将按钮设置为简单的黑白图像图标 - 但当我在模拟器中运行它时,图像显示为蓝色。

有人知道这是为什么吗?它似乎仍在选择蓝色的导航 Controller 颜色,但我已将 NavigationBarHidden 设置为 true。

最佳答案

从 Assets 中,确保选择了照片并转到属性检查器并将“渲染图像为”更改为原始图像,这同样适用于标签栏项目图像

关于ios - 后退按钮在屏幕上显示为不同的颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46384480/

相关文章:

iOS( swift ): Presenting View Controller Embedded in Navigation Controller

iphone - 我的 NSUserDefaults 加载操作有什么问题吗?

ios - 从另一个页面的facebook ios sdk注销用户

ios - 启动框架/Info.plist : No such file or directory 时所有框架错误

swift - 在枚举中生成随机类型的静态函数会导致崩溃并出现错误 "unexpectedly found nil when unwrapping an Optional value"

ios - 在 Swift 中从 UIImageView 检索 UIImage

ios - 在没有导航 Controller 的情况下向 View 添加导航栏

ios - 使用自动布局的 UIImage 旁边的 UILabel

ios - Swift 框架不在 -swift 文件中生成 objective-c 头代码

swift - 嵌套的导航 Controller 和 TabBar Controller