Creating a new instance of ViewController in AppDelegate (Swift 3, OS X)

Warning: beginner question.

I want to create a new instance of my app's only window by clicking on file/new in the menu bar. I assume that this requires a new instance of ViewController. Currently, file/new calls a function in AppDelegate.

@IBAction func NewWindow(_ sender: Any) {
            let newVC = ViewController()

Because newVC is declared within the function, it should cease to exist when the function ends. If I try to declare it as a variable outside of the function, I get the error that AppDelegate doesn't support initialization. But even within the function, if I check newVC.isViewLoaded, the value returned is "false."

How do I create a new instance of the window?

This question is better asked elsewhere like the Apple Developer forums, or by looking at the Apple documentation (lots of sample code out there on creating windows on MacOS). This is not about Swift, but the Apple frameworks.

Thus said, you need to create a window from your window controller, and attach the new ViewController to the new window as its content view. Looking at the Apple documentation should give you a leg up.

Thank you for your response. You pointed me in the right direction.

Clearly, I didn't know how much I didn't know.