Contents

UITableViewDelegate

Methods for managing selections, configuring section headers and footers, deleting and reordering cells, and performing other actions in a table view.

Declaration

@MainActor protocol UITableViewDelegate : UIScrollViewDelegate

Overview

Use the methods of this protocol to manage the following features:

  • Create and manage custom header and footer views.

  • Specify custom heights for rows, headers, and footers.

  • Provide height estimates for better scrolling support.

  • Indent row content.

  • Respond to row selections.

  • Respond to swipes and other actions in table rows.

  • Support editing the table’s content.

The table view specifies rows and sections using IndexPath. For information about how to interpret row and section indexes, see Specify the location of rows and sections.

Topics

Configuring rows for the table view

Responding to row selections

Providing custom header and footer views

Providing header, footer, and row heights

Estimating heights for the table’s content

Managing accessory views

Managing context menus

Responding to row actions

Managing table view highlights

Editing table rows

Reordering table rows

Tracking the removal of views

Managing table view focus

Performing primary actions

See Also

Table management