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):
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):
Type #colorLiteral()
and #imageLiteral()
to see a color picker or image picker respectively.
Note: Image picker will list your images at Assets.xcassets
.
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: