6

In my app I need to be able to move my app's windows between the screens programmatically. I'm working on my MacBookPro and I'm connected to DELL monitor. So what I want to do is to have a method that would move my app's window from my laptop screen to the external DELL one.

Does anyone know how to achieve it?

Any help is highly appreciated!

4

1 回答 1

11

[NSScreen screens]给你一个 NSScreens 数组。索引 0 处的屏幕是打开菜单的屏幕。

因此,从阵列中选择另一个屏幕,找到它visibleFrame并更改窗口的框架以进入其中。

于 2013-05-20T21:42:46.360 回答