简体   繁体   中英

How to turn off color literals in Xcode?

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

在此处输入图片说明

If I prefer to see the raw text representation of the literal; ie

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.

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

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM