Created
July 3, 2015 06:00
-
-
Save bishalg/c8ede5ad49f0cf778dfb to your computer and use it in GitHub Desktop.
Random Shades of Gray UIColor - iOS Objective-C
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
- (UIColor *)randomColor { | |
CGFloat white = ( arc4random() % 90 / 256.0 ) + 0.3; // 0.35 - 0.65 | |
UIColor *color = [UIColor colorWithWhite:white alpha:1.0]; | |
return color; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment