<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSScrubberDataSource",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSScrubberDataSource"
  },
  "title" : "NSScrubberDataSource"
}
-->

# NSScrubberDataSource

A set of methods that a scrubber data source object implements to provide items to the scrubber from an associated data collection in your app.

```
protocol NSScrubberDataSource : NSObjectProtocol
```

## Topics

### Getting the scrubber metrics

[`-  numberOfItemsForScrubber:`](/documentation/AppKit/NSScrubberDataSource/numberOfItems(for:))

Asks the data source for the number of items in the scrubber.

### Getting views for items

[`-  scrubber:viewForItemAtIndex:`](/documentation/AppKit/NSScrubberDataSource/scrubber(_:viewForItemAt:))

Asks the data source object for the view the corresponds to the specified item in the scrubber.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)