Instance Method

collectionView:shouldSpringLoadItemAtIndexPath:withContext:

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

Declaration

- (BOOL)collectionView:(UICollectionView *)collectionView shouldSpringLoadItemAtIndexPath:(NSIndexPath *)indexPath withContext:(id<UISpringLoadedInteractionContext>)context;

Parameters

collectionView

The collection view object notifying you of the interaction.

indexPath

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

context

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

Return Value

YES to apply the spring-loading behavior for the item or NO to suppress the behavior altogether.

Discussion

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