Class

TVTopShelfItem

An item that uses an image to represent a movie, show, or other content in the top shelf.

Declaration

@interface TVTopShelfItem : TVTopShelfObject

Overview

A TVTopShelfItem object manages basic traits for all items, including the images they display and the actions they trigger. Typically, you create TVTopShelfCarouselItem or TVTopShelfSectionedItem objects for your interface. For inset interfaces, you can also create TVTopShelfItem objects directly.

After creating an item object, assign an image and one or more actions to it, and update any other relevant properties. Return the item object as part of the content for your interface.

Each unique item in your app must have a correspondingly unique identifier, and the identifier for each item must remain stable throughout the life of your app. Do not assign a different unique identifier for the same underlying item each time you create a TVTopShelfItem object for it.

Topics

Creating a Top Shelf Item

- initWithIdentifier:

Creates a top shelf item with the specified identifier.

Assigning Actions to the Item

playAction

The action to perform when the user wants to play the current item.

displayAction

The action to perform when the user wants to see more information for the current item.

Providing an Image for the Item

- imageURLForTraits:

Returns an image associated with the current item.

- setImageURL:forTraits:

Associates an image with the current item.

TVTopShelfItemImageTraits

Constants describing the image format.

Getting the Item Attributes

identifier

The unique identifier for the item.

expirationDate

The date on which the item becomes unavailable.

Relationships

Inherits From

See Also

Common Types

TVTopShelfAction

An action to perform in response to user interactions with an item in the top shelf.

TVTopShelfContent

The protocol adopted by objects that provide content for the top shelf.

TVTopShelfObject

An abstract base class for describing top shelf items and item collections.