public interface UITableViewDelegate extends UIScrollViewDelegate
| Modifier and Type | Method and Description |
|---|---|
default NSIndexPath |
indexPathForPreferredFocusedViewInTableView(UITableView tableView) |
default void |
tableViewAccessoryButtonTappedForRowWithIndexPath(UITableView tableView,
NSIndexPath indexPath) |
default long |
tableViewAccessoryTypeForRowWithIndexPath(UITableView tableView,
NSIndexPath indexPath)
Deprecated.
|
default boolean |
tableViewCanFocusRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath)
Focus
|
default boolean |
tableViewCanPerformActionForRowAtIndexPathWithSender(UITableView tableView,
org.moe.natj.objc.SEL action,
NSIndexPath indexPath,
java.lang.Object sender) |
default UIContextMenuConfiguration |
tableViewContextMenuConfigurationForRowAtIndexPathPoint(UITableView tableView,
NSIndexPath indexPath,
CGPoint point)
Called when the interaction begins.
|
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.
|
default void |
tableViewDidDeselectRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath) |
default void |
tableViewDidEndDisplayingCellForRowAtIndexPath(UITableView tableView,
UITableViewCell cell,
NSIndexPath indexPath) |
default void |
tableViewDidEndDisplayingFooterViewForSection(UITableView tableView,
UIView view,
long section) |
default void |
tableViewDidEndDisplayingHeaderViewForSection(UITableView tableView,
UIView view,
long section) |
default void |
tableViewDidEndEditingRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath) |
default void |
tableViewDidEndMultipleSelectionInteraction(UITableView tableView)
Called when the multi-select interaction ends.
|
default void |
tableViewDidHighlightRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath) |
default void |
tableViewDidSelectRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath)
Called after the user changes the selection.
|
default void |
tableViewDidUnhighlightRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath) |
default void |
tableViewDidUpdateFocusInContextWithAnimationCoordinator(UITableView tableView,
UITableViewFocusUpdateContext context,
UIFocusAnimationCoordinator coordinator) |
default NSArray<? extends UITableViewRowAction> |
tableViewEditActionsForRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath)
This method supersedes -tableView:titleForDeleteConfirmationButtonForRowAtIndexPath: if return value is non-nil
|
default long |
tableViewEditingStyleForRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath)
Allows customization of the editingStyle for a particular cell located at 'indexPath'.
|
default double |
tableViewEstimatedHeightForFooterInSection(UITableView tableView,
long section) |
default double |
tableViewEstimatedHeightForHeaderInSection(UITableView tableView,
long section) |
default double |
tableViewEstimatedHeightForRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath)
Use the estimatedHeight methods to quickly calculate guessed values which will allow for fast load times of the table.
|
default double |
tableViewHeightForFooterInSection(UITableView tableView,
long section) |
default double |
tableViewHeightForHeaderInSection(UITableView tableView,
long section) |
default double |
tableViewHeightForRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath)
Variable height support
|
default long |
tableViewIndentationLevelForRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath)
return 'depth' of row for hierarchies
|
default UISwipeActionsConfiguration |
tableViewLeadingSwipeActionsConfigurationForRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath)
Swipe actions
These methods supersede -editActionsForRowAtIndexPath: if implemented
return nil to get the default swipe actions
|
default void |
tableViewPerformActionForRowAtIndexPathWithSender(UITableView tableView,
org.moe.natj.objc.SEL action,
NSIndexPath indexPath,
java.lang.Object sender) |
default UITargetedPreview |
tableViewPreviewForDismissingContextMenuWithConfiguration(UITableView tableView,
UIContextMenuConfiguration configuration)
Called when the interaction is about to dismiss.
|
default UITargetedPreview |
tableViewPreviewForHighlightingContextMenuWithConfiguration(UITableView tableView,
UIContextMenuConfiguration configuration)
Called when the interaction begins.
|
default boolean |
tableViewSelectionFollowsFocusForRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath)
Determines if the row at the specified index path should also become selected when focus moves to it.
|
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.
|
default boolean |
tableViewShouldHighlightRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath)
-tableView:shouldHighlightRowAtIndexPath: is called when a touch comes down on a row.
|
default boolean |
tableViewShouldIndentWhileEditingRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath)
Controls whether the background is indented while editing.
|
default boolean |
tableViewShouldShowMenuForRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath)
Copy/Paste.
|
default boolean |
tableViewShouldSpringLoadRowAtIndexPathWithContext(UITableView tableView,
NSIndexPath indexPath,
UISpringLoadedInteractionContext context)
Allows opting-out of spring loading for an particular row.
|
default boolean |
tableViewShouldUpdateFocusInContext(UITableView tableView,
UITableViewFocusUpdateContext context) |
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
|
default java.lang.String |
tableViewTitleForDeleteConfirmationButtonForRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath) |
default UISwipeActionsConfiguration |
tableViewTrailingSwipeActionsConfigurationForRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath) |
default UIView |
tableViewViewForFooterInSection(UITableView tableView,
long section)
custom view for footer.
|
default UIView |
tableViewViewForHeaderInSection(UITableView tableView,
long section)
custom view for header.
|
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).
|
default NSIndexPath |
tableViewWillDeselectRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath) |
default void |
tableViewWillDisplayCellForRowAtIndexPath(UITableView tableView,
UITableViewCell cell,
NSIndexPath indexPath)
Display customization
|
default void |
tableViewWillDisplayContextMenuWithConfigurationAnimator(UITableView tableView,
UIContextMenuConfiguration configuration,
UIContextMenuInteractionAnimating animator)
Called when the table view is about to display a menu.
|
default void |
tableViewWillDisplayFooterViewForSection(UITableView tableView,
UIView view,
long section) |
default void |
tableViewWillDisplayHeaderViewForSection(UITableView tableView,
UIView view,
long section) |
default void |
tableViewWillEndContextMenuInteractionWithConfigurationAnimator(UITableView tableView,
UIContextMenuConfiguration configuration,
UIContextMenuInteractionAnimating animator)
Called when the table view's context menu interaction is about to end.
|
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.
|
default NSIndexPath |
tableViewWillSelectRowAtIndexPath(UITableView tableView,
NSIndexPath indexPath)
Called before the user changes the selection.
|
scrollViewDidChangeAdjustedContentInset, scrollViewDidEndDecelerating, scrollViewDidEndDraggingWillDecelerate, scrollViewDidEndScrollingAnimation, scrollViewDidEndZoomingWithViewAtScale, scrollViewDidScroll, scrollViewDidScrollToTop, scrollViewDidZoom, scrollViewShouldScrollToTop, scrollViewWillBeginDecelerating, scrollViewWillBeginDragging, scrollViewWillBeginZoomingWithView, scrollViewWillEndDraggingWithVelocityTargetContentOffset, viewForZoomingInScrollViewdefault NSIndexPath indexPathForPreferredFocusedViewInTableView(UITableView tableView)
default void tableViewAccessoryButtonTappedForRowWithIndexPath(UITableView tableView, NSIndexPath indexPath)
@Deprecated default long tableViewAccessoryTypeForRowWithIndexPath(UITableView tableView, NSIndexPath indexPath)
default boolean tableViewCanFocusRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default boolean tableViewCanPerformActionForRowAtIndexPathWithSender(UITableView tableView, org.moe.natj.objc.SEL action, NSIndexPath indexPath, java.lang.Object sender)
default void tableViewDidDeselectRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default void tableViewDidEndDisplayingCellForRowAtIndexPath(UITableView tableView, UITableViewCell cell, NSIndexPath indexPath)
default void tableViewDidEndDisplayingFooterViewForSection(UITableView tableView, UIView view, long section)
default void tableViewDidEndDisplayingHeaderViewForSection(UITableView tableView, UIView view, long section)
default void tableViewDidEndEditingRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default void tableViewDidHighlightRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default void tableViewDidSelectRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default void tableViewDidUnhighlightRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default void tableViewDidUpdateFocusInContextWithAnimationCoordinator(UITableView tableView, UITableViewFocusUpdateContext context, UIFocusAnimationCoordinator coordinator)
default NSArray<? extends UITableViewRowAction> tableViewEditActionsForRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default long tableViewEditingStyleForRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default double tableViewEstimatedHeightForFooterInSection(UITableView tableView, long section)
default double tableViewEstimatedHeightForHeaderInSection(UITableView tableView, long section)
default double tableViewEstimatedHeightForRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default double tableViewHeightForFooterInSection(UITableView tableView, long section)
default double tableViewHeightForHeaderInSection(UITableView tableView, long section)
default double tableViewHeightForRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default long tableViewIndentationLevelForRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default void tableViewPerformActionForRowAtIndexPathWithSender(UITableView tableView, org.moe.natj.objc.SEL action, NSIndexPath indexPath, java.lang.Object sender)
default boolean tableViewShouldHighlightRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default boolean tableViewShouldIndentWhileEditingRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default boolean tableViewShouldShowMenuForRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default boolean tableViewShouldUpdateFocusInContext(UITableView tableView, UITableViewFocusUpdateContext context)
default NSIndexPath tableViewTargetIndexPathForMoveFromRowAtIndexPathToProposedIndexPath(UITableView tableView, NSIndexPath sourceIndexPath, NSIndexPath proposedDestinationIndexPath)
default java.lang.String tableViewTitleForDeleteConfirmationButtonForRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default UIView tableViewViewForFooterInSection(UITableView tableView, long section)
default UIView tableViewViewForHeaderInSection(UITableView tableView, long section)
default void tableViewWillBeginEditingRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default NSIndexPath tableViewWillDeselectRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default void tableViewWillDisplayCellForRowAtIndexPath(UITableView tableView, UITableViewCell cell, NSIndexPath indexPath)
default void tableViewWillDisplayFooterViewForSection(UITableView tableView, UIView view, long section)
default void tableViewWillDisplayHeaderViewForSection(UITableView tableView, UIView view, long section)
default NSIndexPath tableViewWillSelectRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default UISwipeActionsConfiguration tableViewLeadingSwipeActionsConfigurationForRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default boolean tableViewShouldSpringLoadRowAtIndexPathWithContext(UITableView tableView, NSIndexPath indexPath, UISpringLoadedInteractionContext context)
default UISwipeActionsConfiguration tableViewTrailingSwipeActionsConfigurationForRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)
default UIContextMenuConfiguration tableViewContextMenuConfigurationForRowAtIndexPathPoint(UITableView tableView, NSIndexPath indexPath, CGPoint point)
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 spacedefault void tableViewDidBeginMultipleSelectionInteractionAtIndexPath(UITableView tableView, NSIndexPath indexPath)
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.
default UITargetedPreview tableViewPreviewForDismissingContextMenuWithConfiguration(UITableView tableView, UIContextMenuConfiguration configuration)
tableView - This UITableView.configuration - The configuration of the menu displayed by this interaction.default UITargetedPreview tableViewPreviewForHighlightingContextMenuWithConfiguration(UITableView tableView, UIContextMenuConfiguration configuration)
tableView - This UITableView.configuration - The configuration of the menu about to be displayed by this interaction.default boolean tableViewShouldBeginMultipleSelectionInteractionAtIndexPath(UITableView tableView, NSIndexPath indexPath)
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.
default void tableViewWillPerformPreviewActionForMenuWithConfigurationAnimator(UITableView tableView, UIContextMenuConfiguration configuration, UIContextMenuInteractionCommitAnimating animator)
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.default void tableViewDidEndMultipleSelectionInteraction(UITableView tableView)
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.
default void tableViewWillDisplayContextMenuWithConfigurationAnimator(UITableView tableView, UIContextMenuConfiguration configuration, UIContextMenuInteractionAnimating animator)
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.default void tableViewWillEndContextMenuInteractionWithConfigurationAnimator(UITableView tableView, UIContextMenuConfiguration configuration, UIContextMenuInteractionAnimating animator)
tableView - This UITableView.configuration - Ending configuration.animator - Disappearance animator. Add animations to run them alongside the disappearance transition.default boolean tableViewSelectionFollowsFocusForRowAtIndexPath(UITableView tableView, NSIndexPath indexPath)