Skip to content

UITableCell

Cell in a UITableRow.

Cells are shown horizontally in a UITableRow which in turn is shown vertically in a UITable. Cells have content, e.g. a text or an image.

Whether to dismiss the table when the button is tapped.

dismissOnTap: bool

Defaults to false.

Called when the button is tapped.

onTap: fn()

Buttons cannot be tapped when the table is presented in Siri.

Color of the subtitle.

subtitleColor: Color

This only has an effect on cells with a subtitle. By default the color is null, in which case an appropriate color is automatically chosen based on the theme of the app and the context the script is running in.

Font of the subtitle.

subtitleFont: Font

Color of the title.

titleColor: Color

This only has an effect on cells with a title. By default the color is null, in which case an appropriate color is automatically chosen based on the theme of the app and the context the script is running in.

Font of the title.

titleFont: Font

Relative width of the cell.

widthWeight: number

A width weight specifies the relative width of the cell. When computing the absolute width of the cell, all width weights are taken into account. Consider the following example.

Cell A has a width weight of 50. Cell B has a width weight of 100. Cell C has a width wegiht of 150.

Assume that the row has an absolute width of 100. The width will be distributed among cells A, B and C. B will be double as wide as A but C will be fifty percent wider than B and three times as wide as A.

Constructs a button cell.

static button(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.

title string

Title of the button.

UITableCell

Constructed cell.

Center aligns content.

centerAligned()

Specifies that content in the cell should be center aligned.

Constructs an image cell.

static image(image: Image): UITableCell

Constructs a new cell containing an image.

image Image

Image to show in the cell.

UITableCell

Constructed cell.

Constructs an image cell.

static imageAtURL(url: string): UITableCell

Constructs a new cell that loads the image at the specified URL.

url string

URL to image.

UITableCell

Constructed cell.

Left aligns content.

leftAligned()

Specifies that content in the cell should be left aligned.

Right aligns content.

rightAligned()

Specifies that content in the cell should be right aligned.

Constructs a text cell.

static text(title: string, subtitle: string): UITableCell

Constructs a new cell containing text.

title string

Optional title to show in the cell.

subtitle string

Optional subtitle shown below the title.

UITableCell

Constructed cell.