Xcode 图像文字表达式

huangapple go评论58阅读模式
英文:

Xcode Image Literal

问题

我是新手 Swift 和 Xcode。图像文字似乎不像图片。

我想创建一个图像文字数组。我希望它们在代码中看起来像小图片,而不是字符串。就像这个屏幕截图中一样。我想看到的图片是这样的

英文:

I am new at Swift and Xcode. Image literals not seem as a picture.

I want to make an array of Image Literals. I want them look like a small picture in code not a string. Like at the screenshoot.I want to see the images like this

答案1

得分: 0

你可以尝试在图像文字之前添加 #,例如:

#imageLiteral(resourceName: "some-image")

英文:

You could try adding # before image literal, for example:

#imageLiteral(resourceName: "some-image")

huangapple
  • 本文由 发表于 2023年7月12日 20:53:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/76670799.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定