---
title: "init(currentLayout:nextLayout:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nscollectionviewtransitionlayout/init(currentlayout:nextlayout:)"
---

# init(currentLayout:nextLayout:)

Initializes and returns the transition layout object.

## Declaration

```swift
init(currentLayout: NSCollectionViewLayout, nextLayout newLayout: NSCollectionViewLayout)
```

## Parameters

- `currentLayout`: The layout object currently in use by the collection view.
- `newLayout`: The new layout object that is about to be installed into the collection view.

## Return Value

Return Value An initialized transition layout or nil if the object could not be initialized.

## Discussion

Discussion This method initializes the transition layout object and saves references to the current and new layout objects. If you subclass and implement your own initialization method, you must call this method to initialize the superclass.
