I know this might be a very silly question but I'm a newbie for the Swift Programming Language.
I am building a sample mac application handles the user authentication. My question is how to close the window automatically using the swift.
I have tried
var window = NSWindow()
window.close()
but gives the error related to thread and opens the debugger
Please help
In Swift, self.view.window?.close()
worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With