我想使用UIColor作为对象的前底色,但我不知道如何将UIColor转换为 colored颜色
var myColor: UIColor
RoundedRectangle(cornerRadius: 5).foregroundColor(UIColor(myColor))
我想使用UIColor作为对象的前底色,但我不知道如何将UIColor转换为 colored颜色
var myColor: UIColor
RoundedRectangle(cornerRadius: 5).foregroundColor(UIColor(myColor))
从beta 5开始,您可以从UIColor创建 colored颜色 :
Color(UIColor.systemBlue)