let image = UIImage(named: "设置icon")?.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal)
self.navigationItem.rightBarButtonItem = UIBarButtonItem(image: image, style: UIBarButtonItemStyle.Plain, target: self, action: "jumpToSetting")
更新Swift3
let image = UIImage(named:"设置icon")?.withRenderingMode(.alwaysOriginal)
网友评论