Contents

playPattern(from:)

Plays a pattern from the specified data.

Declaration

func playPattern(from data: Data) throws

Parameters

  • data:

    The raw data containing the haptic pattern, structured as an AHAP dictionary.

Discussion

Start the engine prior to calling this method to provide low-latency playback. If the engine isn’t already running when you call this method, the system starts it, which can result in a significant playback delay.

See Also

Playing a Pattern