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!
[NSScreen screens]
gives you an array of NSScreens. The screen at index 0 is the one that's got your menu on.
So pick the other screen from the array, find it's visibleFrame
and change the frame of your window to go inside it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With