---
title: changedElements()
framework: gamecontroller
role: symbol
role_heading: Instance Method
path: gamecontroller/gcdevicephysicalinputstatediff/changedelements()-9cdq4
---

# changedElements()

Returns the elements that changed since the previous input state.

## Declaration

```swift
func changedElements() -> NSEnumerator?
```

## Return Value

Return Value An enumerator that contains the changed elements in no particular order.

## Discussion

Discussion Returns nil if there’s no previous input state, either because this is the first input state or Game Controller discards the prior input state because the queue is full.

## See Also

### Getting changes

- [change(for:)](gamecontroller/gcdevicephysicalinputstatediff/change(for:).md)
- [GCDevicePhysicalInputElementChange](gamecontroller/gcdevicephysicalinputelementchange.md)
- [changedElements()](gamecontroller/gcdevicephysicalinputstatediff/changedelements()-2zzwm.md)
