1
我想根據我的地理位置獲取城市名稱。問題是我在這個方法中得到了標題的編譯時錯誤。我做錯了什麼?kABPersonAddressCityKey未聲明的問題
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark
{
MKPlacemark * myPlacemark = placemark;
// with the placemark you can now retrieve the city name
NSString *city = [myPlacemark.addressDictionary objectForKey:(NSString*) kABPersonAddressCityKey];
}
謝謝,就是這樣:) – 1110 2010-12-22 09:55:17