Contents

automaticSize

A placeholder size for self-sizing cells.

Declaration

class let automaticSize: CGSize

Discussion

Set this constant as the value for the estimatedItemSize property to enable self-sizing cells for your collection view. This is a non-zero, placeholder value that tells the collection view to query each cell for its actual size using the cell’s preferredLayoutAttributesFitting(_:) method.

See Also

Configuring item spacing