【发布时间】:2021-04-20 00:17:07
【问题描述】:
我喜欢您使用情节提要添加 UIIMAGEVIEW 并将其 Image 属性设置为内置“applewatch”图标时获得的手表图标。
但是当我以编程方式创建 UIIMAGEVIEW 时,如何将其设置为那个酷图标?
在这里,我添加了一个腕带的 3rd 方 .png。但我想使用看起来最好的内置:
let imageName = "Wrist Band.png"
let image = UIImage(named: imageName)
let imageView = UIImageView(image: image!)
imageView.frame = CGRect(x: 0, y: 0, width: 100, height: 200)
view.addSubview(imageView)
【问题讨论】:
-
你说的是哪个苹果手表图片?
-
从 Storyboard 获得的那个 > 添加 UIImageView > 在 Attribute Inspecter 中选择它的 Image View 属性并设置为“applewatch”。 (小蓝表白屏)
标签: ios swift xcode uiimageview