Last active
August 29, 2015 14:08
-
-
Save evgeniyd/300e6ab0fc3293ca2417 to your computer and use it in GitHub Desktop.
Creating UIColor extension in Swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIColor { | |
class func customGrayColor() -> UIColor { | |
let r: CGFloat = CGFloat(41.0/255.0) | |
let g: CGFloat = CGFloat(41.0/255.0) | |
let b: CGFloat = CGFloat(41.0/255.0) | |
return UIColor(red: r, green: g, blue: b, alpha: 1.0) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment