HKWorkoutEvent
An object representing an important event during a workout.
Declaration
class HKWorkoutEventOverview
You can use workout events to toggle a workout between an active and an inactive state, or to mark points of interest during a workout.
Workouts start in an active state. A pause event switches it to an inactive state; a resume event switches it back to an active state. Adding a pause event when the workout is already inactive, or a resume event when the workout is already active, does not affect the workout’s state. These events are ignored.
The lap, segment, and marker events are used to identify periods of interest during a workout. Use lap events to partition a workout into segments of equal distance. Segment events mark important periods during the workout, while markers identify important points in time.