Instance Method

tableView(_:numberOfRowsInSection:)

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

Required.

Declaration

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int

Parameters

tableView

The table-view object requesting this information.

section

An index number identifying a section in tableView.

Return Value

The number of rows in section.

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 numberOfSections(in: UITableView)

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

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.