这是我在viewDidLoad方法中的代码:
self.navigationController?.navigationBar.backIndicatorImage = UIImage(named: "back")
self.navigationController?.navigationBar.backIndicatorTransitionMaskImage = UIImage(named: "back")
self.navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: UIBarButtonItemStyle.Plain, target: nil, action: nil)
我想为导航控制器中的返回按钮设置自定义图标。但是,该图像显示成了蓝色而非原始格式。 如何使图像正常显示?
UIImage(named: "back")?.imageWithRenderingMode(.AlwaysOriginal)
- Long Pham