I get the error missing argument for parameter #1 in call when trying to call geocodeLocation in the viewDidLoad, this is kind of a random error or im doing something completely wrong?
override func viewDidLoad(){
super.viewDidLoad()
locationManager.delegate = self
locationManager.requestAlwaysAuthorization()
locationManager.startUpdatingLocation()
geocodeLocation() //Missing argument for parameter #1 in call
}
func geocodeLocation(location: String){
let geocode = CLGeocoder()
geocode.geocodeAddressString(location) { (objects, error) -> Void in
if error != nil {
print(error)
} else {
self.createActionSheet(objects!)
self.locationArray = objects
}
}
}
I don't understand what I have to add next, suggestions? I am trying to display a location on the map with a pin with the location coming from the class.