(Swift and macOS)
I have a window that I would like to be in all the spaces. One option would be that the window could change when the user goes to another space.
I could find that in the documentation: https://developer.apple.com/documentation/appkit/nswindow/1419707-isonactivespace
I am not sure how to implement it. This is what I tried. It does not work:
override func viewDidLoad() {
super.viewDidLoad()
self.view.window?.collectionBehavior = NSWindow.CollectionBehavior.canJoinAllSpaces
self.view.window?.collectionBehavior = NSWindow.CollectionBehavior.moveToActiveSpace
}
Should I do anything else, anything different?
Thank you