estimatedItemSize
The estimated size of cells in the collection view.
Declaration
var estimatedItemSize: CGSize { get set }Discussion
Providing an estimated cell size can improve the performance of the collection view when the cells adjust their size dynamically. The estimated value lets the collection view defer some calculations to determine the actual size of its content. Cells that aren’t onscreen are assumed to be the estimated height.
The default value of this property is CGSizeZero. Setting it to any other value, like automaticSize, causes the collection view to query each cell for its actual size using the cell’s preferredLayoutAttributesFitting(_:) method.
If all of your cells are the same size, use the itemSize property, instead of this property, to specify the cell size instead.