Last active
November 23, 2015 01:04
-
-
Save jplazcano87/3eea45eb2353356fedb2 to your computer and use it in GitHub Desktop.
How to add UIColor extensions 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 Foundation | |
import UIKit | |
extension UIColor{ | |
//create a class function with the name of the custom color | |
class func lazcolor() -> UIColor { | |
return UIColor(red: 190.0/255.0, green: 190.0/255.0, blue: 190.0/255.0, alpha: 1.0) | |
} | |
class func grayScaleColor(grayScale : CGFloat) -> UIColor { | |
return UIColor(red: grayScale/255.0, green: grayScale/255.0, blue: grayScale/255.0, alpha: 1.0) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment