Yeongchan Jeon Yeongchan Jeon - 5 months ago 31
iOS Question

An UIBarButtonItem is colored with tint color. Can I get this displayed as it is?

The image below is the original one I want to display:

enter image description here

And I also put the following statement.

leftBtn.image = UIImage(named: "logo")

However, the image is displayes like the following one. I set the tint color as that dark grey.

enter image description here

Referencing this website disable tint on custom uibarbuttonitem images, I put this statement but it didn't make any change.


Is there any other way to make the image shown as I want? Any advice would be appreciated!


You should try this

leftBtn.image = UIImage(named: "logo").imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal)