Created
November 3, 2016 14:11
-
-
Save mr-fixit/681145cfe4c13b5a95adee8de4160c56 to your computer and use it in GitHub Desktop.
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
func random1() -> CGFloat { | |
return CGFloat(arc4random()) / CGFloat(UINT32_MAX) | |
} | |
extension UIColor { | |
static func random() -> UIColor { | |
return UIColor.init(red: random1(), green: random1(), blue: random1(), alpha: 0.1) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment