tfcamp
tfcamp

Reputation: 115

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:

Upvotes: 7

Views: 1935

Answers (3)

Graham Perks
Graham Perks

Reputation: 23400

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.

Upvotes: 11

Will Said
Will Said

Reputation: 404

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

Upvotes: 1

Ganesh Manickam
Ganesh Manickam

Reputation: 2139

assign image to the UIImageView

thing.image = UIImage(named:"picture.png")

Upvotes: 4

Related Questions