SwipeCollectionViewCellDelegate
public protocol SwipeCollectionViewCellDelegate: class
                The SwipeCollectionViewCellDelegate protocol is adopted by an object that manages the display of action buttons when the item is swiped.
- 
                  
                  
Asks the delegate for the actions to display in response to a swipe in the specified item.
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, editActionsForItemAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> [SwipeAction]?Parameters
collectionViewThe collection view object which owns the item requesting this information.
indexPathThe index path of the item.
orientationThe side of the item requesting this information.
Return Value
An array of
SwipeActionobjects representing the actions for the item. Each action you provide is used to create a button that the user can tap. Returningnilwill prevent swiping for the supplied orientation. - 
                  
collectionView(_:editActionsOptionsForItemAt:for:)Default implementationAsks the delegate for the display options to be used while presenting the action buttons.
Note
If not implemented, a default
SwipeOptionsinstance is used.Default Implementation
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, editActionsOptionsForItemAt indexPath: IndexPath, for orientation: SwipeActionsOrientation) -> SwipeOptionsParameters
collectionViewThe collection view object which owns the item requesting this information.
indexPathThe index path of the item.
orientationThe side of the item requesting this information.
Return Value
A
SwipeOptionsinstance which configures the behavior of the action buttons. - 
                  
collectionView(_:willBeginEditingItemAt:for:)Default implementationTells the delegate that the collection view is about to go into editing mode.
Default Implementation
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, willBeginEditingItemAt indexPath: IndexPath, for orientation: SwipeActionsOrientation)Parameters
collectionViewThe collection view object providing this information.
indexPathThe index path of the item.
orientationThe side of the item.
 - 
                  
collectionView(_:didEndEditingItemAt:for:)Default implementationTells the delegate that the collection view has left editing mode.
Default Implementation
Declaration
Swift
func collectionView(_ collectionView: UICollectionView, didEndEditingItemAt indexPath: IndexPath?, for orientation: SwipeActionsOrientation)Parameters
collectionViewThe collection view object providing this information.
indexPathThe index path of the item.
orientationThe side of the item.
 - 
                  
visibleRect(for:)Default implementationAsks the delegate for visibile rectangle of the collection view, which is used to ensure swipe actions are vertically centered within the visible portion of the item.
Note
The returned rectange should be in the collection view’s own coordinate system. Returning
nilwill result in no vertical offset to be be calculated.Default Implementation
Declaration
Swift
func visibleRect(for collectionView: UICollectionView) -> CGRect?Parameters
collectionViewThe collection view object providing this information.
Return Value
The visible rectangle of the collection view.
 
View on GitHub
        SwipeCollectionViewCellDelegate Protocol Reference