Instance Method


Starts accelerometer updates without a handler.


func startAccelerometerUpdates()


You can get the latest accelerometer data through the accelerometerData property. You must call stopAccelerometerUpdates() when you no longer want your app to process accelerometer updates.

See Also

Managing Accelerometer Updates

var accelerometerUpdateInterval: TimeInterval

The interval, in seconds, for providing accelerometer updates to the block handler.

func startAccelerometerUpdates(to: OperationQueue, withHandler: CMAccelerometerHandler)

Starts accelerometer updates on an operation queue and with a specified handler.

func stopAccelerometerUpdates()

Stops accelerometer updates.

var accelerometerData: CMAccelerometerData?

The latest sample of accelerometer data.

typealias CMAccelerometerHandler

The type of block callback for handling accelerometer data.