Instance Method

tableView(_:estimatedHeightForFooterInSection:)

Asks the delegate for the estimated height of the footer of a particular section.

Declaration

optional func tableView(_ tableView: UITableView, estimatedHeightForFooterInSection section: Int) -> CGFloat

Parameters

tableView

The table-view object requesting this information.

section

An index number identifying a section of tableView .

Return Value

A nonnegative floating-point value that estimates the height (in points) of the footer for section.

Discussion

Providing an estimate the height of section footers can improve the user experience when loading the table view. If the table contains variable height section footers, it might be expensive to calculate all their heights and so lead to a longer load time. Using estimation allows you to defer some of the cost of geometry calculation from load time to scrolling time.

See Also

Estimating Heights for the Table's Content

func tableView(UITableView, estimatedHeightForRowAt: IndexPath) -> CGFloat

Asks the delegate for the estimated height of a row in a specified location.

func tableView(UITableView, estimatedHeightForHeaderInSection: Int) -> CGFloat

Asks the delegate for the estimated height of the header of a particular section.