Created
August 7, 2017 13:26
-
-
Save oalansari82/df7789cdfb3159617cc1e79b97e92f12 to your computer and use it in GitHub Desktop.
Extension for UIColor in swift 3
This file contains hidden or 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
| // Create a new file called extension and add the following code to it | |
| extension UIColor { | |
| static func rgb(red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor { | |
| return UIColor(red: red/255, green: green/255, blue: blue/255, alpha: 1) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment