#iOS# 获得城市名
2016-01-12 本文已影响38人
puppyb2m
- (void)didUpdateBMKUserLocation:(BMKUserLocation *)userLocation
{
LGeocoder *reverseGeocoder = [[CLGeocoder alloc] init];
[reverseGeocoder reverseGeocodeLocation:userLocation.location completionHandler:^(NSArray *placemarks, NSError *error)
{
CLPlacemark *myPlacemark = [placemarks objectAtIndex:0];
NSString *cityName = myPlacemark.locality;
NSLog(@"My country code: %@", cityName);
_currentCityStr = cityName;
[_tableview reloadData];
[_locService stopUserLocationService];
}];
}