CMGyroData
An instance of the CMGyroData
class contains a single measurement of the device’s rotation rate.
More...
Conforms To

AnyObject

CVarArgType

Equatable

Hashable

NSCoding

NSCopying

NSObjectProtocol

NSSecureCoding

Printable

NSCopying

NSObject

NSSecureCoding
Import Statement
import CoreMotion
@import CoreMotion;
Availability
Available in iOS 4.0 and later.

rotationRate rotationRate
PropertyThe rotation rate as measured by the device’s gyroscope. (readonly)
Declaration
Swift
var rotationRate: CMRotationRate { get }
ObjectiveC
@property(readonly, nonatomic) CMRotationRate rotationRate
Discussion
This property yields a measurement of the device’s rate of rotation around three axes. Whereas this property gives the raw data from the gyroscope, the identically named property of
CMDeviceMotion
gives aCMRotationRate
structure measuring gyroscope data whose bias has been removed by Core Motion algorithms.Import Statement
import CoreMotion
Availability
Available in iOS 4.0 and later.
Data Types

The type of structures representing a measurement of rotation rate.
Declaration
ObjectiveC
typedef struct { double x; double y; double z; } CMRotationRate
Constants

x
x
The Xaxis rotation rate in radians per second. The sign follows the right hand rule: If the right hand is wrapped around the X axis such that the tip of the thumb points toward positive X, a positive rotation is one toward the tips of the other four fingers.

y
y
The Yaxis rotation rate in radians per second. The sign follows the right hand rule: If the right hand is wrapped around the Y axis such that the tip of the thumb points toward positive Y, a positive rotation is one toward the tips of the other four fingers.

z
z
The Zaxis rotation rate in radians per second. The sign follows the right hand rule: If the right hand is wrapped around the Z axis such that the tip of the thumb points toward positive Z, a positive rotation is one toward the tips of the other four fingers.
Import Statement
import CoreMotion
Availability
Available in iOS 4.0 and later.

Copyright © 2015 Apple Inc. All rights reserved. Terms of Use  Privacy Policy  Updated: 20100504