Instance Method

numberOfSections(in:)

Asks the data source to return the number of sections in the table view.

Declaration

optional func numberOfSections(in tableView: UITableView) -> Int

Parameters

tableView

An object representing the table view requesting this information.

Return Value

The number of sections in tableView. The default value is 1.

See Also

Configuring a Table View

func tableView(UITableView, cellForRowAt: IndexPath)

Asks the data source for a cell to insert in a particular location of the table view.

Required.

func tableView(UITableView, numberOfRowsInSection: Int)

Tells the data source to return the number of rows in a given section of a table view.

Required.

func tableView(UITableView, titleForHeaderInSection: Int)

Asks the data source for the title of the header of the specified section of the table view.

func tableView(UITableView, titleForFooterInSection: Int)

Asks the data source for the title of the footer of the specified section of the table view.