---
title: "init(nibName:bundle:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uicollectionviewcontroller/init(nibname:bundle:)"
---

# init(nibName:bundle:)

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

## Declaration

```swift
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 doc://com.apple.uikit/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

Return Value A newly initialized UICollectionViewController object.

## Discussion

Discussion For more information on how to initialize a view controller from a nib file, see init(nibName:bundle:).

## See Also

### Creating a collection view controller

- [init(collectionViewLayout:)](uikit/uicollectionviewcontroller/init(collectionviewlayout:).md)
- [init(coder:)](uikit/uicollectionviewcontroller/init(coder:).md)
