---
title: "scrubber(_:didHighlightItemAt:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsscrubberdelegate/scrubber(_:didhighlightitemat:)"
---

# scrubber(_:didHighlightItemAt:)

Tells the delegate that the item at the specified index was highlighted.

## Declaration

```swift
@MainActor optional func scrubber(_ scrubber: NSScrubber, didHighlightItemAt highlightedIndex: Int)
```

## Parameters

- `scrubber`: The scrubber object that is notifying you of the highlight change.
- `highlightedIndex`: The index of the item that is now highlighted.

## See Also

### Handling item selection and highlighting

- [scrubber(_:didSelectItemAt:)](appkit/nsscrubberdelegate/scrubber(_:didselectitemat:).md)
