나는 또한 두 글자 약어로 MKReverseGeocoder에서 상태 필드를 변환하는 데 필요한, 그래서이 PLIST 생성 :
이
// in my init
NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"USStateAbbreviations" ofType:@"plist"];
self.usStateAbbreviations = [[NSDictionary alloc] initWithContentsOfFile:plistPath];
// MKReverseGeocoder delegate method
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark {
...
NSString *state = [address objectForKey:@"State"];
NSString *stateAbbreviation = [self.usStateAbbreviations objectForKey:[state uppercaseString]];
NSString *stateTarget = state;
if (stateAbbreviation) {
stateTarget = stateAbbreviation;
}
...
}
그래, 그건 :
https://github.com/djibouti33/US-State-Abbreviations 다음
내가 그것을 사용하는 방법을 내가 생각한 것. 확인을위한 감사함 : D. – RayJ