【发布时间】:2021-12-15 11:57:48
【问题描述】:
我在更改背景颜色和同时制作圆角时遇到问题。
droppedView.roundCorners(corners: .bottomLeft, radius: 7)
droppedView.roundCorners(corners: .bottomRight, radius: 7)
droppedView.backgroundColor = .systemGray6
当我这样做时,我的视图有圆角,但没有背景色。
这个问题有解决办法吗?
【问题讨论】:
-
您要应用修饰符的视图是视图还是 UI 形状?在这种情况下使用
.fill()然后.roundCorners() -
'roundCorners' 从何而来?
-
将
UIKit添加到您的标签大军中,以免误导他人。 -
感谢您的帮助,但不幸的是它还没有奏效。
-
是的,我正在尝试将其应用于 UIView