I am trying to call a function called 'nextPage' in a guard statement, but it is saying '()' is not convertible to 'Bool'. What do I need to do in order to call this function
@IBAction func nextPressed(_ sender: Any) {
let geoCoder = CLGeocoder()
geoCoder.geocodeAddressString(address) { (placemarks, error) in
guard
let placemark = placemarks?.first,
let latVar = placemark.location?.coordinate.latitude,
let lonVar = placemark.location?.coordinate.longitude,
nextPage() // Error - '()' is not convertible to 'Bool'
else {
print("no location found")
return
}
}
}