Ios 使用reverseGeocodeLocation获取完整的邮政编码

Ios 使用reverseGeocodeLocation获取完整的邮政编码,ios,zipcode,Ios,Zipcode,我使用ReverseGeoLocation从中获取邮政编码,但是,它只返回五位数字,例如:94112。但在巴西,我们有八位数字的邮政编码,例如08750630,但结果是08750 如何解决这个问题?可能吗 我的代码: - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)

我使用ReverseGeoLocation从中获取邮政编码,但是,它只返回五位数字,例如:94112。但在巴西,我们有八位数字的邮政编码,例如08750630,但结果是08750

如何解决这个问题?可能吗

我的代码:

- (void)locationManager:(CLLocationManager *)manager
    didUpdateToLocation:(CLLocation *)newLocation
           fromLocation:(CLLocation *)oldLocation {

    CLLocationCoordinate2D coords = newLocation.coordinate;

    lastLat = coords.latitude;
    lastLng = coords.longitude;

    CLGeocoder *reverse = [[CLGeocoder alloc] init];
    CLLocation *location = [[CLLocation alloc] initWithLatitude:coords.latitude
                                                      longitude:coords.longitude];
    lastAccuracy = newLocation.horizontalAccuracy;
    lblAccuracy.text = [NSString stringWithFormat:@"%f",lastAccuracy];

    if(lastAccuracy <= 10)
    {
        [reverse reverseGeocodeLocation:location
                      completionHandler:^(NSArray *placemarks, NSError *error) {
                          if ([placemarks count] > 0) {
                              CLPlacemark *place = [placemarks objectAtIndex:0];
                              strCEP = place.postalCode;
                              strLastSubLocation = place.subLocality;
                              strLastLocation = place.locality;
                              strEndereco = place.thoroughfare;
                              lblEndereco.text = strEndereco;
                              ];
                          }
                      }];
    }

从CLPlacemark访问addressDictionary属性时,可以获取完整的邮政编码

在这个NSDictionary中,我们可以从关键字:ZIP和PostCodeExtension的值中获得所需的信息