Instance Property

stoppedHandler

A block that the haptic engine calls when it stops due to external causes.

Declaration

var stoppedHandler: CHHapticEngine.StoppedHandler { get set }

Discussion

External causes that can trigger this block include audio session interruption, application suspension, or system error. Calling stop(completionHandler:) doesn't trigger this block.

Callbacks to this block arrive on a non-main thread, so handle them in a thread-safe manner.

See Also

Handling Haptic Engine Stoppages

typealias CHHapticEngine.StoppedHandler

A typealias for the block that the haptic engine calls after it stops due to external causes.

enum CHHapticEngine.StoppedReason

An enumeration of possible reasons the haptic engine stopped running.