init(nibName:bundle:)
Returns a nib object from the nib file in the specified bundle.
Declaration
init(nibName name: String, bundle bundleOrNil: Bundle?)Parameters
- name:
The name of the nib file, without any leading path information.
- bundleOrNil:
The bundle in which to search for the nib file. If you specify
nil, this method looks for the nib file in the main bundle.
Return Value
The initialized UINib object. An exception is thrown if there were errors during initialization or the nib file could not be located.
Discussion
The UINib object looks for the nib file in the bundle’s language-specific project directories first, followed by the Resources directory.