Interface UITableViewDelegate

    • Method Detail

      • indexPathForPreferredFocusedViewInTableView

        default NSIndexPath indexPathForPreferredFocusedViewInTableView​(UITableView tableView)
      • tableViewAccessoryButtonTappedForRowWithIndexPath

        default void tableViewAccessoryButtonTappedForRowWithIndexPath​(UITableView tableView,
                                                                       NSIndexPath indexPath)
      • tableViewAccessoryTypeForRowWithIndexPath

        @Deprecated
        default long tableViewAccessoryTypeForRowWithIndexPath​(UITableView tableView,
                                                               NSIndexPath indexPath)
        Deprecated.
        Accessories (disclosures).
      • tableViewCanFocusRowAtIndexPath

        default boolean tableViewCanFocusRowAtIndexPath​(UITableView tableView,
                                                        NSIndexPath indexPath)
        Focus
      • tableViewCanPerformActionForRowAtIndexPathWithSender

        default boolean tableViewCanPerformActionForRowAtIndexPathWithSender​(UITableView tableView,
                                                                             org.moe.natj.objc.SEL action,
                                                                             NSIndexPath indexPath,
                                                                             java.lang.Object sender)
      • tableViewDidDeselectRowAtIndexPath

        default void tableViewDidDeselectRowAtIndexPath​(UITableView tableView,
                                                        NSIndexPath indexPath)
      • tableViewDidEndDisplayingFooterViewForSection

        default void tableViewDidEndDisplayingFooterViewForSection​(UITableView tableView,
                                                                   UIView view,
                                                                   long section)
      • tableViewDidEndDisplayingHeaderViewForSection

        default void tableViewDidEndDisplayingHeaderViewForSection​(UITableView tableView,
                                                                   UIView view,
                                                                   long section)
      • tableViewDidEndEditingRowAtIndexPath

        default void tableViewDidEndEditingRowAtIndexPath​(UITableView tableView,
                                                          NSIndexPath indexPath)
      • tableViewDidHighlightRowAtIndexPath

        default void tableViewDidHighlightRowAtIndexPath​(UITableView tableView,
                                                         NSIndexPath indexPath)
      • tableViewDidSelectRowAtIndexPath

        default void tableViewDidSelectRowAtIndexPath​(UITableView tableView,
                                                      NSIndexPath indexPath)
        Called after the user changes the selection.
      • tableViewDidUnhighlightRowAtIndexPath

        default void tableViewDidUnhighlightRowAtIndexPath​(UITableView tableView,
                                                           NSIndexPath indexPath)
      • tableViewEditActionsForRowAtIndexPath

        default NSArray<? extends UITableViewRowAction> tableViewEditActionsForRowAtIndexPath​(UITableView tableView,
                                                                                              NSIndexPath indexPath)
        This method supersedes -tableView:titleForDeleteConfirmationButtonForRowAtIndexPath: if return value is non-nil
      • tableViewEditingStyleForRowAtIndexPath

        default long tableViewEditingStyleForRowAtIndexPath​(UITableView tableView,
                                                            NSIndexPath indexPath)
        Allows customization of the editingStyle for a particular cell located at 'indexPath'. If not implemented, all editable cells will have UITableViewCellEditingStyleDelete set for them when the table has editing property set to YES.
      • tableViewEstimatedHeightForFooterInSection

        default double tableViewEstimatedHeightForFooterInSection​(UITableView tableView,
                                                                  long section)
      • tableViewEstimatedHeightForHeaderInSection

        default double tableViewEstimatedHeightForHeaderInSection​(UITableView tableView,
                                                                  long section)
      • tableViewEstimatedHeightForRowAtIndexPath

        default double tableViewEstimatedHeightForRowAtIndexPath​(UITableView tableView,
                                                                 NSIndexPath indexPath)
        Use the estimatedHeight methods to quickly calcuate guessed values which will allow for fast load times of the table. If these methods are implemented, the above -tableView:heightForXXX calls will be deferred until views are ready to be displayed, so more expensive logic can be placed there.
      • tableViewHeightForFooterInSection

        default double tableViewHeightForFooterInSection​(UITableView tableView,
                                                         long section)
      • tableViewHeightForHeaderInSection

        default double tableViewHeightForHeaderInSection​(UITableView tableView,
                                                         long section)
      • tableViewHeightForRowAtIndexPath

        default double tableViewHeightForRowAtIndexPath​(UITableView tableView,
                                                        NSIndexPath indexPath)
        Variable height support
      • tableViewIndentationLevelForRowAtIndexPath

        default long tableViewIndentationLevelForRowAtIndexPath​(UITableView tableView,
                                                                NSIndexPath indexPath)
        return 'depth' of row for hierarchies
      • tableViewPerformActionForRowAtIndexPathWithSender

        default void tableViewPerformActionForRowAtIndexPathWithSender​(UITableView tableView,
                                                                       org.moe.natj.objc.SEL action,
                                                                       NSIndexPath indexPath,
                                                                       java.lang.Object sender)
      • tableViewShouldHighlightRowAtIndexPath

        default boolean tableViewShouldHighlightRowAtIndexPath​(UITableView tableView,
                                                               NSIndexPath indexPath)
        -tableView:shouldHighlightRowAtIndexPath: is called when a touch comes down on a row. Returning NO to that message halts the selection process and does not cause the currently selected row to lose its selected look while the touch is down.
      • tableViewShouldIndentWhileEditingRowAtIndexPath

        default boolean tableViewShouldIndentWhileEditingRowAtIndexPath​(UITableView tableView,
                                                                        NSIndexPath indexPath)
        Controls whether the background is indented while editing. If not implemented, the default is YES. This is unrelated to the indentation level below. This method only applies to grouped style table views.
      • tableViewShouldShowMenuForRowAtIndexPath

        default boolean tableViewShouldShowMenuForRowAtIndexPath​(UITableView tableView,
                                                                 NSIndexPath indexPath)
        Copy/Paste. All three methods must be implemented by the delegate.
      • tableViewTargetIndexPathForMoveFromRowAtIndexPathToProposedIndexPath

        default NSIndexPath tableViewTargetIndexPathForMoveFromRowAtIndexPathToProposedIndexPath​(UITableView tableView,
                                                                                                 NSIndexPath sourceIndexPath,
                                                                                                 NSIndexPath proposedDestinationIndexPath)
        Allows customization of the target row for a particular row as it is being moved/reordered
      • tableViewTitleForDeleteConfirmationButtonForRowAtIndexPath

        default java.lang.String tableViewTitleForDeleteConfirmationButtonForRowAtIndexPath​(UITableView tableView,
                                                                                            NSIndexPath indexPath)
      • tableViewViewForFooterInSection

        default UIView tableViewViewForFooterInSection​(UITableView tableView,
                                                       long section)
        custom view for footer. will be adjusted to default or specified footer height
      • tableViewViewForHeaderInSection

        default UIView tableViewViewForHeaderInSection​(UITableView tableView,
                                                       long section)
        custom view for header. will be adjusted to default or specified header height
      • tableViewWillBeginEditingRowAtIndexPath

        default void tableViewWillBeginEditingRowAtIndexPath​(UITableView tableView,
                                                             NSIndexPath indexPath)
        The willBegin/didEnd methods are called whenever the 'editing' property is automatically changed by the table (allowing insert/delete/move). This is done by a swipe activating a single row
      • tableViewWillDisplayCellForRowAtIndexPath

        default void tableViewWillDisplayCellForRowAtIndexPath​(UITableView tableView,
                                                               UITableViewCell cell,
                                                               NSIndexPath indexPath)
        Display customization
      • tableViewWillDisplayFooterViewForSection

        default void tableViewWillDisplayFooterViewForSection​(UITableView tableView,
                                                              UIView view,
                                                              long section)
      • tableViewWillDisplayHeaderViewForSection

        default void tableViewWillDisplayHeaderViewForSection​(UITableView tableView,
                                                              UIView view,
                                                              long section)
      • tableViewWillSelectRowAtIndexPath

        default NSIndexPath tableViewWillSelectRowAtIndexPath​(UITableView tableView,
                                                              NSIndexPath indexPath)
        Called before the user changes the selection. Return a new indexPath, or nil, to change the proposed selection.
      • tableViewLeadingSwipeActionsConfigurationForRowAtIndexPath

        default UISwipeActionsConfiguration tableViewLeadingSwipeActionsConfigurationForRowAtIndexPath​(UITableView tableView,
                                                                                                       NSIndexPath indexPath)
        Swipe actions These methods supersede -editActionsForRowAtIndexPath: if implemented return nil to get the default swipe actions
      • tableViewShouldSpringLoadRowAtIndexPathWithContext

        default boolean tableViewShouldSpringLoadRowAtIndexPathWithContext​(UITableView tableView,
                                                                           NSIndexPath indexPath,
                                                                           UISpringLoadedInteractionContext context)
        Allows opting-out of spring loading for an particular row. If you want the interaction effect on a different subview of the spring loaded cell, modify the context.targetView property. The default is the cell. If this method is not implemented, the default is YES except when the row is part of a drag session.
      • tableViewContextMenuConfigurationForRowAtIndexPathPoint

        default UIContextMenuConfiguration tableViewContextMenuConfigurationForRowAtIndexPathPoint​(UITableView tableView,
                                                                                                   NSIndexPath indexPath,
                                                                                                   CGPoint point)
        Called when the interaction begins.
        Parameters:
        tableView - This UITableView.
        indexPath - IndexPath of the row for which a configuration is being requested.
        point - Location of the interaction in the table view's coordinate space
        Returns:
        A UIContextMenuConfiguration describing the menu to be presented. Return nil to prevent the interaction from beginning. Returning an empty configuration causes the interaction to begin then fail with a cancellation effect. You might use this to indicate to users that it's possible for a menu to be presented from this element, but that there are no actions to present at this particular time.
      • tableViewDidBeginMultipleSelectionInteractionAtIndexPath

        default void tableViewDidBeginMultipleSelectionInteractionAtIndexPath​(UITableView tableView,
                                                                              NSIndexPath indexPath)
        Called right after the multi-select pan gesture begins and the table view is automatically transitioned into editing mode. In your app, this would be a good opportunity to update the state of your UI to reflect the fact that the user is now selecting multiple items at once; such as updating buttons to say "Done" instead of "Select"/"Edit", for instance.
      • tableViewPreviewForDismissingContextMenuWithConfiguration

        default UITargetedPreview tableViewPreviewForDismissingContextMenuWithConfiguration​(UITableView tableView,
                                                                                            UIContextMenuConfiguration configuration)
        Called when the interaction is about to dismiss. Return a UITargetedPreview describing the desired dismissal target. The interaction will animate the presented menu to the target. Use this to customize the dismissal animation.
        Parameters:
        tableView - This UITableView.
        configuration - The configuration of the menu displayed by this interaction.
      • tableViewPreviewForHighlightingContextMenuWithConfiguration

        default UITargetedPreview tableViewPreviewForHighlightingContextMenuWithConfiguration​(UITableView tableView,
                                                                                              UIContextMenuConfiguration configuration)
        Called when the interaction begins. Return a UITargetedPreview to override the default preview created by the table view.
        Parameters:
        tableView - This UITableView.
        configuration - The configuration of the menu about to be displayed by this interaction.
      • tableViewShouldBeginMultipleSelectionInteractionAtIndexPath

        default boolean tableViewShouldBeginMultipleSelectionInteractionAtIndexPath​(UITableView tableView,
                                                                                    NSIndexPath indexPath)
        Allows a two-finger pan gesture to automatically transition the table view into editing mode and start selecting cells. If this method returns YES, allow the user to start selecting multiple contiguous cells via a two-finger pan gesture. If the table view is already in editing mode, the user can also select multiple cells via a one-finger pan gesture along the edge of the table that contains editing controls (checkboxes). In order to support this behavior, you must also set allowsMultipleSelectionDuringEditing to YES. If this method is not implemented, the default is NO.
      • tableViewWillPerformPreviewActionForMenuWithConfigurationAnimator

        default void tableViewWillPerformPreviewActionForMenuWithConfigurationAnimator​(UITableView tableView,
                                                                                       UIContextMenuConfiguration configuration,
                                                                                       UIContextMenuInteractionCommitAnimating animator)
        Called when the interaction is about to "commit" in response to the user tapping the preview.
        Parameters:
        tableView - This UITableView.
        configuration - Configuration of the currently displayed menu.
        animator - Commit animator. Add animations to this object to run them alongside the commit transition.
      • tableViewDidEndMultipleSelectionInteraction

        default void tableViewDidEndMultipleSelectionInteraction​(UITableView tableView)
        Called when the multi-select interaction ends. At this point, the table view will remain in multi-select mode, but this delegate method is called to indicate that the multiple selection gesture or hardware keyboard interaction has ended.
      • tableViewWillDisplayContextMenuWithConfigurationAnimator

        default void tableViewWillDisplayContextMenuWithConfigurationAnimator​(UITableView tableView,
                                                                              UIContextMenuConfiguration configuration,
                                                                              UIContextMenuInteractionAnimating animator)
        Called when the table view is about to display a menu.
        Parameters:
        tableView - This UITableView.
        configuration - The configuration of the menu about to be displayed.
        animator - Appearance animator. Add animations to run them alongside the appearance transition.
      • tableViewWillEndContextMenuInteractionWithConfigurationAnimator

        default void tableViewWillEndContextMenuInteractionWithConfigurationAnimator​(UITableView tableView,
                                                                                     UIContextMenuConfiguration configuration,
                                                                                     UIContextMenuInteractionAnimating animator)
        Called when the table view's context menu interaction is about to end.
        Parameters:
        tableView - This UITableView.
        configuration - Ending configuration.
        animator - Disappearance animator. Add animations to run them alongside the disappearance transition.