Instance Method


Returns a Boolean value indicating whether you want the spring-loading interaction effect displayed for the specified item.


optional func collectionView(_ collectionView: UICollectionView, shouldSpringLoadItemAt indexPath: IndexPath, with context: UISpringLoadedInteractionContext) -> Bool



The collection view object notifying you of the interaction.


The index path of the item for which the spring-loading behavior applies.


A context object containing information about the item and view on which to display the spring-loading interaction.

Return Value

true to apply the spring-loading behavior for the item or false to suppress the behavior altogether.


If you do not implement this method, the collection view assumes a return value of true.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software