Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn off color literals in Xcode?

Tags:

xcode

swift

When editing a source file with a Swift color literal, Xcode shows a square filled with the color:

enter image description here

If I prefer to see the raw text representation of the literal; i.e.

textColor = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)

is there a way to have Xcode display the text representation instead? I can't find an Xcode editor setting that controls this.

like image 911
jbelkins Avatar asked Dec 06 '18 16:12

jbelkins


1 Answers

I doubt that there is a setting.

This is more a workaround than a solution:

⌘C the color square – which copies the text –  and paste it as comment

enter image description here

like image 130
vadian Avatar answered Nov 07 '22 21:11

vadian