Why image won't load for bar button item?

Anyone know why a png file would not load as an image in a bar button item? Here's the error message:


2017-10-07 23:55:42.118885-0500 MailToText[9190:435784] Could not load the "Navigation_Organize.png" image referenced from a nib in the bundle with identifier "us.gnolaum.MailToText"

generateAndStoreProvidersData()

Accepted Reply

Several reasons why in this SO thread:


https://stackoverflow.com/questions/31198946/could-not-load-the-image-referenced-from-a-nib-in-the-bundle-with-identifier


(note where one recommends 'clean' you should perform an option-clean build folder, instead)

Replies

have you carefully checked the names, including upper/lowercase ?


did you try putting the image in the xccasset ?

Several reasons why in this SO thread:


https://stackoverflow.com/questions/31198946/could-not-load-the-image-referenced-from-a-nib-in-the-bundle-with-identifier


(note where one recommends 'clean' you should perform an option-clean build folder, instead)

I'm sure I got the names right, because I used the drop-down list box to select the image in the attribute inspector pane for the bar button item.


If I use xccasset, how do I access it? Is there a XCCAsset class?