Reputation: 83
Does OS X have any methods such as:
[monitors.count]
that return the number of monitors[monitor.height]
that returns the number of pixels for the height of one monitor[monitor.aspectratio]
that returns the aspect ratio of one monitor(The above aren't actually methods, but that would potentially be what they would look like)
Upvotes: 3
Views: 383
Reputation: 34983
Check out the NSScreen class reference.
//Number of monitors
[[NSScreen screens] count];
// Height of screen '0'
[[[NSScreen screens] objectAtIndex:0] frame].size.height;
Upvotes: 1