placemark = [[MKPlacemark alloc]initWithCoordinate:storedCoordinate addressDictionary:addressDict];
我試圖創建字典上面使用的代碼,但沒有任何工程:(如何爲MKPlacemark創建addressDictionary?
NSDictionary *addressDict = [[NSDictionary alloc] initWithObjectsAndKeys:
location.countryCode, @"CountryCode",
location.country,@"kABPersonAddressCountryKey",
location.state, kABPersonAddressStateKey,
location.city, @"City",
location.street, kABPersonAddressStreetKey,
location.zip, kABPersonAddressZIPKey,
nil];
該國主要是在引號,但不應該。看[這個問題](http://stackoverflow.com/q/1923525/467105)。 – Anna
我只是顯示不同的變體,他們都不工作 – Shmidt
你能描述更多它不起作用嗎?例如,如果它崩潰什麼是錯誤信息?如果不是崩潰,那究竟是什麼?在init之後你如何處理地標變量? – Anna