Reputation:
When I try using literals in a Playground, it shows me like this (doesn't show my image):
in above i add image or UIImage literal but doesn't show their contents.\
and also this with colors (I can't even see colors):
Upvotes: 6
Views: 25939
Reputation: 24341
When you type Color Literal
, a white box appears. In order to set the required colour, tap on that white box to select the colour from Color Picker.
This is what it looks like:
Upvotes: 15
Reputation: 658
Type #colorLiteral()
and #imageLiteral()
to see a color picker or image picker respectively.
Note: Image picker will list your images at Assets.xcassets
.
Upvotes: 26