How can I move application's window between virtual desktops in OS X?

旧街凉风 提交于 2019-12-08 05:50:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!