Contents

TVMediaItemContentView

A view that represents media content, such as movies and TV shows.

Declaration

class TVMediaItemContentView

Overview

The following code illustrates how to update the configuration for a wide media item:

override func updateConfiguration(using state: UICellConfigurationState) {
    var configuration = TVMediaItemContentConfiguration.wideCell().updatedConfiguration(for: state)

    configuration.image = coverArtImage
    configuration.text = // The title of the media content.
    configuration.secondaryText = "S1, E1"
    configuration.playbackProgress = 0.4
    configuration.badgeText = "Live"
    configuration.badgeProperties = TVMediaItemContentConfiguration.BadgeProperties.liveContent()

    self.contentConfiguration = configuration
}

Topics

Creating a Media Item Content View

Managing the Content Layout

See Also

Content views