Created
January 27, 2009 22:32
-
-
Save KirinDave/53613 to your computer and use it in GitHub Desktop.
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
| id pickRandom(NSArray *arr) { | |
| uint length = [arr count]; | |
| return [arr objectAtIndex:random() % length]; | |
| } | |
| -(void) changeGreeting:(id)sender { | |
| myLabel.font = [UIFont fontWithName:pickRandom([UIFont fontNamesForFamilyName:pickRandom([UIFont familyNames])]) size:36.0f]; | |
| myLabel.text = pickRandom(answers);//[answers objectAtIndex:random() % [answers count]]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment