---
title: "candidateSelected(_:)"
framework: InputMethodKit
role: symbol
role_heading: Instance Method
platforms: [macOS 10.5+]
path: "inputmethodkit/imkinputcontroller/candidateselected(_:)"
---

# candidateSelected(_:)

Informs an input controller that a new candidate is selected.

## Declaration

```swift
func candidateSelected(_ candidateString: NSAttributedString!)
```

## Parameters

- `candidateString`: The changed candidate string.

## Discussion

Discussion The candidate object is the user’s final choice from the candidate window. The candidate window is closed before this method is called.

## See Also

### Tracking Selections

- [annotationSelected(_:forCandidate:)](inputmethodkit/imkinputcontroller/annotationselected(_:forcandidate:).md)
- [candidateSelectionChanged(_:)](inputmethodkit/imkinputcontroller/candidateselectionchanged(_:).md)
