windowShouldClose(_:)
Tells the delegate that the user has attempted to close a window or the window has received a Performclose(_:) message.
Declaration
@MainActor optional func windowShouldClose(_ sender: NSWindow) -> BoolParameters
- sender:
The window being closed.
Return Value
Discussion
This method may not always be called during window closing. Specifically, this method is not called when a user quits an application.