Instance Method

start()

Synchronously starts the haptic engine.

Declaration

func start() throws

Parameters

outError

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

Discussion

This method blocks all subsequent event processing on the current thread until the engine has started. It throws an error if the engine can't start.

See Also

Starting and Stopping 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.

typealias CHHapticEngine.CompletionHandler

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