user1231779
user1231779

Reputation: 83

Methods to count the number of monitors and basic info about each?

Does OS X have any methods such as:

(The above aren't actually methods, but that would potentially be what they would look like)

Upvotes: 3

Views: 383

Answers (1)

pkamb
pkamb

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

Related Questions