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


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



The name of the nib file to associate with the view controller. The nib file name should not contain any leading path information. If you specify nil, the nibName property is set to nil.


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. If this parameter is nil, the method uses the heuristics described below to locate the nib file.

Return Value

A newly initialized UICollectionViewController object.


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

See Also

Initializing the UICollectionViewController Object

init(collectionViewLayout: UICollectionViewLayout)

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