Macintosh Application location in case of dual monitor
Suppose my Macintosh machine ha开发者_如何学Cs dual monitors how can I accurately determine the monitor in which my application is in.
[NSScreen mainScreen] returns the screen with the focused window. Call this method while you're application is activated
Call -[NSWindow screen] on the window you're interested in, e.g. your main window (keep in mind that if you have several windows each of them may be on a different screen).
精彩评论