Initializer

init(events:parameterCurves:)

Constructs a haptic pattern from a series of events and parameter curves.

Declaration

init(events: [CHHapticEvent], parameterCurves: [CHHapticParameterCurve]) throws

Parameters

events

An array of events that make up the haptic pattern.

parameterCurves

An array of parameter curves that define how the haptic pattern's parameters change over time.

outError

Any error that occurs during haptic pattern initialization. If no error occurs, this value is nil.

See Also

Creating a Haptic Pattern

init(events: [CHHapticEvent], parameters: [CHHapticDynamicParameter])

Constructs a haptic pattern from a series of events and parameters.

init(dictionary: [CHHapticPattern.Key : Any])

Creates a haptic pattern from a property list dictionary.

struct CHHapticPattern.Key

The structural representation of a key to the pattern dictionary.