Type Alias

CMAltitudeHandler

A block for receiving altitude data.

Declaration

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

Discussion

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:

altitudeData

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

error

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