I used the function geocodeAddressString which worked in swift 1.0, but not in swift2. Can anybody tell me what's wrong with my code and how i can fix this? Thank you!
geocoder.geocodeAddressString(address, {(placemarks: [AnyObject], error: NSError) -> Void in //Error: Missing argument for parameter 'completionHandler' in call
if let placemark = placemarks?[0] as? CLPlacemark {
let annotation = MKPointAnnotation()
let location:CLLocationCoordinate2D = CLLocationCoordinate2DMake(placemark.location.coordinate.latitude, placemark.location.coordinate.longitude)
annotation.coordinate = location
annotation.title = "\(StudentArray[student].firstName), \(StudentArray[student].lastName)"
annotation.subtitle = "\(StudentArray[student].grade)"
self.mapView.addAnnotation(annotation)
}
})