<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDynamicAnimator/init(collectionViewLayout:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIDynamicAnimator(im)initWithCollectionViewLayout:"
  },
  "title" : "init(collectionViewLayout:)"
}
-->

# init(collectionViewLayout:)

Initializes a dynamic animator with a specified collection view layout.

```
convenience init(collectionViewLayout layout: UICollectionViewLayout)
```

## Parameters

`layout`

The collection view layout for the dynamic animator, serving as the reference view for a dynamic animator in collection-view mode.

## Return Value

The initialized dynamic animator, or `nil` if there was a problem initializing the object.

## Discussion

When you initialize a dynamic animator with this method, the behaviors (and their dynamic items) that you add to the animator employ the collection view layout’s coordinate system.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)