Structure

CHHapticPattern.Key

The structural representation of a key to the pattern dictionary.

Declaration

struct Key

Topics

Creating a Pattern Key

init(rawValue: String)

Initializes a pattern key from its raw string value.

static let version: CHHapticPattern.Key

The version number of the haptic pattern dictionary.

Characterizing a Pattern Key

static let pattern: CHHapticPattern.Key

A key indicating the beginning of a haptic pattern definition.

static let event: CHHapticPattern.Key

A key indicating the beginning of a haptic event definition.

static let eventType: CHHapticPattern.Key

A key indicating the type of event, specified as a CHHapticEvent.EventType.

static let eventDuration: CHHapticPattern.Key

A key indicating the duration of an event.

static let eventParameters: CHHapticPattern.Key

A key indicating the beginning of an array of fixed parameter parameter definitions.

static let parameter: CHHapticPattern.Key

A key indicating the beginning of a parameter definition.

static let parameterID: CHHapticPattern.Key

A key indicating the parameter ID.

static let parameterValue: CHHapticPattern.Key

A key indicating the value of a parameter, specified as a real number.

static let time: CHHapticPattern.Key

A key indicating the relative time for an event or parameter, in seconds.

static let parameterCurve: CHHapticPattern.Key

A key indicating the beginning of a parameter curve definition.

static let parameterCurveControlPoints: CHHapticPattern.Key

A key indicating the control points of a parameter curve.

static let eventWaveformPath: CHHapticPattern.Key

A key indicating the path to the local file containing the audio waveform, for events of type audioCustom.

Relationships

See Also

Creating a Haptic Pattern

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

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

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.