<!--
{
  "availability" : [
    "tvOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TVServices",
  "identifier" : "/documentation/TVServices/TVTopShelfContentProvider/loadTopShelfContent(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "TV Services"
    ],
    "preciseIdentifier" : "c:objc(cs)TVTopShelfContentProvider(im)loadTopShelfContentWithCompletionHandler:"
  },
  "title" : "loadTopShelfContent(completionHandler:)"
}
-->

# loadTopShelfContent(completionHandler:)

Provides the content you want to display in the top shelf for your app.

```
func loadTopShelfContent(completionHandler: @escaping @Sendable ((any TVTopShelfContent)?) -> Void)
```

```
func loadTopShelfContent() async -> (any TVTopShelfContent)?
```

## Parameters

`completionHandler`

The handler block to execute with your content. This block has no return value and takes the following parameter:

- content: The object that describes the content you want to display in the top shelf interface. For example, to display your content in a carousel format, specify a [`TVTopShelfCarouselContent`](/documentation/TVServices/TVTopShelfCarouselContent) object with the items you want to display. Specify `nil` if you have no content to display or encounter an error.

## Discussion

> Important:
> You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration:
> 
> ```swift
> func loadTopShelfContent() async -> (any TVTopShelfContent)?
> ```
> 
> For information about concurrency and asynchronous code in Swift, see <doc://com.apple.documentation/documentation/Swift/calling-objective-c-apis-asynchronously>.

The system calls this method when it needs your app’s top shelf content. In your implementation, create the [`TVTopShelfItem`](/documentation/TVServices/TVTopShelfItem) objects you want to display and wrap them in a matching [`TVTopShelfContent`](/documentation/TVServices/TVTopShelfContent) object. The specific objects you create depends on how you want to display your content. You can display items using one of the following interface styles:

- A *carousel interface* displays [`TVTopShelfCarouselItem`](/documentation/TVServices/TVTopShelfCarouselItem) objects in a horizontal line. The user swipes left and right to navigate from item to item.
- A *sectioned interface* groups [`TVTopShelfSectionedItem`](/documentation/TVServices/TVTopShelfSectionedItem) objects together and presents them in a scrolling list.
- An *inset interface* organizes either carousel or sectioned items and insets them by a specified amount.

If you call the completionHandler with a `nil` value, the system displays a static image provided by your app.

---

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)