<!--
{
  "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(nibName:bundle:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UICollectionViewController(im)initWithNibName:bundle:"
  },
  "title" : "init(nibName:bundle:)"
}
-->

# init(nibName:bundle:)

Returns a newly initialized view controller with the nib file in the specified bundle.

```
init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?)
```

## Parameters

`nibNameOrNil`

The name of the nib file to associate with the view controller. The nib file name shouldn’t contain any leading path information. If you specify `nil`, the [`nibName`](/documentation/UIKit/UIViewController/nibName) property is set to `nil`.

`nibBundleOrNil`

The bundle in which to search for the nib file. This method looks for the nib file in the bundle’s language-specific project directories first, followed by the Resources directory.

## Return Value

A newly initialized [`UICollectionViewController`](/documentation/UIKit/UICollectionViewController) object.

## Discussion

For more information on how to initialize a view controller from a nib file, see [`init(nibName:bundle:)`](/documentation/UIKit/UIViewController/init(nibName:bundle:)).

---

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)