Package apple.uikit.protocol
Interface UITableViewDataSource
-
- All Known Implementing Classes:
CABTMIDICentralViewController,UITableViewController,UITableViewDiffableDataSource
public interface UITableViewDataSource_______________________________________________________________________________________________________________ this protocol represents the data model object. as such, it supplies no information about appearance (including the cells)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default longnumberOfSectionsInTableView(UITableView tableView)Default is 1 if not implementeddefault NSArray<java.lang.String>sectionIndexTitlesForTableView(UITableView tableView)return list of section titles to display in section index view (e.g.default booleantableViewCanEditRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)Individual rows can opt out of having the -editing property set for them.default booleantableViewCanMoveRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)Allows the reorder accessory view to optionally be shown for a particular row.UITableViewCelltableViewCellForRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)Row display.default voidtableViewCommitEditingStyleForRowAtIndexPath(UITableView tableView, long editingStyle, NSIndexPath indexPath)After a row has the minus or plus button invoked (based on the UITableViewCellEditingStyle for the cell), the dataSource must commit the change Not called for edit actions using UITableViewRowAction - the action's handler will be invoked insteaddefault voidtableViewMoveRowAtIndexPathToIndexPath(UITableView tableView, NSIndexPath sourceIndexPath, NSIndexPath destinationIndexPath)Data manipulation - reorder / moving supportlongtableViewNumberOfRowsInSection(UITableView tableView, long section)default longtableViewSectionForSectionIndexTitleAtIndex(UITableView tableView, java.lang.String title, long index)tell table which section corresponds to section title/index (e.g.default java.lang.StringtableViewTitleForFooterInSection(UITableView tableView, long section)default java.lang.StringtableViewTitleForHeaderInSection(UITableView tableView, long section)fixed font style. use custom view (UILabel) if you want something different
-
-
-
Method Detail
-
numberOfSectionsInTableView
default long numberOfSectionsInTableView(UITableView tableView)
Default is 1 if not implemented
-
sectionIndexTitlesForTableView
default NSArray<java.lang.String> sectionIndexTitlesForTableView(UITableView tableView)
return list of section titles to display in section index view (e.g. "ABCD...Z#")
-
tableViewCanEditRowAtIndexPath
default boolean tableViewCanEditRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
Individual rows can opt out of having the -editing property set for them. If not implemented, all rows are assumed to be editable.
-
tableViewCanMoveRowAtIndexPath
default boolean tableViewCanMoveRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
Allows the reorder accessory view to optionally be shown for a particular row. By default, the reorder control will be shown only if the datasource implements -tableView:moveRowAtIndexPath:toIndexPath:
-
tableViewCellForRowAtIndexPath
UITableViewCell tableViewCellForRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
Row display. Implementers should *always* try to reuse cells by setting each cell's reuseIdentifier and querying for available reusable cells with dequeueReusableCellWithIdentifier: Cell gets various attributes set automatically based on table (separators) and data source (accessory views, editing controls)
-
tableViewCommitEditingStyleForRowAtIndexPath
default void tableViewCommitEditingStyleForRowAtIndexPath(UITableView tableView, long editingStyle, NSIndexPath indexPath)
After a row has the minus or plus button invoked (based on the UITableViewCellEditingStyle for the cell), the dataSource must commit the change Not called for edit actions using UITableViewRowAction - the action's handler will be invoked instead
-
tableViewMoveRowAtIndexPathToIndexPath
default void tableViewMoveRowAtIndexPathToIndexPath(UITableView tableView, NSIndexPath sourceIndexPath, NSIndexPath destinationIndexPath)
Data manipulation - reorder / moving support
-
tableViewNumberOfRowsInSection
long tableViewNumberOfRowsInSection(UITableView tableView, long section)
-
tableViewSectionForSectionIndexTitleAtIndex
default long tableViewSectionForSectionIndexTitleAtIndex(UITableView tableView, java.lang.String title, long index)
tell table which section corresponds to section title/index (e.g. "B",1))
-
tableViewTitleForFooterInSection
default java.lang.String tableViewTitleForFooterInSection(UITableView tableView, long section)
-
tableViewTitleForHeaderInSection
default java.lang.String tableViewTitleForHeaderInSection(UITableView tableView, long section)
fixed font style. use custom view (UILabel) if you want something different
-
-