I have one more problem with MapKit / MKDirections.
After everything worked well, Swift 2.0 appeared, and 'calculateDirectionsWithCompletionHandler', which looks like this:
directions.calculateDirectionsWithCompletionHandler({(response:
MKDirectionsResponse!, error: NSError!) in
if error != nil {
println("Error getting directions")
} else {
self.showRoute(response)
}
})
does not work any more. This gives me this error on line 1:
'(MKDirectionsResponse!, NSError!) -> Void' is not convertible to 'MKDirectionsHandler' (aka '(Optional<MKDirectionsResponse>, Optional<NSError>) -> ()')
Before the update, this worked fine. Thanks in advance for your help! :-)
source
share