public interface UICollectionViewDelegate extends UIScrollViewDelegate
scrollViewDidChangeAdjustedContentInset, scrollViewDidEndDecelerating, scrollViewDidEndDraggingWillDecelerate, scrollViewDidEndScrollingAnimation, scrollViewDidEndZoomingWithViewAtScale, scrollViewDidScroll, scrollViewDidScrollToTop, scrollViewDidZoom, scrollViewShouldScrollToTop, scrollViewWillBeginDecelerating, scrollViewWillBeginDragging, scrollViewWillBeginZoomingWithView, scrollViewWillEndDraggingWithVelocityTargetContentOffset, viewForZoomingInScrollViewdefault boolean collectionViewCanFocusItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)
default boolean collectionViewCanPerformActionForItemAtIndexPathWithSender(UICollectionView collectionView, org.moe.natj.objc.SEL action, NSIndexPath indexPath, java.lang.Object sender)
default void collectionViewDidDeselectItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)
default void collectionViewDidEndDisplayingCellForItemAtIndexPath(UICollectionView collectionView, UICollectionViewCell cell, NSIndexPath indexPath)
default void collectionViewDidEndDisplayingSupplementaryViewForElementOfKindAtIndexPath(UICollectionView collectionView, UICollectionReusableView view, java.lang.String elementKind, NSIndexPath indexPath)
default void collectionViewDidHighlightItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)
default void collectionViewDidSelectItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)
default void collectionViewDidUnhighlightItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)
default void collectionViewDidUpdateFocusInContextWithAnimationCoordinator(UICollectionView collectionView, UICollectionViewFocusUpdateContext context, UIFocusAnimationCoordinator coordinator)
default void collectionViewPerformActionForItemAtIndexPathWithSender(UICollectionView collectionView, org.moe.natj.objc.SEL action, NSIndexPath indexPath, java.lang.Object sender)
default boolean collectionViewShouldDeselectItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)
default boolean collectionViewShouldHighlightItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)
(when the touch begins) 1. -collectionView:shouldHighlightItemAtIndexPath: 2. -collectionView:didHighlightItemAtIndexPath:
(when the touch lifts) 3. -collectionView:shouldSelectItemAtIndexPath: or -collectionView:shouldDeselectItemAtIndexPath: 4. -collectionView:didSelectItemAtIndexPath: or -collectionView:didDeselectItemAtIndexPath: 5. -collectionView:didUnhighlightItemAtIndexPath:
default boolean collectionViewShouldSelectItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)
default boolean collectionViewShouldShowMenuForItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)
default boolean collectionViewShouldUpdateFocusInContext(UICollectionView collectionView, UICollectionViewFocusUpdateContext context)
default CGPoint collectionViewTargetContentOffsetForProposedContentOffset(UICollectionView collectionView, CGPoint proposedContentOffset)
default NSIndexPath collectionViewTargetIndexPathForMoveFromItemAtIndexPathToProposedIndexPath(UICollectionView collectionView, NSIndexPath currentIndexPath, NSIndexPath proposedIndexPath)
default UICollectionViewTransitionLayout collectionViewTransitionLayoutForOldLayoutNewLayout(UICollectionView collectionView, UICollectionViewLayout fromLayout, UICollectionViewLayout toLayout)
default void collectionViewWillDisplayCellForItemAtIndexPath(UICollectionView collectionView, UICollectionViewCell cell, NSIndexPath indexPath)
default void collectionViewWillDisplaySupplementaryViewForElementKindAtIndexPath(UICollectionView collectionView, UICollectionReusableView view, java.lang.String elementKind, NSIndexPath indexPath)
default NSIndexPath indexPathForPreferredFocusedViewInCollectionView(UICollectionView collectionView)
default boolean collectionViewShouldSpringLoadItemAtIndexPathWithContext(UICollectionView collectionView, NSIndexPath indexPath, UISpringLoadedInteractionContext context)
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.
default UIContextMenuConfiguration collectionViewContextMenuConfigurationForItemAtIndexPathPoint(UICollectionView collectionView, NSIndexPath indexPath, CGPoint point)
collectionView - This UICollectionView.indexPath - IndexPath of the item for which a configuration is being requested.point - Location in the collection view's coordinate spacedefault void collectionViewDidBeginMultipleSelectionInteractionAtIndexPath(UICollectionView collectionView, 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 collectionViewPreviewForDismissingContextMenuWithConfiguration(UICollectionView collectionView, UIContextMenuConfiguration configuration)
collectionView - This UICollectionView.configuration - The configuration of the menu displayed by this interaction.default UITargetedPreview collectionViewPreviewForHighlightingContextMenuWithConfiguration(UICollectionView collectionView, UIContextMenuConfiguration configuration)
collectionView - This UICollectionView.configuration - The configuration of the menu about to be displayed by this interaction.default boolean collectionViewShouldBeginMultipleSelectionInteractionAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)
After a multi-select gesture is recognized, this method will be called before allowsMultipleSelection is automatically set to YES to allow the user to select multiple contiguous items using a two-finger pan gesture across the constrained scroll direction.
If the collection view has no constrained scroll direction (i.e., the collection view scrolls both horizontally and vertically), then this method will not be called and the multi-select gesture will be disabled.
If this method is not implemented, the default is NO.
default void collectionViewWillPerformPreviewActionForMenuWithConfigurationAnimator(UICollectionView collectionView, UIContextMenuConfiguration configuration, UIContextMenuInteractionCommitAnimating animator)
collectionView - This UICollectionView.configuration - Configuration of the currently displayed menu.animator - Commit animator. Add animations to this object to run them alongside the commit transition.default void collectionViewDidEndMultipleSelectionInteraction(UICollectionView collectionView)
At this point, the collection 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 boolean collectionViewCanEditItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)
collectionView - The collection view object requesting this information.indexPath - An index path locating an item in `collectionView`.default void collectionViewWillDisplayContextMenuWithConfigurationAnimator(UICollectionView collectionView, UIContextMenuConfiguration configuration, UIContextMenuInteractionAnimating animator)
collectionView - This UICollectionView.configuration - The configuration of the menu about to be displayed.animator - Appearance animator. Add animations to run them alongside the appearance transition.default void collectionViewWillEndContextMenuInteractionWithConfigurationAnimator(UICollectionView collectionView, UIContextMenuConfiguration configuration, UIContextMenuInteractionAnimating animator)
collectionView - This UICollectionView.configuration - Ending configuration.animator - Disappearance animator. Add animations to run them alongside the disappearance transition.default UIWindowSceneActivationConfiguration collectionViewSceneActivationConfigurationForItemAtIndexPathPoint(UICollectionView collectionView, NSIndexPath indexPath, CGPoint point)
collectionView - The collection viewindexPath - The index path of the cell being interacted withpoint - The centroid of the interaction in the collection view's coordinate space.default boolean collectionViewSelectionFollowsFocusForItemAtIndexPath(UICollectionView collectionView, NSIndexPath indexPath)
default NSIndexPath collectionViewTargetIndexPathForMoveOfItemFromOriginalIndexPathAtCurrentIndexPathToProposedIndexPath(UICollectionView collectionView, NSIndexPath originalIndexPath, NSIndexPath currentIndexPath, NSIndexPath proposedIndexPath)