<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "InputMethodKit",
  "identifier" : "/documentation/InputMethodKit/IMKInputController/annotationSelected(_:forCandidate:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "InputMethodKit"
    ],
    "preciseIdentifier" : "c:objc(cs)IMKInputController(im)annotationSelected:forCandidate:"
  },
  "title" : "annotationSelected(_:forCandidate:)"
}
-->

# annotationSelected(_:forCandidate:)

Sends the selected candidate string and annotation string to the input controller.

```
func annotationSelected(_ annotationString: NSAttributedString!, forCandidate candidateString: NSAttributedString!)
```

## Parameters

`annotationString`

The annotation string associated with the candidate.

`candidateString`

The candidate string that the user moved to.

## Discussion

This method is called when the user moves to a candidate.

---

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)