Navigation bar button image not showing in Swift

筅森魡賤 提交于 2019-12-01 15:34:26
Nicholas Murray

The way to resolve navigation button images appearing as blue is to select the image set in Assets.

And then choose Original Image from the Render As select options.

You should have a image with alpha.(The sample image you posted has white background). Also you should set the image with template mode. I dont know how to do that in Interface builder. This is a sample code to convert the image to template.

var image = UIImage(named: "").imageWithRenderingMode(UIImageRenderingMode.AlwaysTemplate)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!