#iOS# 获得城市名

- (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];
     }];
}

你可能感兴趣的:(#iOS# 获得城市名)