【发布时间】:2021-11-06 03:42:05
【问题描述】:
如上图所示,这两个svg 图像的质量有所下降。在Assets 的属性检查器中,它们的Scale 属性设置为Single Scale。
这些是按钮的图像视图,调整大小以填充按钮:
button.setImage(UIImage(named: img1.rawValue), for: .normal)
button.contentHorizontalAlignment = .fill
button.contentVerticalAlignment = .fill
button.imageView?.contentMode = .scaleAspectFit
【问题讨论】:
标签: swift svg uibutton uiimageview uikit