Contents

init(eventType:parameters:relativeTime:duration:)

Initializes a haptic event of the specified type, parameters, start time, and duration.

Declaration

init(eventType type: CHHapticEvent.EventType, parameters eventParams: [CHHapticEventParameter], relativeTime time: TimeInterval, duration: TimeInterval)

Parameters

  • type:

    The type of the haptic event: transient or continuous.

  • eventParams:

    An array of event parameters to characterize the haptic event.

  • time:

    The start time of the haptic event, in seconds.

  • duration:

    The duration of the haptic event, in seconds.

See Also

Creating Haptic Events