Interface UITableViewDataSource

    • 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