Contents

UIListContentView

A content view for displaying list-based content.

Declaration

@MainActor class UIListContentView

Overview

You use a list content view for displaying list-based content in a custom view hierarchy. You can embed a list content view manually in a custom cell or in a container view, like a UIStackView. You can use Auto Layout or manual layout techniques to size and position the view, and its height adjusts dynamically according to its width and the space it needs to display its content.

A list content view relies on its list content configuration to supply its styling and content. You create a list content view by passing in a UIListContentConfiguration to init(configuration:) (Swift) or initWithConfiguration: (Objective-C). To update the content view, you set a new configuration on it through its configuration property.

If you’re using a UICollectionView or UITableView, you don’t need to manually create a list content view to take advantage of the list configuration. Instead, you assign a UIListContentConfiguration to the contentConfiguration property of the cells, headers, or footers within those types.

Topics

Creating a list content view

Managing the content layout

See Also

Content configurations