objective c - How to find monitor count in mac os by Cocoa? -


i want find count of monitor in mac os cocoa.i can not use carbon.this code written in carbon want in cocoa framework.

cgdisplaycount dspcount; cgerror err ; err = cggetactivedisplaylist(0, null, &dspcount); return (int)dspcount; 

use nsscreen class:

return [[nsscreen screens] count]; 

see reference.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -