CLGeocoder *geocoder = [[CLGeocoder alloc]init];
[geocoder reverseGeocodeLocation:manager.Location completionHandler:^(NSArray *placemarks,NSError *error)
{
if([placemarks count]>0)
{
CLPlacemark *placemark = placemakes[0];
NSDictionary *addressDictionary = placemark.addressDictionary;
NSString *address = [addressDictionary objectForKey:@"Street"];
address = address == nil ?@"" : address
label.text = [NSString stringWithFormat :@"%@",address];
}
}
]
以上代码就可是实现地理位置的反编码了,要注意的是这边的反编码的测位只能是国内的,国外的话会返回一个error,模拟器上应该将模拟定位定到hongkong