Created
February 28, 2012 11:26
-
-
Save pratikshabhisikar/1932018 to your computer and use it in GitHub Desktop.
Fetch Google Places
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
[googlePlaces fetchWithCompletionHandler:^(NSMutableSet *fetchedPlaces, NSError *error){ | |
if (fetchedPlaces) { | |
places = [[NSMutableArray alloc] initWithArray:[fetchedPlaces allObjects]]; | |
[self.tableView reloadData]; | |
}else { | |
if (error) { | |
// Optionally display error here. | |
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Sorry" message:[error localizedDescription] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; | |
[alert show]; | |
} | |
} | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment