CMMotionActivity
The data for a single motion update event.
Declaration
class CMMotionActivityOverview
On devices that support motion, you can use a CMMotionActivityManager or CMHeadphoneActivityManager object to request updates when the current type of motion changes. When a change occurs, the update information is packaged into a CMMotionActivity object and sent to your app.
The motion-related properties of this class aren’t mutually exclusive. In other words, it’s possible for more than one of the motion-related properties to contain the value true. For example, if the user was driving in a car and the car stopped at a red light, the update event associated with that change in motion would have both the automotive and stationary properties set to true. It’s also possible for all of the properties to be set to false when the device is in motion but the movement doesn’t correlate to walking, running, cycling, or automotive travel.
You don’t create instances of this class yourself. The CMMotionActivityManager object creates them and sends them to the handler block you registered. For more information about how to initiate the delivery of motion activity updates to your app, see CMMotionActivityManager.