Last active
September 2, 2015 11:27
-
-
Save Tricertops/ea723f64160b4c71c9bb to your computer and use it in GitHub Desktop.
Objective-C method that returns Emoji symbol of a clock for any given hour.
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
- (NSString *)clockForHour:(NSUInteger)hour { | |
NSArray *clocks = @[ @"π", @"π", @"π", @"π", @"π", @"π", | |
@"π", @"π", @"π", @"π", @"π", @"π" ]; | |
NSUInteger index = hour % clocks.count; | |
return [clocks objectAtIndex:index]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment