Contents

pause(_:)

Pauses the provided workout session.

Declaration

func pause(_ workoutSession: HKWorkoutSession)

Parameters

  • workoutSession:

    The workout session to pause.

Discussion

This method pauses the provided session if it is currently running. The workout session’s state transitions to HKWorkoutSessionStatePaused, and the system generates an HKWorkoutEventType.pause event and passes it to the workout session delegate’s workoutSession:didGenerateEvent: method.

See Also

Managing workout sessions