如果您是從MKRevereseGeocoder
委託回調得到MKPlaceMark
對象返回您可以使用以下方法來打開標爲可讀地址:
NSLog(@"The geocoder has returned: %@", [placemark addressDictionary]);
//all elements returned
//you can get some object like coutry ,code ;code country ...
NSLog(@"country ::::%@",[placemark country]);
NSLog(@"countrycode ::::%@",[placemark countryCode]);
NSLog(@"postalcode ::::%@",[placemark postalcode]);
NSLog(@"street::::%@",[placemark thoroughfare]);
NSLog(@"streetinfo::::%@",[placemark administrativeArea]);
NSLog(@"streeteersub ::::%@",[placemark subAdministrativeArea]);
http://developer.apple.com/library/ios /#documentation/AddressBookUI/Reference/AddressBookUI_Functions/Reference/reference.html Apple建議:「您可以格式化此字典的內容以獲取完整的地址字符串,而不是自己創建地址。要格式化字典,請使用ABCreateStringWithAddressDictionary函數如地址簿UI函數參考中所述。「 – 2011-12-15 21:45:44
由於iOS 9.0'ABCreateStringWithAddressDictionary'已被棄用。 – mixel 2016-02-20 11:34:30