---
title: "didTransition(from:to:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicollectionreusableview/didtransition(from:to:)"
---

# didTransition(from:to:)

Tells your view that the layout object of the collection view changed.

## Declaration

```swift
func didTransition(from oldLayout: UICollectionViewLayout, to newLayout: UICollectionViewLayout)
```

## Parameters

- `oldLayout`: The collection view’s previous layout object.
- `newLayout`: The current layout object associated with the collection view.

## Discussion

Discussion The default implementation of this method does nothing. Subclasses can override this method and use it to finalize any behaviors associated with the change in layouts.

## See Also

### Managing layout changes

- [preferredLayoutAttributesFitting(_:)](uikit/uicollectionreusableview/preferredlayoutattributesfitting(_:).md)
- [apply(_:)](uikit/uicollectionreusableview/apply(_:).md)
- [willTransition(from:to:)](uikit/uicollectionreusableview/willtransition(from:to:).md)
