<!--
{
  "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/GCGamepadValueChangedHandler",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Game Controller"
    ],
    "preciseIdentifier" : "c:@T@GCGamepadValueChangedHandler"
  },
  "title" : "GCGamepadValueChangedHandler"
}
-->

# GCGamepadValueChangedHandler

Signature for the block executed if any element in the gamepad profile changes value.

```
typealias GCGamepadValueChangedHandler = (GCGamepad, GCControllerElement) -> Void
```

## Discussion

The block parameters are defined as follows:

- `gamepad`: The profile object whose value changed.
- `element`: The element whose value changed.

If multiple elements change values at the same time, the block is called once for each element that changed. The block is called only for the elements directly attached to the profile object; if a child element of one of those elements changes values, the block is called for the parent.

This block type is used by the [`valueChangedHandler`](/documentation/GameController/GCGamepad/valueChangedHandler) property.

---

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)