---
title: makeWindowControllers()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nsdocument/makewindowcontrollers()
---

# makeWindowControllers()

Creates the window controller objects that the document uses to display its content.

## Declaration

```swift
func makeWindowControllers()
```

## Discussion

Discussion Subclasses may override this method to create the initial window controller(s) for the document. The base class implementation creates an NSWindowController object with windowNibName and with the document as the file’s owner if windowNibName returns a name. If you override this method to create your own window controllers, be sure to use addWindowController(_:) to add them to the document after creating them. This method is called by the NSDocumentController open... methods, but you might want to call it directly in some circumstances.

## See Also

### Creating and Managing Window Controllers

- [addWindowController(_:)](appkit/nsdocument/addwindowcontroller(_:).md)
- [removeWindowController(_:)](appkit/nsdocument/removewindowcontroller(_:).md)
- [windowControllers](appkit/nsdocument/windowcontrollers.md)
- [windowNibName](appkit/nsdocument/windownibname.md)
- [windowControllerDidLoadNib(_:)](appkit/nsdocument/windowcontrollerdidloadnib(_:).md)
- [windowControllerWillLoadNib(_:)](appkit/nsdocument/windowcontrollerwillloadnib(_:).md)
- [shouldCloseWindowController(_:delegate:shouldClose:contextInfo:)](appkit/nsdocument/shouldclosewindowcontroller(_:delegate:shouldclose:contextinfo:).md)
