2012-01-19 82 views

回答

6

做這樣的事情:

CLGeocoder *gc = [[[CLGeocoder alloc] init] autorelease]; 
[gc reverseGeocodeLocation:locationObject completionHandler:^(NSArray *placemark, NSError *error) { 
    CLPlacemark *pm = [placemark objectAtIndex:0]; 
    NSDictionary *address = pm.addressDictionary; 
    // do something with the address, see keys in the remark below 
}]; 

及相關文檔在這裏: http://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLPlacemark_class/Reference/Reference.html#//apple_ref/occ/instp/CLPlacemark/addressDictionary

相關問題