close()
Closes the window if it was loaded.
Declaration
func close()Discussion
Because this method closes the window without asking the user for confirmation, you usually do not invoke it when the Close menu command is chosen. Instead invoke NSWindow’s performClose(_:) on the receiver’s window.