Class

GCControllerDirectionPad

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

Declaration

@interface GCControllerDirectionPad : GCControllerElement

Overview

This element does not provide values of its own. Instead, its values are provided by its child elements. It provides two sets of children that map to the same physical controls, so your app can view the directional pad as either either a pair of perpendicular axes (horizontal, vertical), or four button elements (up, down, left, right).

Topics

Reading the Directional Pad as a Pair of Axes

xAxis

The value of the directional pad along the horizontal axis (left and right).

yAxis

The value of the directional pad along the vertical axis (up and down).

Reading the Directional Pad as a Four Directional Buttons

up

A measurement of how far up the directional pad has been moved.

down

A measurement of how far down the directional pad has been moved.

left

A measurement of how far left the directional pad has been moved.

right

A measurement of how far right the directional pad has been moved.

Receiving Notifications When the Directional Pad’s Values Change

valueChangedHandler

A handler to be called when the directional pad element changes values.

Constants

GCControllerDirectionPadValueChangedHandler

Signature for the block executed when either axis changes values.

Relationships

Inherits From

See Also

Input Elements

GCControllerElement

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

GCControllerAxisInput

A control element measuring movement along a particular axis.

GCControllerButtonInput

A control element measuring a button press.