Instance Property

estimatedRowHeight

The estimated height of rows in the table view.

Declaration

var estimatedRowHeight: CGFloat { get set }

Discussion

Providing a nonnegative estimate of the height of rows can improve the performance of loading the table view. If the table contains variable height rows, it might be expensive to calculate all their heights when the table loads. Using estimation allows you to defer some of the cost of geometry calculation from load time to scrolling time.

When you create a self-sizing table view cell, you need to set this property and use constraints to define the cell’s size.

The default value is automaticDimension, which means that the table view selects an estimated height to use on your behalf. Set the value to 0 to disable estimated heights.

See Also

Estimating Element Heights

var estimatedSectionHeaderHeight: CGFloat

The estimated height of section headers in the table view.

var estimatedSectionFooterHeight: CGFloat

The estimated height of section footers in the table view.