I'm currently trying to convert my Swift iOS app to Swift 2. I've removed 99% of compiler errors but this one remains:
Cannot convert value of type '(CMAltitudeData!, NSError!) -> Void' to expected argument type 'CMAltitudeHandler' (aka '(Optional, Optional) -> ()')
This is in response to this function:
func startAltimeterUpdate() {
self.altimeter.startRelativeAltitudeUpdatesToQueue(NSOperationQueue.currentQueue()!,
withHandler: { (altdata:CMAltitudeData!, error:NSError!) -> Void in
self.handleNewMeasure(pressureData: altdata)
})
}
I am having a hard time understanding this error... what on earth is Xcode trying to tell me here?