gpt4 book ai didi

swift - Image Literal - 源文件中的编辑器占位符,无法使其工作

转载 作者:行者123 更新时间:2023-11-28 05:45:15 31 4
gpt4 key购买 nike

将图标添加到 Assets 文件夹时,它显示“源文件中的编辑器占位符”。有谁知道解决方案吗?

let logo: UIImageView = {
let l = UIImageView()
l.image = #imageLiteral(resourceName: "128x128")
l.contentMode = .scaleToFill
l.layer.masksToBounds = true
//l.layer.cornerRadius = 20
return l
}()

最佳答案

只需输入image literal,它将以默认图标完成。 enter image description here

双击这个图标,它会打开它右侧的媒体库。 enter image description here

然后选择你想要的图片 enter image description here

关于swift - Image Literal - 源文件中的编辑器占位符,无法使其工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55007856/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com