pub unsafe trait UICollectionViewDelegate: UIScrollViewDelegate + MainThreadOnly {
Show 40 methods
// Provided methods
fn collectionView_shouldHighlightItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
) -> bool
where Self: Sized + Message { ... }
fn collectionView_didHighlightItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
)
where Self: Sized + Message { ... }
fn collectionView_didUnhighlightItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
)
where Self: Sized + Message { ... }
fn collectionView_shouldSelectItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
) -> bool
where Self: Sized + Message { ... }
fn collectionView_shouldDeselectItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
) -> bool
where Self: Sized + Message { ... }
fn collectionView_didSelectItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
)
where Self: Sized + Message { ... }
fn collectionView_didDeselectItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
)
where Self: Sized + Message { ... }
fn collectionView_canPerformPrimaryActionForItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
) -> bool
where Self: Sized + Message { ... }
fn collectionView_performPrimaryActionForItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
)
where Self: Sized + Message { ... }
fn collectionView_willDisplayCell_forItemAtIndexPath(
&self,
collection_view: &UICollectionView,
cell: &UICollectionViewCell,
index_path: &NSIndexPath,
)
where Self: Sized + Message { ... }
fn collectionView_willDisplaySupplementaryView_forElementKind_atIndexPath(
&self,
collection_view: &UICollectionView,
view: &UICollectionReusableView,
element_kind: &NSString,
index_path: &NSIndexPath,
)
where Self: Sized + Message { ... }
fn collectionView_didEndDisplayingCell_forItemAtIndexPath(
&self,
collection_view: &UICollectionView,
cell: &UICollectionViewCell,
index_path: &NSIndexPath,
)
where Self: Sized + Message { ... }
fn collectionView_didEndDisplayingSupplementaryView_forElementOfKind_atIndexPath(
&self,
collection_view: &UICollectionView,
view: &UICollectionReusableView,
element_kind: &NSString,
index_path: &NSIndexPath,
)
where Self: Sized + Message { ... }
fn collectionView_shouldShowMenuForItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
) -> bool
where Self: Sized + Message { ... }
unsafe fn collectionView_canPerformAction_forItemAtIndexPath_withSender(
&self,
collection_view: &UICollectionView,
action: Sel,
index_path: &NSIndexPath,
sender: Option<&AnyObject>,
) -> bool
where Self: Sized + Message { ... }
unsafe fn collectionView_performAction_forItemAtIndexPath_withSender(
&self,
collection_view: &UICollectionView,
action: Sel,
index_path: &NSIndexPath,
sender: Option<&AnyObject>,
)
where Self: Sized + Message { ... }
fn collectionView_transitionLayoutForOldLayout_newLayout(
&self,
collection_view: &UICollectionView,
from_layout: &UICollectionViewLayout,
to_layout: &UICollectionViewLayout,
) -> Retained<UICollectionViewTransitionLayout>
where Self: Sized + Message { ... }
fn collectionView_canFocusItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
) -> bool
where Self: Sized + Message { ... }
fn collectionView_shouldUpdateFocusInContext(
&self,
collection_view: &UICollectionView,
context: &UICollectionViewFocusUpdateContext,
) -> bool
where Self: Sized + Message { ... }
fn collectionView_didUpdateFocusInContext_withAnimationCoordinator(
&self,
collection_view: &UICollectionView,
context: &UICollectionViewFocusUpdateContext,
coordinator: &UIFocusAnimationCoordinator,
)
where Self: Sized + Message { ... }
fn indexPathForPreferredFocusedViewInCollectionView(
&self,
collection_view: &UICollectionView,
) -> Option<Retained<NSIndexPath>>
where Self: Sized + Message { ... }
fn collectionView_selectionFollowsFocusForItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
) -> bool
where Self: Sized + Message { ... }
fn collectionView_targetIndexPathForMoveOfItemFromOriginalIndexPath_atCurrentIndexPath_toProposedIndexPath(
&self,
collection_view: &UICollectionView,
original_index_path: &NSIndexPath,
current_index_path: &NSIndexPath,
proposed_index_path: &NSIndexPath,
) -> Retained<NSIndexPath>
where Self: Sized + Message { ... }
fn collectionView_targetIndexPathForMoveFromItemAtIndexPath_toProposedIndexPath(
&self,
collection_view: &UICollectionView,
current_index_path: &NSIndexPath,
proposed_index_path: &NSIndexPath,
) -> Retained<NSIndexPath>
where Self: Sized + Message { ... }
fn collectionView_targetContentOffsetForProposedContentOffset(
&self,
collection_view: &UICollectionView,
proposed_content_offset: CGPoint,
) -> CGPoint
where Self: Sized + Message { ... }
fn collectionView_canEditItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
) -> bool
where Self: Sized + Message { ... }
fn collectionView_shouldSpringLoadItemAtIndexPath_withContext(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
context: &ProtocolObject<dyn UISpringLoadedInteractionContext>,
) -> bool
where Self: Sized + Message { ... }
fn collectionView_shouldBeginMultipleSelectionInteractionAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
) -> bool
where Self: Sized + Message { ... }
fn collectionView_didBeginMultipleSelectionInteractionAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
)
where Self: Sized + Message { ... }
fn collectionViewDidEndMultipleSelectionInteraction(
&self,
collection_view: &UICollectionView,
)
where Self: Sized + Message { ... }
fn collectionView_contextMenuConfigurationForItemsAtIndexPaths_point(
&self,
collection_view: &UICollectionView,
index_paths: &NSArray<NSIndexPath>,
point: CGPoint,
) -> Option<Retained<UIContextMenuConfiguration>>
where Self: Sized + Message { ... }
fn collectionView_contextMenuConfiguration_highlightPreviewForItemAtIndexPath(
&self,
collection_view: &UICollectionView,
configuration: &UIContextMenuConfiguration,
index_path: &NSIndexPath,
) -> Option<Retained<UITargetedPreview>>
where Self: Sized + Message { ... }
fn collectionView_contextMenuConfiguration_dismissalPreviewForItemAtIndexPath(
&self,
collection_view: &UICollectionView,
configuration: &UIContextMenuConfiguration,
index_path: &NSIndexPath,
) -> Option<Retained<UITargetedPreview>>
where Self: Sized + Message { ... }
fn collectionView_willPerformPreviewActionForMenuWithConfiguration_animator(
&self,
collection_view: &UICollectionView,
configuration: &UIContextMenuConfiguration,
animator: &ProtocolObject<dyn UIContextMenuInteractionCommitAnimating>,
)
where Self: Sized + Message { ... }
fn collectionView_willDisplayContextMenuWithConfiguration_animator(
&self,
collection_view: &UICollectionView,
configuration: &UIContextMenuConfiguration,
animator: Option<&ProtocolObject<dyn UIContextMenuInteractionAnimating>>,
)
where Self: Sized + Message { ... }
fn collectionView_willEndContextMenuInteractionWithConfiguration_animator(
&self,
collection_view: &UICollectionView,
configuration: &UIContextMenuConfiguration,
animator: Option<&ProtocolObject<dyn UIContextMenuInteractionAnimating>>,
)
where Self: Sized + Message { ... }
fn collectionView_sceneActivationConfigurationForItemAtIndexPath_point(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
point: CGPoint,
) -> Option<Retained<UIWindowSceneActivationConfiguration>>
where Self: Sized + Message { ... }
fn collectionView_contextMenuConfigurationForItemAtIndexPath_point(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
point: CGPoint,
) -> Option<Retained<UIContextMenuConfiguration>>
where Self: Sized + Message { ... }
fn collectionView_previewForHighlightingContextMenuWithConfiguration(
&self,
collection_view: &UICollectionView,
configuration: &UIContextMenuConfiguration,
) -> Option<Retained<UITargetedPreview>>
where Self: Sized + Message { ... }
fn collectionView_previewForDismissingContextMenuWithConfiguration(
&self,
collection_view: &UICollectionView,
configuration: &UIContextMenuConfiguration,
) -> Option<Retained<UITargetedPreview>>
where Self: Sized + Message { ... }
}UICollectionView and UIScrollView only.Expand description
Provided Methods§
fn collectionView_shouldHighlightItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, ) -> bool
UIResponder and UIView only.fn collectionView_didHighlightItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, )
UIResponder and UIView only.fn collectionView_didUnhighlightItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, )
UIResponder and UIView only.fn collectionView_shouldSelectItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, ) -> bool
UIResponder and UIView only.fn collectionView_shouldDeselectItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, ) -> bool
UIResponder and UIView only.fn collectionView_didSelectItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, )
UIResponder and UIView only.fn collectionView_didDeselectItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, )
UIResponder and UIView only.Sourcefn collectionView_canPerformPrimaryActionForItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
) -> bool
Available on crate features UIResponder and UIView only.
fn collectionView_canPerformPrimaryActionForItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, ) -> bool
UIResponder and UIView only.Called to determine if a primary action can be performed for the item at the given indexPath.
See
collectionView:performPrimaryActionForItemAtIndexPath:for more details about primary actions.
Parameter collectionView: This UICollectionView
Parameter indexPath: NSIndexPath of the item
Returns: YES if the primary action can be performed; otherwise NO. If not implemented, defaults to YES when not editing
and NO when editing.
Sourcefn collectionView_performPrimaryActionForItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
)
Available on crate features UIResponder and UIView only.
fn collectionView_performPrimaryActionForItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, )
UIResponder and UIView only.Called when the primary action should be performed for the item at the given indexPath.
Primary actions allow you to distinguish between a change of selection (which can be based on focus changes or
other indirect selection changes) and distinct user actions. Primary actions are performed when the user selects a cell without extending
an existing selection. This is called after
shouldSelectItemand
didSelectItem, regardless of whether the cell’s selection
state was allowed to change.
As an example, use
didSelectItemAtIndexPathfor updating state in the current view controller (i.e. buttons, title, etc) and
use the primary action for navigation or showing another split view column.
Parameter collectionView: This UICollectionView
Parameter indexPath: NSIndexPath of the item to perform the action on
fn collectionView_willDisplayCell_forItemAtIndexPath( &self, collection_view: &UICollectionView, cell: &UICollectionViewCell, index_path: &NSIndexPath, )
UICollectionViewCell and UIResponder and UIView only.fn collectionView_willDisplaySupplementaryView_forElementKind_atIndexPath( &self, collection_view: &UICollectionView, view: &UICollectionReusableView, element_kind: &NSString, index_path: &NSIndexPath, )
UICollectionViewCell and UIResponder and UIView only.fn collectionView_didEndDisplayingCell_forItemAtIndexPath( &self, collection_view: &UICollectionView, cell: &UICollectionViewCell, index_path: &NSIndexPath, )
UICollectionViewCell and UIResponder and UIView only.fn collectionView_didEndDisplayingSupplementaryView_forElementOfKind_atIndexPath( &self, collection_view: &UICollectionView, view: &UICollectionReusableView, element_kind: &NSString, index_path: &NSIndexPath, )
UICollectionViewCell and UIResponder and UIView only.fn collectionView_shouldShowMenuForItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, ) -> bool
UIResponder and UIView only.Sourceunsafe fn collectionView_canPerformAction_forItemAtIndexPath_withSender(
&self,
collection_view: &UICollectionView,
action: Sel,
index_path: &NSIndexPath,
sender: Option<&AnyObject>,
) -> bool
👎DeprecatedAvailable on crate features UIResponder and UIView only.
unsafe fn collectionView_canPerformAction_forItemAtIndexPath_withSender( &self, collection_view: &UICollectionView, action: Sel, index_path: &NSIndexPath, sender: Option<&AnyObject>, ) -> bool
UIResponder and UIView only.§Safety
actionmust be a valid selector.sendershould be of the correct type.
Sourceunsafe fn collectionView_performAction_forItemAtIndexPath_withSender(
&self,
collection_view: &UICollectionView,
action: Sel,
index_path: &NSIndexPath,
sender: Option<&AnyObject>,
)
👎DeprecatedAvailable on crate features UIResponder and UIView only.
unsafe fn collectionView_performAction_forItemAtIndexPath_withSender( &self, collection_view: &UICollectionView, action: Sel, index_path: &NSIndexPath, sender: Option<&AnyObject>, )
UIResponder and UIView only.§Safety
actionmust be a valid selector.sendershould be of the correct type.
fn collectionView_transitionLayoutForOldLayout_newLayout( &self, collection_view: &UICollectionView, from_layout: &UICollectionViewLayout, to_layout: &UICollectionViewLayout, ) -> Retained<UICollectionViewTransitionLayout>
UICollectionViewLayout and UICollectionViewTransitionLayout and UIResponder and UIView only.fn collectionView_canFocusItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, ) -> bool
UIResponder and UIView only.fn collectionView_shouldUpdateFocusInContext( &self, collection_view: &UICollectionView, context: &UICollectionViewFocusUpdateContext, ) -> bool
UIFocus and UIResponder and UIView only.fn collectionView_didUpdateFocusInContext_withAnimationCoordinator( &self, collection_view: &UICollectionView, context: &UICollectionViewFocusUpdateContext, coordinator: &UIFocusAnimationCoordinator, )
UIFocus and UIFocusAnimationCoordinator and UIResponder and UIView only.fn indexPathForPreferredFocusedViewInCollectionView( &self, collection_view: &UICollectionView, ) -> Option<Retained<NSIndexPath>>
UIResponder and UIView only.Sourcefn collectionView_selectionFollowsFocusForItemAtIndexPath(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
) -> bool
Available on crate features UIResponder and UIView only.
fn collectionView_selectionFollowsFocusForItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, ) -> bool
UIResponder and UIView only.Determines if the item at the specified index path should also become selected when focus moves to it. If the collection view’s global selectionFollowsFocus is enabled, this method will allow you to override that behavior on a per-index path basis. This method is not called if selectionFollowsFocus is disabled.
fn collectionView_targetIndexPathForMoveOfItemFromOriginalIndexPath_atCurrentIndexPath_toProposedIndexPath( &self, collection_view: &UICollectionView, original_index_path: &NSIndexPath, current_index_path: &NSIndexPath, proposed_index_path: &NSIndexPath, ) -> Retained<NSIndexPath>
UIResponder and UIView only.fn collectionView_targetIndexPathForMoveFromItemAtIndexPath_toProposedIndexPath( &self, collection_view: &UICollectionView, current_index_path: &NSIndexPath, proposed_index_path: &NSIndexPath, ) -> Retained<NSIndexPath>
UIResponder and UIView only.fn collectionView_targetContentOffsetForProposedContentOffset( &self, collection_view: &UICollectionView, proposed_content_offset: CGPoint, ) -> CGPoint
UIResponder and UIView and objc2-core-foundation only.fn collectionView_canEditItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, ) -> bool
UIResponder and UIView only.fn collectionView_shouldSpringLoadItemAtIndexPath_withContext( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, context: &ProtocolObject<dyn UISpringLoadedInteractionContext>, ) -> bool
UIResponder and UISpringLoadedInteraction and UIView only.fn collectionView_shouldBeginMultipleSelectionInteractionAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, ) -> bool
UIResponder and UIView only.fn collectionView_didBeginMultipleSelectionInteractionAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, )
UIResponder and UIView only.fn collectionViewDidEndMultipleSelectionInteraction( &self, collection_view: &UICollectionView, )
UIResponder and UIView only.Sourcefn collectionView_contextMenuConfigurationForItemsAtIndexPaths_point(
&self,
collection_view: &UICollectionView,
index_paths: &NSArray<NSIndexPath>,
point: CGPoint,
) -> Option<Retained<UIContextMenuConfiguration>>
Available on crate features UIContextMenuConfiguration and UIResponder and UIView and objc2-core-foundation only.
fn collectionView_contextMenuConfigurationForItemsAtIndexPaths_point( &self, collection_view: &UICollectionView, index_paths: &NSArray<NSIndexPath>, point: CGPoint, ) -> Option<Retained<UIContextMenuConfiguration>>
UIContextMenuConfiguration and UIResponder and UIView and objc2-core-foundation only.Called when a context menu is invoked from this collection view.
Parameter collectionView: The
UICollectionView.
Parameter indexPaths: An array of index paths on which the menu acts.
Parameter point: Touch location in the collection view’s coordinate space.
Returns: A
UIContextMenuConfigurationdescribing 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.
The
indexPathsarray may contain 0-many items:
- An empty array indicates that the menu was invoked in the space between cells (or any location that does not map to an item index path).
- An array with multiple index paths indicates that the menu was invoked on an item within a multiple selection.
Sourcefn collectionView_contextMenuConfiguration_highlightPreviewForItemAtIndexPath(
&self,
collection_view: &UICollectionView,
configuration: &UIContextMenuConfiguration,
index_path: &NSIndexPath,
) -> Option<Retained<UITargetedPreview>>
Available on crate features UIContextMenuConfiguration and UIResponder and UITargetedPreview and UIView only.
fn collectionView_contextMenuConfiguration_highlightPreviewForItemAtIndexPath( &self, collection_view: &UICollectionView, configuration: &UIContextMenuConfiguration, index_path: &NSIndexPath, ) -> Option<Retained<UITargetedPreview>>
UIContextMenuConfiguration and UIResponder and UITargetedPreview and UIView only.Called when a context menu interaction begins in this collection view to request a preview for the interaction’s initial highlight effect.
Return a
UITargetedPreviewcorresponding to the item at the given indexPath.
Parameter collectionView: The
UICollectionView.
Parameter configuration: Configuration of the menu that will be presented if the interaction proceeds.
Parameter indexPath: Index path of the item at which the interaction is occurring.
Sourcefn collectionView_contextMenuConfiguration_dismissalPreviewForItemAtIndexPath(
&self,
collection_view: &UICollectionView,
configuration: &UIContextMenuConfiguration,
index_path: &NSIndexPath,
) -> Option<Retained<UITargetedPreview>>
Available on crate features UIContextMenuConfiguration and UIResponder and UITargetedPreview and UIView only.
fn collectionView_contextMenuConfiguration_dismissalPreviewForItemAtIndexPath( &self, collection_view: &UICollectionView, configuration: &UIContextMenuConfiguration, index_path: &NSIndexPath, ) -> Option<Retained<UITargetedPreview>>
UIContextMenuConfiguration and UIResponder and UITargetedPreview and UIView only.Called when a context menu presented from this collection view is dismissed. Return a
UITargetedPreviewcorresponding to the item at the given indexPath.
Parameter collectionView: The
UICollectionView.
Parameter configuration: Configuration of the menu being dismissed.
Parameter indexPath: Index path of the item to which the menu is being dismissed.
Sourcefn collectionView_willPerformPreviewActionForMenuWithConfiguration_animator(
&self,
collection_view: &UICollectionView,
configuration: &UIContextMenuConfiguration,
animator: &ProtocolObject<dyn UIContextMenuInteractionCommitAnimating>,
)
Available on crate features UIContextMenuConfiguration and UIContextMenuInteraction and UIResponder and UIView only.
fn collectionView_willPerformPreviewActionForMenuWithConfiguration_animator( &self, collection_view: &UICollectionView, configuration: &UIContextMenuConfiguration, animator: &ProtocolObject<dyn UIContextMenuInteractionCommitAnimating>, )
UIContextMenuConfiguration and UIContextMenuInteraction and UIResponder and UIView only.Called when the interaction is about to “commit” in response to the user tapping the preview.
Parameter collectionView: The
UICollectionView.
Parameter configuration: Configuration of the currently displayed menu.
Parameter animator: Commit animator. Add animations to this object to run them alongside the commit transition.
Sourcefn collectionView_willDisplayContextMenuWithConfiguration_animator(
&self,
collection_view: &UICollectionView,
configuration: &UIContextMenuConfiguration,
animator: Option<&ProtocolObject<dyn UIContextMenuInteractionAnimating>>,
)
Available on crate features UIContextMenuConfiguration and UIContextMenuInteraction and UIResponder and UIView only.
fn collectionView_willDisplayContextMenuWithConfiguration_animator( &self, collection_view: &UICollectionView, configuration: &UIContextMenuConfiguration, animator: Option<&ProtocolObject<dyn UIContextMenuInteractionAnimating>>, )
UIContextMenuConfiguration and UIContextMenuInteraction and UIResponder and UIView only.Called when the collection view is about to display a menu.
Parameter collectionView: The
UICollectionView.
Parameter configuration: The configuration of the menu about to be displayed.
Parameter animator: Appearance animator. Add animations to run them alongside the appearance transition.
Sourcefn collectionView_willEndContextMenuInteractionWithConfiguration_animator(
&self,
collection_view: &UICollectionView,
configuration: &UIContextMenuConfiguration,
animator: Option<&ProtocolObject<dyn UIContextMenuInteractionAnimating>>,
)
Available on crate features UIContextMenuConfiguration and UIContextMenuInteraction and UIResponder and UIView only.
fn collectionView_willEndContextMenuInteractionWithConfiguration_animator( &self, collection_view: &UICollectionView, configuration: &UIContextMenuConfiguration, animator: Option<&ProtocolObject<dyn UIContextMenuInteractionAnimating>>, )
UIContextMenuConfiguration and UIContextMenuInteraction and UIResponder and UIView only.Called when the collection view’s context menu interaction is about to end.
Parameter collectionView: The
UICollectionView.
Parameter configuration: Ending configuration.
Parameter animator: Disappearance animator. Add animations to run them alongside the disappearance transition.
Sourcefn collectionView_sceneActivationConfigurationForItemAtIndexPath_point(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
point: CGPoint,
) -> Option<Retained<UIWindowSceneActivationConfiguration>>
Available on crate features UIResponder and UIView and UIWindowSceneActivationConfiguration and objc2-core-foundation only.
fn collectionView_sceneActivationConfigurationForItemAtIndexPath_point( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, point: CGPoint, ) -> Option<Retained<UIWindowSceneActivationConfiguration>>
UIResponder and UIView and UIWindowSceneActivationConfiguration and objc2-core-foundation only.Return a valid
UIWindowSceneActivationConfigurationto allow for the cell to be expanded into a new scene. Return nil to prevent the interaction from starting.
Parameter collectionView: The collection view
Parameter indexPath: The index path of the cell being interacted with
Parameter point: The centroid of the interaction in the collection view’s coordinate space.
Sourcefn collectionView_contextMenuConfigurationForItemAtIndexPath_point(
&self,
collection_view: &UICollectionView,
index_path: &NSIndexPath,
point: CGPoint,
) -> Option<Retained<UIContextMenuConfiguration>>
👎DeprecatedAvailable on crate features UIContextMenuConfiguration and UIResponder and UIView and objc2-core-foundation only.
fn collectionView_contextMenuConfigurationForItemAtIndexPath_point( &self, collection_view: &UICollectionView, index_path: &NSIndexPath, point: CGPoint, ) -> Option<Retained<UIContextMenuConfiguration>>
UIContextMenuConfiguration and UIResponder and UIView and objc2-core-foundation only.Called when the interaction begins.
Parameter collectionView: The
UICollectionView.
Parameter indexPath: IndexPath of the item for which a configuration is being requested.
Parameter point: Touch location in the collection 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. If the non-deprecated replacement for the configuration, highlight preview, or dismissal preview methods is implemented this method is not called.
Sourcefn collectionView_previewForHighlightingContextMenuWithConfiguration(
&self,
collection_view: &UICollectionView,
configuration: &UIContextMenuConfiguration,
) -> Option<Retained<UITargetedPreview>>
👎DeprecatedAvailable on crate features UIContextMenuConfiguration and UIResponder and UITargetedPreview and UIView only.
fn collectionView_previewForHighlightingContextMenuWithConfiguration( &self, collection_view: &UICollectionView, configuration: &UIContextMenuConfiguration, ) -> Option<Retained<UITargetedPreview>>
UIContextMenuConfiguration and UIResponder and UITargetedPreview and UIView only.Called when the interaction begins. Return a UITargetedPreview describing the desired highlight preview. If the non-deprecated replacement for the configuration, highlight preview, or dismissal preview methods is implemented this method is not called.
Parameter collectionView: The
UICollectionView.
Parameter configuration: The configuration of the menu about to be displayed by this interaction.
Sourcefn collectionView_previewForDismissingContextMenuWithConfiguration(
&self,
collection_view: &UICollectionView,
configuration: &UIContextMenuConfiguration,
) -> Option<Retained<UITargetedPreview>>
👎DeprecatedAvailable on crate features UIContextMenuConfiguration and UIResponder and UITargetedPreview and UIView only.
fn collectionView_previewForDismissingContextMenuWithConfiguration( &self, collection_view: &UICollectionView, configuration: &UIContextMenuConfiguration, ) -> Option<Retained<UITargetedPreview>>
UIContextMenuConfiguration and UIResponder and UITargetedPreview and UIView only.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. If the non-deprecated replacement for the configuration, highlight preview, or dismissal preview methods is implemented this method is not called.
Parameter collectionView: The
UICollectionView.
Parameter configuration: The configuration of the menu displayed by this interaction.
Trait Implementations§
Source§impl ProtocolType for dyn UICollectionViewDelegate
impl ProtocolType for dyn UICollectionViewDelegate
impl<T> ImplementedBy<T> for dyn UICollectionViewDelegate
Implementations on Foreign Types§
impl<T> UICollectionViewDelegate for ProtocolObject<T>where
T: ?Sized + UICollectionViewDelegate,
Implementors§
impl UICollectionViewDelegate for UICollectionViewController
UICollectionViewController only.