---
title: UITableRow
description: Row in a UITable.
---

Row in a UITable.

Rows can be added to an instance of UITable. A row is shown vertically
in a UITable in the order they are added to the table. Rows contain cells which are shown horizontally in the order they are added to the row.

## Properties

### backgroundColor

Background color.

```typescript
backgroundColor: Color
```

### cellSpacing

Spacing between cells.

```typescript
cellSpacing: number
```

Specifies the horizontal spacing between cells in the row.

### dismissOnSelect

Whether to dismiss the table when the row is selected.

```typescript
dismissOnSelect: bool
```

This property will only have an effect if the row is selectable, i.e. `onSelect` has a value. Otherwise it is ignored.

Defaults to true.

### height

Height of the row.

```typescript
height: number
```

The height of the row defaults to 44.

### isHeader

Whether the cell is a header.

```typescript
isHeader: bool
```

Headers are highlighted cells that helps users understand context. Defaults to false.

### onSelect

Called when the row is selected.

```typescript
onSelect: fn()
```

Called when the row is selected when the table is presented. If this has no value, the row cannot be selected. Defaults to null.

Rows cannot be tapped when the tables is presented in Siri.

## Methods

<span id="-new-uitablerow" class="api-anchor"></span>

### new UITableRow()

Constructs a row.

```typescript
new UITableRow()
```

Rows are shown vertically in a UITable. A row contains cells which are displayed horizontally.

<span id="-addbutton" class="api-anchor"></span>

### addButton(title)

Adds a button cell.

```typescript
addButton(title: string): UITableCell
```

Constructs a new cell that contains a button. Set the `onTap` property to specify an action to performed when the button is tapped.

#### Parameters

**`title` `string`**

Title of the button.

#### Return value

**`UITableCell`**

Cosntructed cell.

<span id="-addcell" class="api-anchor"></span>

### addCell(cell)

Adds a cell.

```typescript
addCell(cell: UITableCell)
```

Adds a cell to the row. Note that cells are shown in the order they are added to the row.

#### Parameters

**`cell` `UITableCell`**

Cell to add to the row.

<span id="-addimage" class="api-anchor"></span>

### addImage(image)

Adds an image cell.

```typescript
addImage(image: Image): UITableCell
```

Constructs a new cell containing the specified image and adds it to the row.

#### Parameters

**`image` `Image`**

Image to show in the cell.

#### Return value

**`UITableCell`**

Cosntructed cell.

<span id="-addimageaturl" class="api-anchor"></span>

### addImageAtURL(url)

Adds an image cell.

```typescript
addImageAtURL(url: string): UITableCell
```

Constructs a new cell that loads the image at the specified url and adds the cell to the row.

#### Parameters

**`url` `string`**

URL to image.

#### Return value

**`UITableCell`**

Cosntructed cell.

<span id="-addtext" class="api-anchor"></span>

### addText(title, subtitle)

Adds a text cell.

```typescript
addText(title: string, subtitle: string): UITableCell
```

Constructs a new cell containing the specified string and adds it to the row.

#### Parameters

**`title` `string`**

Optional title to show in the cell.

**`subtitle` `string`**

Optional subtitle shown below the title in the cell.

#### Return value

**`UITableCell`**

Constructed cell.