Type Alias


A block for receiving altitude data.


typealias CMAltitudeHandler = (CMAltitudeData?, Error?) -> Void


You pass a block of this type to the altimeter object’s startRelativeAltitudeUpdates(to:withHandler:) method when starting the delivery of altitude data. This block has no return value and takes the following parameters:


The relative change in altitude data. If there was an error generating the data, this parameter is nil.


An error object if an error occurred or nil if the data was delivered successfully. When an error occurs, you can use the information in the provided object to try and recover or to alert the user.

See Also

Starting and Stopping Altitude Updates

func startRelativeAltitudeUpdates(to: OperationQueue, withHandler: CMAltitudeHandler)

Starts the delivery of altitude data to the specified handler block.

func stopRelativeAltitudeUpdates()

Stops the delivery of altitude data for this altimeter object