Answer the question
In order to leave comments, you need to log in
How to display my geoposition in textfield?
Good afternoon!
I'm making an educational geolocation app!
I want to transfer my geolocation to the text field by the button. I
wrote a function that takes the location and returns the addresses. Here I also want to transfer value of the address.
func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
print (locations)
let UserLocation:CLLocation = locations[0]
CLGeocoder().reverseGeocodeLocation(UserLocation) { (placemarks, error) -> Void in
if error != nil {
print(error)
} else {
let p = placemarks?.first
print p
}
}
}
@IBAction func MyLocationBtn(sender: AnyObject) {
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question