---
title: "finalLayoutAttributesForDisappearingDecorationElement(ofKind:at:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollectionviewlayout/finallayoutattributesfordisappearingdecorationelement(ofkind:at:)"
---

# finalLayoutAttributesForDisappearingDecorationElement(ofKind:at:)

Retrieves the final layout information for a decoration view that is about to be removed from the collection view.

## Declaration

```swift
func finalLayoutAttributesForDisappearingDecorationElement(ofKind elementKind: String, at decorationIndexPath: IndexPath) -> UICollectionViewLayoutAttributes?
```

## Parameters

- `elementKind`: A string that identifies the type of decoration view.
- `decorationIndexPath`: The index path of the view being deleted.

## Return Value

Return Value A layout attributes object that describes the position of the decoration view to use as the end point for animating its removal.

## Discussion

Discussion This method is called after the prepare(forCollectionViewUpdates:) method and before the finalizeCollectionViewUpdates() method for any decoration views that are about to be deleted. Your implementation should return the layout information that describes the final position and state of the view. The collection view uses this information as the end point for any animations. (The starting point of the animation is the view’s current location.) If you return nil, the layout object uses the same attributes for both the start and end points of the animation. The default implementation of this method returns nil.

## See Also

### Responding to collection view updates

- [prepare(forCollectionViewUpdates:)](uikit/uicollectionviewlayout/prepare(forcollectionviewupdates:).md)
- [finalizeCollectionViewUpdates()](uikit/uicollectionviewlayout/finalizecollectionviewupdates().md)
- [indexPathsToInsertForSupplementaryView(ofKind:)](uikit/uicollectionviewlayout/indexpathstoinsertforsupplementaryview(ofkind:).md)
- [indexPathsToInsertForDecorationView(ofKind:)](uikit/uicollectionviewlayout/indexpathstoinsertfordecorationview(ofkind:).md)
- [initialLayoutAttributesForAppearingItem(at:)](uikit/uicollectionviewlayout/initiallayoutattributesforappearingitem(at:).md)
- [initialLayoutAttributesForAppearingSupplementaryElement(ofKind:at:)](uikit/uicollectionviewlayout/initiallayoutattributesforappearingsupplementaryelement(ofkind:at:).md)
- [initialLayoutAttributesForAppearingDecorationElement(ofKind:at:)](uikit/uicollectionviewlayout/initiallayoutattributesforappearingdecorationelement(ofkind:at:).md)
- [indexPathsToDeleteForSupplementaryView(ofKind:)](uikit/uicollectionviewlayout/indexpathstodeleteforsupplementaryview(ofkind:).md)
- [indexPathsToDeleteForDecorationView(ofKind:)](uikit/uicollectionviewlayout/indexpathstodeletefordecorationview(ofkind:).md)
- [finalLayoutAttributesForDisappearingItem(at:)](uikit/uicollectionviewlayout/finallayoutattributesfordisappearingitem(at:).md)
- [finalLayoutAttributesForDisappearingSupplementaryElement(ofKind:at:)](uikit/uicollectionviewlayout/finallayoutattributesfordisappearingsupplementaryelement(ofkind:at:).md)
- [targetIndexPath(forInteractivelyMovingItem:withPosition:)](uikit/uicollectionviewlayout/targetindexpath(forinteractivelymovingitem:withposition:).md)
