SKGyroscopeData

Objective-C

@interface SKGyroscopeData : SKSensorData

Swift

class SKGyroscopeData : SKSensorData

An instance of SKGyroscopeData encapsulates measurements related to the Gyroscope sensor.

  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (instancetype)init NS_UNAVAILABLE;
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSensorType:(SKSensorType)sensorType
                                     timestamp:
                                         (nonnull SKSensorTimestamp *)timestamp;
  • Returns an SKGyroscopeData object, initialized with a CMRotationRate structure.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithGyroData:(nonnull CMGyroData *)gyroData;

    Swift

    init(gyroData: CMGyroData)

    Parameters

    gyroData

    A structure that contains 3-axis rotation rate data.

    Return Value

    An SKGyroscopeData object

  • A structure that contains 3-axis rotation rate data.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CMRotationRate rotationRate;

    Swift

    var rotationRate: CMRotationRate { get }
  • A string with a CSV formatted header that describes the data of the Gyroscope sensor. This method is useful in combination with the csvString instance method of an SKSensorData object.

    Declaration

    Objective-C

    + (nonnull NSString *)csvHeader;

    Swift

    class func csvHeader() -> String

    Return Value

    A string with a CSV header.