Skip to content

Instantly share code, notes, and snippets.

@kgleeson
Created October 28, 2013 17:01
Show Gist options
  • Select an option

  • Save kgleeson/7200594 to your computer and use it in GitHub Desktop.

Select an option

Save kgleeson/7200594 to your computer and use it in GitHub Desktop.
-(void) createDictionaryFromTimers {
timersDict = [[NSMutableDictionary alloc] init];
NSArray *keys = [NSArray arrayWithObjects:@"name",
@"steep",
@"brew",
nil];
for (id item in coffeeTimers) {
NSArray *values = [NSArray arrayWithObjects:[item title],
[item steepTime],
[item brewTime],
nil];
NSMutableDictionary *timerDict = [NSMutableDictionary dictionaryWithObjects:values
forKeys:keys];
[timersDict setValue:timerDict
forKey:[NSString stringWithFormat:@"%@", [item title]]];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment