2015-09-22 7 views

ответ

1
//finding address given the coordinates 
    CLGeocoder().reverseGeocodeLocation(location, completionHandler: {(placemarks, error) -> Void in 

     if error != nil { 
      print("Reverse geocoder failed with error" + error!.localizedDescription) 
      return 
     } 

     if placemarks!.count > 0 { 
      let pm = placemarks![0] 

      print(pm.postalCode) //prints zip code 
     } 
     else { 
      print("Problem with the data received from geocoder") 
     } 
    }) 
+0

не работает в Ирландии http://stackoverflow.com/questions/41300811/what-can-i-do-where-postalcode-inforamtion-not-available –

Смежные вопросы