Version: 1.0.0
Table Row Types for
Alpha WatchBenchTM


RowType1
|
RowType2
|
RowType3
|
RowType4
|
RowType5

WatchBench gives you access to much of the functionality of WatchKit's table interface objects. A table allows you to display one or more rows, each with its own group of other interface objects, such as labels and images. The configuration of those interface objects is called a row type.

Tables start out empty. You add rows with the AWBlib.populateTable function, defined in the Watch API Reference help file. That function takes an array of arrays. Each of the sub-arrays has the values used to define a row.

WatchBench defines five types of rows, named RowType1 through RowType5. The first element in each sub-array is a string that specifies the row type for that row (all rows need not have the same type). Each row type has a different predefined arrangement of visual interface objects. For each row type, the subsequent elements in the array set values for those objects. If the sub-array is shorter than the total number of elements needed, default values are assigned to the trailing missing elements.

This help file provides the definitions of those Row Types.

You may press and hold on a sample definition then select "Copy" to copy the text to the pasteboard.
RowType1
RowType1
This is a simple row with just one label object. You define it with the following:
["RowType1", Label1Text, Label1Color, Group1Color, Group1CornerRadius, Group1BackgroundImageDataBase64]
All but the first two are optional and will get default values.
Group1
Group
Label1
Label
Body font
Top of Page
RowType2
RowType2
This is a row with just two label objects, one above the other, and an optional separator between rows. You define it with the following:
["RowType2", Label1Text, Label2Text, Label1Color, Label2Color, Group1Color, Group1CornerRadius, Group1BackgroundImageDataBase64, SeparatorColor]
All but the first two are optional and will get default values.
Group1
Group
Indents t/b/l/r: 0/3/0/0
Separator
Separator
Width of container. Defaults to white.
Group
Group
You cannot set values for this group. Indents t/b/l/r: 1/1/8/0
Label1
Label
Body font
Label2
Label
Footnote font
Top of Page
RowType3
RowType3
This is a row with three label objects, one above the other, and a solid vertical bar on the left. You define it with the following:
["RowType3", Label1Text, Label2Text, Label3Text, Label1Color, Label2Color, Label3Color, Group1Color, Group2Color, Group1CornerRadius, Group2CornerRadius]
All but the first two are optional and will get default values.
Group
Group
You cannot set values for this group. Indents t/b/l/r: 0/6/0/0
Group1
Group
Set this group's color to set the color of the bar. Indents t/b/l/r: 0/0/6/0
Group2
Group
Indents t/b/l/r: 0/0/5/0
Label1
Label
System Bold 16.0 font
Label2
Label
System 16.0 font
Label3
Label
System 13.0 font
Top of Page
RowType4
RowType4
This is a row with an image on the left and two label objects, one above the other. You define it with the following:
["RowType4", Image1DataBase64, Label1Text, Label2Text, Label1Color, Label2Color, Group1Color, Group2Color, Group1CornerRadius, Group2CornerRadius]
All but the first two are optional and will get default values. An empty string ("") for the image data means no image.
Group1
Group
Indents t/b/l/r: 0/0/0/0
Image1
Image
Sized to fit content, centered vertically.
Group2
Group
Centered vertically. Indents t/b/l/r: 0/0/0/0
Label1
Label
Body font
Label2
Label
Footnote font
Top of Page
RowType5
RowType5
This is a row with three label objects and one image object, one after the other horizontally, and an optional separator between rows. You define it with the following:
["RowType5", Label1Text ("" is hidden!), Image1DataBase64, Label2Text ("" is hidden!), Label3Text, Label1Color, Label2Color, Label3Color, Group1Color, Group1CornerRadius, separatorColor]
All but the first two are optional and will get default values.

Note that for the first two text objects, an empty string will hide the object and remove the space it occupies. Use a string with a single space character to prevent it from being hidden.
Group1
Group
Indents t/b/l/r: 0/4/0/0
Separator
Separator
Width of container. Defaults to white.
Group
Group
Contents arranged horizontally. You cannot set values for this group. Indents t/b/l/r: 4/0/0/0
Label1
Label
Footnote font, fixed width of 42, vertically centered
Image1
Image
Sized to fit content, vertically centered
Label2
Label
Footnote font, fixed width of 25, vertically centered
Label3
Label
Footnote font, sized to fit content, vertically centered
Top of Page