Class

GCControllerButtonInput

A control element measuring a button press.

Overview

A button element can either be analog or digital.

Topics

Reading the Button’s Value

var isPressed: Bool

A Boolean value that indicates whether the button is pressed.

var value: Float

The level of pressure being applied to the button.

Receiving Notifications When the Button’s Value Changes

var pressedChangedHandler: GCControllerButtonValueChangedHandler?

A handler to be called when the button is pressed or released.

var valueChangedHandler: GCControllerButtonValueChangedHandler?

A handler to be called when the pressure on a button changes.

Constants

typealias GCControllerButtonValueChangedHandler

Signature for the block executed if a button changes values.

Relationships

Inherits From

See Also

Input Elements

class GCControllerElement

An input associated with a physical control, such as a button or thumbstick.

class GCControllerAxisInput

A control element measuring movement along a particular axis.

class GCControllerDirectionPad

A control element associated with a directional pad or a thumbstick.