Instance Method

makePlayer(with:)

Creates a standard haptic pattern player from a haptic pattern.

Declaration

func makePlayer(with pattern: CHHapticPattern) throws -> CHHapticPatternPlayer

Parameters

pattern

The haptic pattern you'd like the player to play.

outError

An error that contains information about failed player creation, or nil if no error occurred.

See Also

Creating Haptic Pattern Players

protocol CHHapticPatternPlayer

A protocol that defines a standard pattern player capable of playing haptic patterns with fixed parameters.

protocol CHHapticAdvancedPatternPlayer

A protocol that defines an advanced pattern player capable of looping, seeking, pausing, and resuming haptic playback.

func makeAdvancedPlayer(with: CHHapticPattern) -> CHHapticAdvancedPatternPlayer

Creates an advanced haptic pattern player from a haptic pattern.