---
title: UITableViewCell
framework: uikit
role: symbol
role_heading: Class
path: uikit/uitableviewcell
---

# UITableViewCell

The visual representation of a single row in a table view.

## Declaration

```swift
@MainActor class UITableViewCell
```

## Mentioned in

Filling a table with data Configuring the cells for your table Adding user-focusable elements to a tvOS app

## Overview

Overview A UITableViewCell object is a specialized type of view that manages the content of a single table row. You use cells primarily to organize and present your app’s custom content, but UITableViewCell provides some specific customizations to support table-related behaviors, including: Applying a selection or highlight color to the cell Adding standard accessory views, such as a detail or disclosure control Putting the cell into an editable state Indenting the cell’s content to create a visual hierarchy in your table Your app’s content occupies most of the cell’s bounds, but the cell may adjust that space to make room for other content. Cells display accessory views on the trailing edge of their content area. When you put your table into edit mode, the cell adds a delete control to the leading edge of its content area, and optionally swaps out an accessory view for a reorder control.

Every table view must have at least one type of cell for displaying content, and tables may have multiple cell types to display different types of content. Your table’s data source object handles the creation and configuration of cells immediately before they appear onscreen. For information about how to create your table’s cells, see Filling a table with data. Configure your cell’s content Configure the content and layout of your cells in your storyboard file. Tables have one cell type by default, but you can add more by changing the value in the table’s Prototype Cells attribute. In addition to configuring the cell’s content, make sure you configure the following attributes: Identifier. Use this identifier (also known as a reuse identifier) to create the cell. Style. Choose one of the standard types or define a custom cell. Class. Specify a UITableViewCell subclass with your custom behavior. To configure the content and appearance of your cell, you can set its contentConfiguration and backgroundConfiguration.

## Topics

### Creating a table view cell

- [init(style:reuseIdentifier:)](uikit/uitableviewcell/init(style:reuseidentifier:).md)
- [UITableViewCell.CellStyle](uikit/uitableviewcell/cellstyle.md)
- [init(coder:)](uikit/uitableviewcell/init(coder:).md)

### Reusing cells

- [reuseIdentifier](uikit/uitableviewcell/reuseidentifier.md)
- [prepareForReuse()](uikit/uitableviewcell/prepareforreuse().md)

### Configuring the background

- [defaultBackgroundConfiguration()](uikit/uitableviewcell/defaultbackgroundconfiguration().md)
- [backgroundConfiguration](uikit/uitableviewcell/backgroundconfiguration-24e8e.md)
- [automaticallyUpdatesBackgroundConfiguration](uikit/uitableviewcell/automaticallyupdatesbackgroundconfiguration.md)
- [backgroundView](uikit/uitableviewcell/backgroundview.md)
- [selectedBackgroundView](uikit/uitableviewcell/selectedbackgroundview.md)
- [multipleSelectionBackgroundView](uikit/uitableviewcell/multipleselectionbackgroundview.md)

### Managing the content

- [defaultContentConfiguration()](uikit/uitableviewcell/defaultcontentconfiguration().md)
- [contentConfiguration](uikit/uitableviewcell/contentconfiguration-9ktox.md)
- [automaticallyUpdatesContentConfiguration](uikit/uitableviewcell/automaticallyupdatescontentconfiguration.md)
- [contentView](uikit/uitableviewcell/contentview.md)

### Managing the state

- [configurationState](uikit/uitableviewcell/configurationstate-4xwj0.md)
- [setNeedsUpdateConfiguration()](uikit/uitableviewcell/setneedsupdateconfiguration().md)
- [updateConfiguration(using:)](uikit/uitableviewcell/updateconfiguration(using:).md)
- [configurationUpdateHandler](uikit/uitableviewcell/configurationupdatehandler-974.md)
- [UITableViewCell.ConfigurationUpdateHandler](uikit/uitableviewcell/configurationupdatehandler-swift.typealias.md)

### Managing accessory views

- [accessoryType](uikit/uitableviewcell/accessorytype-swift.property.md)
- [accessoryView](uikit/uitableviewcell/accessoryview.md)
- [editingAccessoryType](uikit/uitableviewcell/editingaccessorytype.md)
- [editingAccessoryView](uikit/uitableviewcell/editingaccessoryview.md)
- [UITableViewCell.AccessoryType](uikit/uitableviewcell/accessorytype-swift.enum.md)

### Managing cell selection and highlighting

- [selectionStyle](uikit/uitableviewcell/selectionstyle-swift.property.md)
- [UITableViewCell.SelectionStyle](uikit/uitableviewcell/selectionstyle-swift.enum.md)
- [isSelected](uikit/uitableviewcell/isselected.md)
- [setSelected(_:animated:)](uikit/uitableviewcell/setselected(_:animated:).md)
- [isHighlighted](uikit/uitableviewcell/ishighlighted.md)
- [setHighlighted(_:animated:)](uikit/uitableviewcell/sethighlighted(_:animated:).md)

### Editing the cell

- [isEditing](uikit/uitableviewcell/isediting.md)
- [setEditing(_:animated:)](uikit/uitableviewcell/setediting(_:animated:).md)
- [editingStyle](uikit/uitableviewcell/editingstyle-swift.property.md)
- [UITableViewCell.EditingStyle](uikit/uitableviewcell/editingstyle-swift.enum.md)
- [showingDeleteConfirmation](uikit/uitableviewcell/showingdeleteconfirmation.md)
- [showsReorderControl](uikit/uitableviewcell/showsreordercontrol.md)

### Dragging the row

- [userInteractionEnabledWhileDragging](uikit/uitableviewcell/userinteractionenabledwhiledragging.md)
- [dragStateDidChange(_:)](uikit/uitableviewcell/dragstatedidchange(_:).md)
- [UITableViewCell.DragState](uikit/uitableviewcell/dragstate.md)

### Adjusting to state transitions

- [willTransition(to:)](uikit/uitableviewcell/willtransition(to:).md)
- [didTransition(to:)](uikit/uitableviewcell/didtransition(to:).md)
- [UITableViewCell.StateMask](uikit/uitableviewcell/statemask.md)

### Managing content indentation

- [indentationLevel](uikit/uitableviewcell/indentationlevel.md)
- [indentationWidth](uikit/uitableviewcell/indentationwidth.md)
- [shouldIndentWhileEditing](uikit/uitableviewcell/shouldindentwhileediting.md)
- [separatorInset](uikit/uitableviewcell/separatorinset.md)
- [UITableViewCell.SeparatorStyle](uikit/uitableviewcell/separatorstyle.md)

### Managing focus

- [focusStyle](uikit/uitableviewcell/focusstyle-swift.property.md)
- [UITableViewCell.FocusStyle](uikit/uitableviewcell/focusstyle-swift.enum.md)

### Deprecated

- [textLabel](uikit/uitableviewcell/textlabel.md)
- [detailTextLabel](uikit/uitableviewcell/detailtextlabel.md)
- [imageView](uikit/uitableviewcell/imageview.md)

## Relationships

### Inherits From

- [UIView](uikit/uiview.md)

### Conforms To

- [CALayerDelegate](quartzcore/calayerdelegate.md)
- [CLBodyIdentifiable](corelocation/clbodyidentifiable.md)
- [CMBodyIdentifiable](coremotion/cmbodyidentifiable.md)
- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [UIAccessibilityIdentification](uikit/uiaccessibilityidentification.md)
- [UIActivityItemsConfigurationProviding](uikit/uiactivityitemsconfigurationproviding.md)
- [UIAppearance](uikit/uiappearance.md)
- [UIAppearanceContainer](uikit/uiappearancecontainer.md)
- [UICoordinateSpace](uikit/uicoordinatespace.md)
- [UIDynamicItem](uikit/uidynamicitem.md)
- [UIFocusEnvironment](uikit/uifocusenvironment.md)
- [UIFocusItem](uikit/uifocusitem.md)
- [UIFocusItemContainer](uikit/uifocusitemcontainer.md)
- [UIGestureRecognizerDelegate](uikit/uigesturerecognizerdelegate.md)
- [UILargeContentViewerItem](uikit/uilargecontentvieweritem.md)
- [UIPasteConfigurationSupporting](uikit/uipasteconfigurationsupporting.md)
- [UIPopoverPresentationControllerSourceItem](uikit/uipopoverpresentationcontrollersourceitem.md)
- [UIResponderStandardEditActions](uikit/uiresponderstandardeditactions.md)
- [UITraitChangeObservable](uikit/uitraitchangeobservable-67e94.md)
- [UITraitEnvironment](uikit/uitraitenvironment.md)
- [UIUserActivityRestoring](uikit/uiuseractivityrestoring.md)

## See Also

### Cells, headers, and footers

- [Configuring the cells for your table](uikit/configuring-the-cells-for-your-table.md)
- [Creating self-sizing table view cells](uikit/creating-self-sizing-table-view-cells.md)
- [Adding headers and footers to table sections](uikit/adding-headers-and-footers-to-table-sections.md)
- [UITableViewHeaderFooterView](uikit/uitableviewheaderfooterview.md)
