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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -