<!--
{
  "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/GCControllerButtonInput",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Game Controller"
    ],
    "preciseIdentifier" : "c:objc(cs)GCControllerButtonInput"
  },
  "title" : "GCControllerButtonInput"
}
-->

# GCControllerButtonInput

A control element that represents a button touch or press.

```
class GCControllerButtonInput
```

## Overview

A `GCControllerButtonInput` object represents a button on a controller that can report either analog or digital values.

## Topics

### Accessing input values

[`isTouched`](/documentation/GameController/GCControllerButtonInput/isTouched)

A Boolean value that indicates whether the user is touching the button.

[`isPressed`](/documentation/GameController/GCControllerButtonInput/isPressed)

A Boolean value that indicates whether the user is pressing the button.

[`value`](/documentation/GameController/GCControllerButtonInput/value)

The level of pressure the user is applying to the button.

### Getting change information

[`touchedChangedHandler`](/documentation/GameController/GCControllerButtonInput/touchedChangedHandler)

The block that the element calls when the user touches the button.

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

The signature for the block that executes when the user touches the button if the controller supports that feature.

[`pressedChangedHandler`](/documentation/GameController/GCControllerButtonInput/pressedChangedHandler)

The block that the element calls when the user presses or releases the button.

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

The block that the element calls when the user changes the level of pressure on the button.

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

The signature for the block that executes when a button’s state changes.

### Setting snapshot values

[`setValue(_:)`](/documentation/GameController/GCControllerButtonInput/setValue(_:))

Sets the pressure value of a snapshot of a button.



---

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)