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

# init(collectionViewLayout:)

Initializes a collection view controller and configures the collection view with the provided layout.

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

## Parameters

`layout`

The layout object to associate with the collection view. The layout controls how the collection view presents its cells and supplementary views.

## Return Value

An initialized `UICollectionViewController` object or `nil` if the object could not be created.

---

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)