问题
I would like to move my application's window between OS X virtual desktops.
For example: to move window to currently active desktop.
Is there a way to do it with Swift?
回答1:
I have found answer by my self. This could be done by adjusting window behaviour.
let window = NSWindow...
Window is shown on all virtual desktops:
window.collectionBehavior = NSWindowCollectionBehavior.CanJoinAllSpaces
Window follows active virtual desktop:
window.collectionBehavior = NSWindowCollectionBehavior.MoveToActiveSpace
来源:https://stackoverflow.com/questions/33495072/how-can-i-move-applications-window-between-virtual-desktops-in-os-x