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.
Properties
Section titled “Properties”dismissOnTap
Section titled “dismissOnTap”Whether to dismiss the table when the button is tapped.
dismissOnTap: boolDefaults to false.
Called when the button is tapped.
onTap: fn()Buttons cannot be tapped when the table is presented in Siri.
subtitleColor
Section titled “subtitleColor”Color of the subtitle.
subtitleColor: ColorThis 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.
subtitleFont
Section titled “subtitleFont”Font of the subtitle.
subtitleFont: FonttitleColor
Section titled “titleColor”Color of the title.
titleColor: ColorThis 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.
titleFont
Section titled “titleFont”Font of the title.
titleFont: FontwidthWeight
Section titled “widthWeight”Relative width of the cell.
widthWeight: numberA 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.
Methods
Section titled “Methods”
button(title)
Section titled “button(title)”Constructs a button cell.
static button(title: string): UITableCellConstructs a new cell that contains a button. Set the onTap property to specify an action to performed when the button is tapped.
Parameters
Section titled “Parameters”title string
Title of the button.
Return value
Section titled “Return value”UITableCell
Constructed cell.
centerAligned()
Section titled “centerAligned()”Center aligns content.
centerAligned()Specifies that content in the cell should be center aligned.
image(image)
Section titled “image(image)”Constructs an image cell.
static image(image: Image): UITableCellConstructs a new cell containing an image.
Parameters
Section titled “Parameters”image Image
Image to show in the cell.
Return value
Section titled “Return value”UITableCell
Constructed cell.
imageAtURL(url)
Section titled “imageAtURL(url)”Constructs an image cell.
static imageAtURL(url: string): UITableCellConstructs a new cell that loads the image at the specified URL.
Parameters
Section titled “Parameters”url string
URL to image.
Return value
Section titled “Return value”UITableCell
Constructed cell.
leftAligned()
Section titled “leftAligned()”Left aligns content.
leftAligned()Specifies that content in the cell should be left aligned.
rightAligned()
Section titled “rightAligned()”Right aligns content.
rightAligned()Specifies that content in the cell should be right aligned.
text(title, subtitle)
Section titled “text(title, subtitle)”Constructs a text cell.
static text(title: string, subtitle: string): UITableCellConstructs a new cell containing text.
Parameters
Section titled “Parameters”title string
Optional title to show in the cell.
subtitle string
Optional subtitle shown below the title.
Return value
Section titled “Return value”UITableCell
Constructed cell.