【发布时间】:2023-03-09 16:00:01
【问题描述】:
'UIView?' 类型的值没有成员'roundCorners'
cardView = UIView()
cardView.backgroundColor = Constants.Colors.colorOptimusThree
cardView.roundCorners(cornerRadius: 4.0)
view.addSubview(cardView)
【问题讨论】:
-
UIView 没有名为“roundCorners”的方法。
-
这可能是您在某处看到的扩展程序。