---
title: "updateConfiguration(forElement:configuration:)"
framework: gamecontroller
role: symbol
role_heading: Instance Method
path: "gamecontroller/gcvirtualcontroller/updateconfiguration(forelement:configuration:)"
---

# updateConfiguration(forElement:configuration:)

Changes the configuration for one of the virtual controller’s input elements.

## Declaration

```swift
func updateConfiguration(forElement element: String, configuration config: (GCVirtualController.ElementConfiguration) -> GCVirtualController.ElementConfiguration)
```

## Parameters

- `element`: The element whose configuration you want to change. For the possible values of this parameter, see the doc://com.apple.gamecontroller/documentation/GameController/GCVirtualController/Configuration/elements property.
- `config`: The new configuration for the element.

## Mentioned in

Adding virtual controls to games that support game controllers in iOS

## See Also

### Customizing the elements

- [GCVirtualController.ElementConfiguration](gamecontroller/gcvirtualcontroller/elementconfiguration.md)
