Contents

startDeviceMotionUpdates(using:)

Starts device-motion updates using a reference frame but without a block handler.

Declaration

func startDeviceMotionUpdates(using referenceFrame: CMAttitudeReferenceFrame)

Parameters

  • referenceFrame:

    A constant identifying the reference frame to use for device-motion updates. It’s your responsibility to specify a reference frame that’s available on the current device. Call Availableattitudereferenceframes() to determine which reference frames are currently available.

Discussion

You can get the latest device-motion data through the deviceMotion property. You must call stopDeviceMotionUpdates() when you no longer want your app to process device-motion updates.

See Also

Managing Device Motion Updates