---
title: selectionChanged()
framework: uikit
role: symbol
role_heading: Instance Method
path: uikit/uiselectionfeedbackgenerator/selectionchanged()
---

# selectionChanged()

Triggers selection feedback.

## Declaration

```swift
func selectionChanged()
```

## Discussion

Discussion This method tells the generator that the user has changed a selection. In response, the generator may play the appropriate haptics. Don’t use this feedback when the user makes or confirms a selection; use it only when the selection changes. For information on setting up a feedback generator, see the UIFeedbackGenerator class.

## See Also

### Related Documentation

- [prepare()](uikit/uifeedbackgenerator/prepare().md)

### Reporting selection changes

- [selectionChanged(at:)](uikit/uiselectionfeedbackgenerator/selectionchanged(at:).md)
