Type Alias

CHHapticEngine.CompletionHandler

A typealias for the block that the engine calls after starting or stopping.

Declaration

typealias CompletionHandler = (Error?) -> Void

See Also

Starting and Stopping the Haptic Engine

func start()

Synchronously starts the haptic engine.

func start(completionHandler: CHHapticEngine.CompletionHandler?)

Asynchronously starts the haptic engine and executes the completion handler once the engine has started.

func stop(completionHandler: CHHapticEngine.CompletionHandler?)

Asynchronously stops the haptic engine and executes the completion handler once the engine has stopped.