Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigation bar button image not showing in Swift

I'm back again.

I'm writing an app in Swift using Xcode 7. I've added a navigation controller and on top of that a navigation item, and then a bar button. I'm trying to change the image of the bar button to a png that I've imported into Xcode. However, it just shows this in the design and also when I run the app. It just shows a blue smudge in the navigation area.

bar button image not appearing!

I've tried importing the image into the project and also into images.xcassets with the same results.

Anyone know what may be wrong here?

Here's the image I've been trying to add and the settings I currently have.

image I'm trying to add

Settings:

settings of image

like image 882
beninabox_uk Avatar asked Sep 28 '15 16:09

beninabox_uk


1 Answers

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.

enter image description here

like image 154
Nicholas Murray Avatar answered Sep 21 '22 03:09

Nicholas Murray