Working with Screens
The NSScreen class encapsulates the attributes of a computer display such as its size in pixels and the number of supported colors. Each computer can have more than one attached display, and each display can have different attributes. The NSScreen class provides the +screens class method that returns an array of NSScreen instances that each encapsulate a display connected to the computer. The +deepestScreen method returns an NSScreen instance that encapsulates the display that supports the highest color fidelity. The +mainScreen method returns an NSScreen instance for the display that is currently showing the key window.
NSScreen’s -visibleFrame method was already used in the implementation of Image Viewer. NSScreen only ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access