Instance Method

cellForRow(at:)

Returns the table cell at the specified index path.

Declaration

func cellForRow(at indexPath: IndexPath) -> UITableViewCell?

Parameters

indexPath

The index path locating the row in the table view.

Return Value

An object representing a cell of the table, or nil if the cell is not visible or indexPath is out of range.

See Also

Getting Cells and Section-Based Views

func headerView(forSection: Int) -> UITableViewHeaderFooterView?

Returns the header view associated with the specified section.

func footerView(forSection: Int) -> UITableViewHeaderFooterView?

Returns the footer view associated with the specified section.

func indexPath(for: UITableViewCell) -> IndexPath?

Returns an index path representing the row and section of a given table-view cell.

func indexPathForRow(at: CGPoint) -> IndexPath?

Returns an index path identifying the row and section at the given point.

func indexPathsForRows(in: CGRect) -> [IndexPath]?

An array of index paths, each representing a row enclosed by a given rectangle.

var visibleCells: [UITableViewCell]

The table cells that are visible in the table view.

var indexPathsForVisibleRows: [IndexPath]?

An array of index paths, each identifying a visible row in the table view.