Last active
May 24, 2020 04:55
-
-
Save robertmryan/865f9c0b3068d8e6c8a2f99a1955ac75 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 generateRandomColors() -> [UIColor] { | |
var randomColors: [UIColor] = Array(repeating: .blue, count: .random(in: 0...10)) | |
randomColors += Array(repeating: .red, count: .random(in: 0...15)) | |
randomColors += Array(repeating: .yellow, count: .random(in: 0...25)) | |
randomColors += Array(repeating: .orange, count: 100 - randomColors.count) | |
return randomColors.shuffled() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment