A control element associated with a directional pad or a thumbstick.
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
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).
Reading the Directional Pad as a Pair of Axes
The value of the directional pad along the horizontal axis (left and right).
The value of the directional pad along the vertical axis (up and down).
Reading the Directional Pad as a Four Directional Buttons
A measurement of how far up the directional pad has been moved.
A measurement of how far down the directional pad has been moved.
A measurement of how far left the directional pad has been moved.
A measurement of how far right the directional pad has been moved.
Receiving Notifications When the Directional Pad’s Values Change
An input associated with a physical control, such as a button or thumbstick.