Contents

indexPathsToInsertForDecorationView(ofKind:)

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

Declaration

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

Parameters

  • elementKind:

    The specific type of decoration view.

Return Value

An array of NSIndexPath objects indicating the location of the new decoration views or an empty array if you do not want to add any decoration views.

Discussion

The collection view calls this method whenever you add cells or sections to the collection view. Implementing this method gives your layout object an opportunity to add new decoration views to complement the additions.

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

See Also

Responding to collection view updates