<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Messages",
  "identifier" : "/documentation/Messages/MSStickerBrowserViewDataSource",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Messages"
    ],
    "preciseIdentifier" : "c:objc(pl)MSStickerBrowserViewDataSource"
  },
  "title" : "MSStickerBrowserViewDataSource"
}
-->

# MSStickerBrowserViewDataSource

The protocol for dynamically providing stickers to a browser view.

```
protocol MSStickerBrowserViewDataSource : NSObjectProtocol
```

## Overview

To load its stickers, the [`MSStickerBrowserView`](/documentation/Messages/MSStickerBrowserView) class performs the following steps:

1. The browser calls the data source’s [`numberOfStickers(in:)`](/documentation/Messages/MSStickerBrowserViewDataSource/numberOfStickers(in:)) method to get the number of stickers.
2. The browser repeatedly calls the data source’s [`stickerBrowserView(_:stickerAt:)`](/documentation/Messages/MSStickerBrowserViewDataSource/stickerBrowserView(_:stickerAt:)) method to load the individual stickers. Initially, the browser requests only enough stickers to fill the screen. The browser requests additional stickers as the user scrolls and new stickers become visible.

Both methods are required. If the sticker collection changes at runtime, call the [`MSStickerBrowserView`](/documentation/Messages/MSStickerBrowserView) class’s [`reloadData()`](/documentation/Messages/MSStickerBrowserView/reloadData()) method to reload the stickers.

## Topics

### Providing Stickers

[`-  numberOfStickersInStickerBrowserView:`](/documentation/Messages/MSStickerBrowserViewDataSource/numberOfStickers(in:))

Asks the data source for the number of stickers that the browser will display.

[`-  stickerBrowserView:stickerAtIndex:`](/documentation/Messages/MSStickerBrowserViewDataSource/stickerBrowserView(_:stickerAt:))

Asks the data source for the sticker object that the browser will display at the provided index.

## Relationships

### Inherits From

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

### Conforming Types

[`MSStickerBrowserViewController`](/documentation/Messages/MSStickerBrowserViewController)

---

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)