Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Image Literal in Xcode 13

The most used feature is missing in Xcode 13

Image Literal

#imageLiteral()

these commands do not seem to be working. A similar change has happened for Color Literals as well.

like image 702
Rajesh Avatar asked Oct 08 '21 17:10

Rajesh


People also ask

How do you open color literals in Xcode 13?

@Stevie, try typing in a empty line #colorLiteral, upon typing ( the square icon for literal will show up.


1 Answers

There is no longer image literal :(

You may try:

Who.What = UIImage(named: "catImage")
like image 150
Josie Koay Avatar answered Oct 18 '22 14:10

Josie Koay