Contents

init(type:date:)

Instantiates and returns a new workout event with the specified type and date.

Declaration

convenience init(type: HKWorkoutEventType, date: Date)

Parameters

  • type:

    The type of workout event. For a description of possible events, see Hkworkouteventtype.

  • date:

    The time when the transition occurred. For a pause event, this date indicates the start of the break. For a resume event, this date indicates the end of the break. You must use a date between the starting and ending dates of the workout that you intend to modify.

Return Value

A new workout event.

See Also

Deprecated