Contents

TVMonogramContentView

A view that contains a circular image of a person or the person’s initials.

Declaration

class TVMonogramContentView

Overview

The system provides a generic placeholder image if image is nil. If personNameComponents isn’t nil, the system creates a localized monogram image using the first initials from the name components.

[Image]

The following code illustrates how to update the configuration for a monogram:

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

    configuration.image = avatarImage
    configuration.text = "Anne Johnson"
    configuration.secondaryText = "Actor"
    configuration.personNameComponents = nameComponents

    self.contentConfiguration = configuration
}

Topics

Creating a Monogram Content View

Managing the Content Layout

See Also

Content views