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

# init(windowNibName:owner:)

Returns a window controller initialized with a nib file and a specified owner for that nib file.

```
convenience init(windowNibName: NSNib.Name, owner: Any)
```

## Parameters

`windowNibName`

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

`owner`

The nib file’s owner; cannot be `nil`.

## Discussion

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)