---
title: "candidateListTouchBarItem(_:endSelectingCandidateAt:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscandidatelisttouchbaritemdelegate/candidatelisttouchbaritem(_:endselectingcandidateat:)"
---

# candidateListTouchBarItem(_:endSelectingCandidateAt:)

Tells the delegate that a user has stopped touching candidates in the candidate list item.

## Declaration

```swift
@MainActor optional func candidateListTouchBarItem(_ anItem: NSCandidateListTouchBarItem<AnyObject>, endSelectingCandidateAt index: Int)
```

## Parameters

- `anItem`: The candidate list item that the user is interacting with.
- `index`: The index of the candidate that the user was touching when they lifted their finger.

## Discussion

Discussion If index is equal to NSNotFound then the user didn’t select a candidate.

## See Also

### Handling selection changes

- [candidateListTouchBarItem(_:beginSelectingCandidateAt:)](appkit/nscandidatelisttouchbaritemdelegate/candidatelisttouchbaritem(_:beginselectingcandidateat:).md)
- [candidateListTouchBarItem(_:changeSelectionFromCandidateAt:to:)](appkit/nscandidatelisttouchbaritemdelegate/candidatelisttouchbaritem(_:changeselectionfromcandidateat:to:).md)
