Skip to content

Instantly share code, notes, and snippets.

@aaronpearce
Created October 21, 2011 07:06
Show Gist options
  • Save aaronpearce/1303272 to your computer and use it in GitHub Desktop.
Save aaronpearce/1303272 to your computer and use it in GitHub Desktop.
[[result valueForKey:@"response"] enumerateObjectsUsingBlock:^(id object, NSUInteger idx, BOOL *stop) {
if([[[[object valueForKey:@"content"] valueForKey:@"result"] valueForKey:@"count"] objectAtIndex:0] != 0) {
[[[[object valueForKey:@"content"] valueForKey:@"result"] valueForKey:@"hits"] enumerateObjectsUsingBlock:^(id hit, NSUInteger idx, BOOL *stop) {
APAppDelegate *appDele = (APAppDelegate *)[[UIApplication sharedApplication] delegate];
APMasterViewController *amvc = [appDele.navigationController topViewController];
[amvc.dataSet addObject:hit]; // data set = nsmutablearray
[amvc.tableView reloadData];
}];
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment