Contents

tableView(_:viewForFooterInSection:)

Asks the delegate for a view to display in the footer of the specified section of the table view.

Declaration

optional func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView?

Parameters

  • tableView:

    The table view asking for the view.

  • section:

    The index number of the section containing the footer view.

Mentioned in

Return Value

A UILabel, UIImageView, or custom view to display at the bottom of the specified section.

Discussion

If you implement this method but don’t implement tableView(_:heightForFooterInSection:), the table view calculates the height automatically, or uses the value of sectionFooterHeight if set.

See Also

Providing custom header and footer views