Manage Styles in iOS - 公司內分享會

Manage Styles in iOS - 公司內分享會

481a04548eda340e5cf166b487792ee5?s=128

Li-Hsuan Chen

August 23, 2016
Tweet

Transcript

  1. Manage Styles  ௓cዥໞ

  2. self.view.backgroundColor = UIColor(red: 129/255, green: 216/255, blue: 208/255, alpha: 1)

  3. self.view.backgroundColor = UIColor(red: 129/255, green: 216/255, blue: 208/255, alpha: 1)

    㟬؃ಘ㣛ʁ
  4. Easy to Read and Reuse

  5. 䍲➮《そ㶶

  6. self.view.backgroundColor = UIColor.tiffanyBlue()

  7. self.view.backgroundColor = UIColor.tiffanyBlue() ݱࡏ؃ಘ㣛䆩ʁ

  8. extension UIColor { /// ᤅᢹೌཟɼ৭ᛰҝ RGB(129,216,208) class func tiffanyBlue() ->

    UIColor { return UIColor(red: 129/255, green: 216/255, blue: 208/255, alpha: 1) } } Ṝᒬሜ
  9. Try it

  10. UIColor UIFont UIImage ஈམ ඪ४ࣈ ܯࠂจࣈ -PHP എܠᅷ QMBDFIPMEFS ඼ṛඪ४৭

    ओ୊৭ථ ܯࠂᰓ৭
  11. Q&A