Skip to content

Instantly share code, notes, and snippets.

@evgeniyd
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evgeniyd/300e6ab0fc3293ca2417 to your computer and use it in GitHub Desktop.
Save evgeniyd/300e6ab0fc3293ca2417 to your computer and use it in GitHub Desktop.
Creating UIColor extension in Swift
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