Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show image title instead of icon in xcode code?

I'm writing a pretty simple line, but it's hard for me to see what I've actually written, because my image title is displayed as an icon in xcode.

I want to see it as:

thing.image = picture.png

But instead I see it as:

thing.image = an actual icon is here in the code for some weird purpose I can't understand

I've searched with no luck. Any help is greatly appreciated. Thank you!

**edit: I'm assuming it's an icon placeholder... it displays as a small white box.

**edit: here's a ss of how my code looks:

like image 615
tfcamp Avatar asked Mar 25 '17 00:03

tfcamp


3 Answers

Related: I like the literals; to find out the name of the image after-the-fact, have Xcode reveal the name of the image asset by selecting the literal, then press Cmd-E, "Use Selection for Find". The image's name will show in the Find bar, e.g. #imageLiteral(resourceName: "icn_spinner")

Alternatively, press Cmd-/ to comment the line out; the commented form contains the literal text.

like image 62
Graham Perks Avatar answered Nov 10 '22 16:11

Graham Perks


assign image to the UIImageView

thing.image = UIImage(named:"picture.png")
like image 2
Ganesh Manickam Avatar answered Nov 10 '22 14:11

Ganesh Manickam


Highlight image and press Ctrl + F, then the image name will be in the toolbar.

like image 1
Will Said Avatar answered Nov 10 '22 14:11

Will Said