Skip to content

Instantly share code, notes, and snippets.

@kaneshin
Created February 5, 2014 10:33
Show Gist options
  • Save kaneshin/8820867 to your computer and use it in GitHub Desktop.
Save kaneshin/8820867 to your computer and use it in GitHub Desktop.
逆ジオ
#pragma mark - CLLocationManagerDelegate
- (void)locationManager:(CLLocationManager *)manager
didUpdateLocations:(NSArray *)locations
{
[manager stopUpdatingLocation];
DLog(@"location %@", locations);
CLGeocoder *geocoder = [[CLGeocoder alloc] init];
[geocoder reverseGeocodeLocation:locations[0] completionHandler:^(NSArray *placemarks, NSError *error) {
CLPlacemark *placemark = placemarks[0];
DLog(@"Reverse: %@", placemark.name);
}];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment