Instance Property

backgroundView

The view used as the background of the cell.

Declaration

var backgroundView: UIView? { get set }

Discussion

The default is nil for cells in plain-style tables (UITableView.Style.plain) and non-nil for grouped-style tables UITableView.Style.grouped). UITableViewCell adds the background view as a subview behind all other views and uses its current frame location.

See Also

Accessing Views of the Cell Object

var contentView: UIView

The content view of the cell object.

var selectedBackgroundView: UIView?

The view used as the background of the cell when it is selected.

var multipleSelectionBackgroundView: UIView?

The background view to use for a selected cell when the table view allows multiple row selections.