Skip to content

Instantly share code, notes, and snippets.

@haarismuneer
Last active October 4, 2017 15:36
Show Gist options
  • Save haarismuneer/b3a4cae2b40bac5207214bba01955b64 to your computer and use it in GitHub Desktop.
Save haarismuneer/b3a4cae2b40bac5207214bba01955b64 to your computer and use it in GitHub Desktop.
Generating a random UIColor in Swift in 1 line of code
let color = UIColor(red: CGFloat(drand48()), green: CGFloat(drand48()), blue: CGFloat(drand48()), alpha: 1.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment