How can we use Assets Catalog Color Sets?

后端 未结 9 1548
遇见更好的自我
遇见更好的自我 2020-11-29 06:57

I usually use custom UIColors on iOS using extensions with Swift, but now with iOS 11/ Xcode 9 we can create Colors Sets. How can we use them?

Update - Tip

9条回答
  •  旧时难觅i
    2020-11-29 07:40

     // iOS
     let color = UIColor(named: "SillyBlue")
    
     // macOS
     let color = NSColor(named: "SillyBlue")
    

提交回复
热议问题