<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/GCControllerDirectionPad",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Game Controller"
    ],
    "preciseIdentifier" : "c:objc(cs)GCControllerDirectionPad"
  },
  "title" : "GCControllerDirectionPad"
}
-->

# GCControllerDirectionPad

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

```
class GCControllerDirectionPad
```

## Overview

You get the input values for this element from its subelements. You can use either the [`xAxis`](/documentation/GameController/GCControllerDirectionPad/xAxis) and [`yAxis`](/documentation/GameController/GCControllerDirectionPad/yAxis) properties to get coordinates, or the [`up`](/documentation/GameController/GCControllerDirectionPad/up), [`down`](/documentation/GameController/GCControllerDirectionPad/down), [`left`](/documentation/GameController/GCControllerDirectionPad/left), and [`right`](/documentation/GameController/GCControllerDirectionPad/right) buttons that simulate directional pad buttons.

## Topics

### Accessing values using the axes

[`xAxis`](/documentation/GameController/GCControllerDirectionPad/xAxis)

The x-axis element of the directional pad.

[`yAxis`](/documentation/GameController/GCControllerDirectionPad/yAxis)

The y-axis element of the directional pad.

### Accessing values using directional buttons

[`right`](/documentation/GameController/GCControllerDirectionPad/right)

The button element that changes the positive x-axis.

[`left`](/documentation/GameController/GCControllerDirectionPad/left)

The button element that changes the negative x-axis.

[`up`](/documentation/GameController/GCControllerDirectionPad/up)

The button element that changes the positive y-axis.

[`down`](/documentation/GameController/GCControllerDirectionPad/down)

The button element used for the negative y-axis direction.

### Getting change information

[`valueChangedHandler`](/documentation/GameController/GCControllerDirectionPad/valueChangedHandler)

The block that the directional pad calls when the user changes its values.

[`GCControllerDirectionPadValueChangedHandler`](/documentation/GameController/GCControllerDirectionPadValueChangedHandler)

The signature for the block that executes when either axis changes values.

### Setting snapshot values

[`setValueForXAxis(_:yAxis:)`](/documentation/GameController/GCControllerDirectionPad/setValueForXAxis(_:yAxis:))

Sets the input values of a snapshot of a directional pad.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)