macosmonitors

Macintosh Application location in case of dual monitor


Suppose my Macintosh machine has dual monitors how can I accurately determine the monitor in which my application is in.


Solution

  • [NSScreen mainScreen] returns the screen with the focused window. Call this method while you're application is activated