Class

WKCrownSequencer

An object that reports the current state of the digital crown, including its rotational speed when it is in motion.

Overview

Do not create instances of this class yourself. Instead, retrieve a crown sequencer object from the current interface controller’s crownSequencer property. Before the sequencer can receive data, you must call its focus() method. Only one object in your interface can have focus at any given time, so if your interface also contains picker objects or has scrollable scenes, you must coordinate changes in focus accordingly. For example, calling the sequencer’s focus() method causes any picker objects or interface controllers to resign focus. When the user taps on a picker object, the currently active sequencer resigns focus, and the selected picker object gains the focus. Because the crown sequencer is not tied to a specific interface object, you can use it as general input for your app.

Although the crown sequencer object has properties that contain the current state of the crown, it is more common to use a delegate object to receive notifications as the user rotates the crown. For more information on receiving data using a delegate, see WKCrownDelegate.

Symbols

Getting the Current Crown Status

var rotationsPerSecond: Double

The rotational speed of the crown, measured in rotations per second.

var isIdle: Bool

A Boolean value indicating whether the crown is at rest.

Accessing the Delegate

var delegate: WKCrownDelegate?

The object you use to monitor changes to the crown state.

Managing the Focus

func focus()

Begins the delivery of crown events to the current crown sequencer.

func resignFocus()

Ends the delivery of crown events to the current crown sequencer.

Relationships

Inherits From

Conforms To