SKMotionActivityData Class Reference
Inherits from | SKSensorData : NSObject |
---|---|
Declared in | SKMotionActivityData.h |
Overview
An instance of SKMotionActivityData encapsulates measurements related to the Motion Activity sensor. Activity is classified between Stationary, Walking, Running, Automotive, Cycling and Unknown.
– initWithSensorType:withTimestamp:
Returns an SKSensorData object, initialized with the given SKSensorType and SKSensorTimestamp.
- (instancetype)initWithSensorType:(SKSensorType)sensorType withTimestamp:(SKSensorTimestamp *)timestamp
Parameters
sensorType |
The type of the sensor that produced this data object. |
---|---|
timestamp |
The time were this data log was captured. |
Return Value
A new SKSensorData object.
Declared In
SKSensorData.h
– initWithMotionActivity:
Returns an SKMotionActivityData object, initialized with an instance of CMMotionActivity.
- (instancetype)initWithMotionActivity:(CMMotionActivity *)motionActivity
Parameters
motionActivity |
A CMMotionActivity object that contains data related to the Motion Activity sensor. |
---|
Return Value
An SKMotionActivityData object.
Declared In
SKMotionActivityData.h
motionActivity
An instance of CMMotionActivity object contains data about the measured motion activity, classified between Stationary, Walking, Running, Automotive, Cycling and Unknown.
@property (nonatomic, readonly, copy) CMMotionActivity *motionActivity
Declared In
SKMotionActivityData.h
startDate
Start date that the activity data are valid.
@property (nonatomic, readonly, copy) SKSensorTimestamp *startDate
Declared In
SKMotionActivityData.h
+ csvHeader
A string with a CSV formatted header that describes the data of the Activity sensor. This method is useful in combination with the csvString instance method of an SKSensorData object.
+ (NSString *)csvHeader
Return Value
A string with a CSV header.
Declared In
SKMotionActivityData.h