Skip to content

Instantly share code, notes, and snippets.

@mortenjust
Last active December 29, 2015 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mortenjust/c947910a09c9ea426f4e to your computer and use it in GitHub Desktop.
Save mortenjust/c947910a09c9ea426f4e to your computer and use it in GitHub Desktop.
// https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLPlacemark_class/index.html#//apple_ref/occ/cl/CLPlacemark
CLGeocoder().reverseGeocodeLocation(location) { (placemarks, err) -> Void in
if let p = placemarks {
let address = p[0].name!
self.locationLabel.text = address
} else {
self.locationLabel.text = ""
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment