iOSTable

From Xojo Documentation

Class (inherits from iOSControl)

An iOSTable is used for displaying a list of data.

Events
AccessoryAction Close RowAction
Action Open RowEditingStyle
ActionsForRow Refreshed
Properties
AccessibilityHint EstimatedRowHeight Parent fa-lock-32.png
AccessibilityLabel Format fa-lock-32.png SectionCount fa-lock-32.png
AllowRefresh Height fa-lock-32.png Top fa-lock-32.png
DataSource Left fa-lock-32.png Visible
EditingEnabled Name fa-lock-32.png Width fa-lock-32.png
Methods
AddConstraint Handle RemoveControl
AddControl InsertRow RemoveRow
AddRow InsertSection RemoveSection
AddSection Invalidate RowCount
Control ReloadData RowData
ControlCount ReloadDataInSection ScrollToRow
CreateCell ReloadRow SectionTitle
CreateCustomCell RemoveAll SetTintColor
EndRefresh RemoveConstraint
Enumerations
Formats RowEditingStyles ScrollPositions

Notes

An iOSTable has only a single column of cells so by default it can only show one column of data. Use iOSCustomTableCell to create your own cells with your own cell layout. This allows you to have a cell with its own controls or even multiple columns.

A table can have data added to it in one of two ways: manually or from a data source. Some methods only work with data that was added manually, some methods only work with data added using a data source. Using a data source can result in significantly faster performance when there are a large number of rows (100+) in the table.

A table must have at least one section (0-based). If there is only one section, then the section title does not appear in the table. If you are adding many rows, you should instead use iOSTableDataSource for better performance and reduced memory usage.

Sample Code

Add five rows to a table:

// Simple usage
Table1.AddSection("")
For i As Integer = 0 To 4
Table1.AddRow(0, "Row " + i.ToText)
Next

See Also

iOSCustomTableCell control; iOSTableCellData, iOSTableRowAction classes; iOSTableDataSource, iOSTableDataSourceEditing, iOSTableDataSourceReordering, interfaces