How can we use Assets Catalog Color Sets?

后端 未结 9 1545
遇见更好的自我
遇见更好的自我 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条回答
  •  盖世英雄少女心
    2020-11-29 07:36

    UIColor(named: "myColor") 
    

    Source: WWDC 2017 Session 237 —— What's New in MapKit


    Caveat: Your project's Deployment Target needs to be set to iOS 11.0.

提交回复
热议问题