Skip to content

Commit 40777d9

Browse files
committed
Seed drand48 for better color randomization
1 parent cdb26eb commit 40777d9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

UIImageView+Letters/UIImageView+Letters.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ - (UIFont *)fontForFontName:(NSString *)fontName {
114114

115115
- (UIColor *)randomColor {
116116

117+
srand48(arc4random());
118+
117119
float red = 0.0;
118120
while (red < 0.1 || red > 0.84) {
119121
red = drand48();

0 commit comments

Comments
 (0)