Instance Property

isDeviceMotionAvailable

A Boolean value that indicates whether the device-motion service is available on the device.

Declaration

var isDeviceMotionAvailable: Bool { get }

Discussion

The device-motion service is available if a device has both an accelerometer and a gyroscope. Because all devices have accelerometers, this property is functionally equivalent to isGyroAvailable.

See Also

Determining the Availability of Services

var isAccelerometerAvailable: Bool

A Boolean value that indicates whether an accelerometer is available on the device.

var isGyroAvailable: Bool

A Boolean value that indicates whether a gyroscope is available on the device.

var isMagnetometerAvailable: Bool

A Boolean value that indicates whether a magnetometer is available on the device.