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.
I used
UIImage(imageLiteralResourceName: "image_asset_name")
and it works perfectly fine on XCode 13.2.1
输入 Who.What = #imageLiteral( 目前它是这样工作的。
不过谢谢你的帮助,我试过 UIImageview(named:"imageName")
I came up with a workaround
Create code snippets for color literal and image literal like below
Color
#colorLiteral()
And add completion shortcut as you want, Example: colorLiteral
. Do same for Image literal
Image
#imageLiteral()
And add completion shortcut as you want. Call those completion shortcuts in your code to get color
and image
literals.
There is no longer Image Literate :(
You may try:
Who.What = UIImage(named: "catImage")
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.