When I run the following code, I get the error "Cannot call value of non function type 'MKMapItem?'
request.source(MKMapItem.mapItemForCurrentLocation())
It worked fine in swift 1.2 what has changed ?
In Swift 2 (Xcode Beta 5), source
is now a property of MKDirectionsRequest
:
Hence, instead of:
request.source(MKMapItem.mapItemForCurrentLocation())
It is now:
request.source = MKMapItem.mapItemForCurrentLocation()