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


class TVTopShelfAction : NSObject


A TVTopShelfAction object contains the URL that you want tvOS to open when the user selects an item in the top shelf. Use actions to specify the location of playable content or pages containing additional information.

When configuring items for a carousel interface, you can specify a custom title and image for the buttons in that interface. If you do not specify a custom title and image, the system chooses default values based on whether you assigned the action object to the playAction or displayAction property of your item.


Creating an Action Object

init(url: URL)

Creates a new action object that displays the content at the specified URL.

Getting the URL

var url: URL

The URL of the content you want to display.


Inherits From

Conforms To

See Also

Common Types

class TVTopShelfItem

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

protocol TVTopShelfContent

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

class TVTopShelfObject

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