Post

Replies

Boosts

Views

Activity

Reply to Catalyst/UIKitForMac: hide window instead of quitting
As I know, you can copy "Application Scene Manifest" in the info.plist, then change its title to "UIApplicationSceneManifest-macos". Set it "SupportsMultipleScenes", then when you close the window, the app won't quit. But when you reopen the window, its size will be the maximum size. not the same size as when you close it. And background audio will also stop. Although, NSTimer will continue to work. In the app kit, you can do this to make the close button do the hide action, but you can't do this in Catalyst. I'm searching for a solution too. import Cocoa class VCWindowController : NSWindowController, NSWindowDelegate { 		required init?(coder: NSCoder) { 				super.init(coder: coder) 		} 		 		func windowShouldClose(sender: AnyObject) -> Bool { 				NSApp.hide(nil) 				return false 		} }
Jul ’20