Contents

UICollectionViewListCell

A collection view cell that provides list features and default styling.

Declaration

@MainActor class UICollectionViewListCell

Overview

A list cell represents an individual item that might appear in a list. List cells provide built-in support for indentation, and the ability to add cell accessories (UICellAccessory) for visual adornment or to support user interactions with the cell.

You can use a list cell in any type of layout. Using a list cell inside a list enables additional list-specific behavior for the cells. For example, in a list section or layout, you can define separator alignment between list cells, and configure swipe actions for each cell’s leading and trailing edges. You create an individual list section using list(using:layoutEnvironment:), or a full list layout using list(using:).

You can use a list cell’s defaultContentConfiguration() (Swift) or defaultContentConfiguration (Objective-C) to get a list content configuration that has preconfigured default styling. After you get the default configuration, you assign your content to it, customize any other properties, and assign it to the cell as the current content configuration. For customization options, see UIListContentConfiguration.

Alternatively, you can set your content through your own custom subviews using the cell’s contentView.

Topics

Getting a configuration

Managing cell accessories

Customizing layout

See Also

Cells