How to access extension of UIColor in Swift?

后端 未结 9 1516
猫巷女王i
猫巷女王i 2020-12-10 01:15

I am very new to swift and trying to create an extension of UIColor class as

extension UIColor{

    func getCustomBlueColor() -> UIColor {
        retur         


        
9条回答
  •  余生分开走
    2020-12-10 01:59

    You just need to change your statement like,

     btnShare.setTitleColor(UIColor().getCustomBlueColor(), forState:.Normal)
    

    More detailed explanation is here.

提交回复
热议问题