iOSTableDataSource.SectionCount

From Xojo Documentation

Method

iOSTableDataSource.SectionCount(table As iOSTable) As Integer

Supported on Mobile(iOS).

Return the number of sections.

Parameters

Parameter Description
table The iOSTable instance using this data source.

Notes

You should return the total number of sections in your data source. For example, if you are displaying names with sections for each letter of the alphabet, then you might return 26 here.

If you are not using sections, you can return 1 since there always needs to be at least one section.

Sample Code

Refer to the data source example in the User Guide to see how to set up a Data Source that returns names, with sections for the first letter of each last name.

You can also refer to the sample project included with Xojo:

  • Examples/iOS/Controls/Table/TableDataSource