Interface
iOSTableDataSourceReordering
Warning
This item was deprecated in version 2020r2. Please use iOSMobileTableDataSourceReordering as a replacement.
Description
The class interface that any data source supporting row reordering must implement.
Methods
Name |
Parameters |
Returns |
Shared |
---|---|---|---|
table As iOSMobileTable, section As Integer |
|||
table As iOSMobileTable, section As Integer, row As Integer |
|||
table As iOSMobileTable, section As Integer, row As Integer |
|||
table As iOSMobileTable, sourceSection As Integer, sourceRow As Integer, destSection As Integer, destRow As Integer |
|||
table As iOSMobileTable |
|||
table As iOSMobileTable, section As Integer |
Method descriptions
iOSTableDataSourceReordering.RowCount
RowCount(table As iOSMobileTable, section As Integer) As Integer
Return the number of rows for the section.
Your class should return the number of rows in your data source for this section. For example, if you are showing a list of names in sections for the first letter of the last name, then this method would return the number of names in the specified section.
iOSTableDataSourceReordering.RowData
RowData(table As iOSMobileTable, section As Integer, row As Integer) As MobileTableCellData
The actual cell data for the section and row.
You will need to create an iOSTableCellData instance and populate it with the values from your data source to return it from this method.
iOSTableDataSourceReordering.RowIsMoveable
RowIsMoveable(table As iOSMobileTable, section As Integer, row As Integer) As Boolean
Asks the data source if the specified row can be moved. Most data sources will unconditionally return True.
Return True
iOSTableDataSourceReordering.RowMoved
RowMoved(table As iOSMobileTable, sourceSection As Integer, sourceRow As Integer, destSection As Integer, destRow As Integer)
Informs the data source that a row has been moved and that it needs to update its internal state to match this new order.
' Remove row from its original location
Var origValue As Text = Data(sourceRow)
Data.Remove(sourceRow)
' Add it to its new location
Data.Insert(destRow, origValue)
iOSTableDataSourceReordering.SectionCount
SectionCount(table As iOSMobileTable) As Integer
Return the number of sections.
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.
iOSTableDataSourceReordering.SectionTitle
SectionTitle(table As iOSMobileTable, section As Integer) As String
Return the title for the section.
If you are not using sections, you can return empty text ("") here.
When using sections, return the name for the specified section. For example, if you are displaying names with sections for each letter of the alphabet, you might return "A" when section of 0 is passed in as a parameter.
Notes
Any data source that supports reordering of rows must implement this interface.
When the table is made editable: * The data source's RowIsMoveable method is called for the visible rows and the movable rows get reordering controls. * The user drags the row around the table, which can lead to more RowIsMoveable invocations. While the user is moving the row, the table's visual state is updated to show where the row will go but the data source is not modified. * The reorder finishes and the data source's RowMoved method is called so the data source can update its internal state.
Compatibility
iOS projects on the iOS operating system.
See also
iOSMobileTable control; iOSMobileTableDataSource, iOSMobileTableDataSourceEditing interfaces