Contents

indexPathsToDeleteForDecorationView(ofKind:)

Retrieves an array of index paths representing the decoration views to remove.

Declaration

func indexPathsToDeleteForDecorationView(ofKind elementKind: String) -> [IndexPath]

Parameters

  • elementKind:

    The specific type of decoration view.

Return Value

An array of NSIndexPath objects indicating the decoration views you want to remove or an empty array if you do not want to remove any views of the given kind.

Discussion

The collection view calls this method whenever you delete cells or sections to the collection view. Implementing this method gives your layout object an opportunity to remove any decoration views that are no longer needed.

The collection view calls this method between its calls to prepare(forCollectionViewUpdates:) and finalizeCollectionViewUpdates().

See Also

Responding to collection view updates