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.

widthWeight

Relative width of the cell.

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.

widthWeight: number

onTap

Called when the button is tapped.

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

onTap: fn()

dismissOnTap

Whether to dismiss the table when the button is tapped.

Defaults to false.

dismissOnTap: bool

+text

Constructs a text cell.

Constructs a new cell containing a text.

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

+image

Constructs an image cell.

Constructs a new cell containing an image.

static image(image: Image): UITableCell

+imageAtURL

Constructs an image cell.

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

static imageAtURL(url: string): UITableCell

+button

Constructs a button cell.

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

static button(title: string): UITableCell

-leftAligned

Left aligns content.

Specifies that content in the cell should be left aligned.

leftAligned()

-centerAligned

Center aligns content.

Specifies that content in the cell should be center aligned.

centerAligned()

-rightAligned

Right aligns content.

Specifies that content in the cell should be right aligned.

rightAligned()