<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindowController/init(windowNibName:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindowController(im)initWithWindowNibName:"
  },
  "title" : "init(windowNibName:)"
}
-->

# init(windowNibName:)

Returns a window controller initialized with a nib file.

```
convenience init(windowNibName: NSNib.Name)
```

## Parameters

`windowNibName`

The name of the nib file (minus the “`.nib`” extension) that archives the receiver’s window; cannot be `nil`.

## Discussion

Sets the owner of the nib file to the receiver. The default initialization turns on cascading, sets the [`shouldCloseDocument`](/documentation/AppKit/NSWindowController/shouldCloseDocument) property to <doc://com.apple.documentation/documentation/Swift/false>, and sets the autosave name for the window’s frame to an empty string.

---

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)