iOSMotion

From Xojo Documentation

Class (inherits from Object)

New in 2016r2

iOSMotion provides motion updates from the device. These motion updates from iOS are combined from both the accelerometer and gyroscope.

Properties
Enabled Pitch fa-lock-32.png UpdateInterval fa-lock-32.png
GravityAccelerationX fa-lock-32.png Roll fa-lock-32.png UserAccelerationX fa-lock-32.png
GravityAccelerationY fa-lock-32.png RotationRateX fa-lock-32.png UserAccelerationY fa-lock-32.png
GravityAccelerationZ fa-lock-32.png RotationRateY fa-lock-32.png UserAccelerationZ fa-lock-32.png
Handle fa-lock-32.png RotationRateZ fa-lock-32.png Yaw fa-lock-32.png
Shared Methods
GetObject

Notes

Only one iOSMotion object can be created per application for performance reasons. To get this object, use the GetObject shared method. You cannot create a new iOSMotion instance using "New iOSMotion".

You can check and compare the property values at specific points in your code or regularly using a Timer. To save on battery, you should disable motion detection when it is not needed.

The motion properties below return real values only when the Enabled property is True. Otherwise, they return 0.

fa-info-circle-32.png
The iOS Simulator does not provide motion data, so you will need to test on an app running on an actual device to see how these property values change.

See Also

CMMotionManager