SKMagnetometerData
Objective-C
@interface SKMagnetometerData : SKSensorData
Swift
class SKMagnetometerData : SKSensorData
An instance of SKMagnetometerData encapsulates measurements related to the Magnetometer 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 SKMagnetometerData object, initialized with a CMMagnetometerData structure.
Declaration
Objective-C
- (nonnull instancetype)initWithMagnetometerData: (nonnull CMMagnetometerData *)magnetometerData;Swift
init(magnetometerData: CMMagnetometerData)Parameters
magnetometerDataA structure that contains 3-axis magnetometer data.
Return Value
An SKMagnetometerData object.
-
A structure that contains 3-axis magnetometer data.
Declaration
Objective-C
@property (nonatomic, readonly) CMMagneticField magneticField;Swift
var magneticField: CMMagneticField { get } -
A string with a CSV formatted header that describes the data of the Magnetometer 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() -> StringReturn Value
A string with a CSV header.
View on GitHub