<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSScreen",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSScreen"
  },
  "title" : "NSScreen"
}
-->

# NSScreen

An object that describes the attributes of a computer’s monitor or screen.

```
class NSScreen
```

## Overview

An app may use an [`NSScreen`](/documentation/AppKit/NSScreen) object to retrieve information about a screen and use this information to decide what to display on that screen. For example, an app may use the [`deepest`](/documentation/AppKit/NSScreen/deepest) method to find out which of the available screens can best represent color and then might choose to display all of its windows on that screen.

Create the application object before you use the methods in this class, so that the application object can make the necessary connection to the window system. You can make sure the application object exists by invoking the [`shared`](/documentation/AppKit/NSApplication/shared) method of [`NSApplication`](/documentation/AppKit/NSApplication). If you created your app with Xcode, the application object is automatically created for you during initialization.

> Note:
> The ``doc://com.apple.appkit/documentation/AppKit/NSScreen`` class is only for getting information about the available displays. If you need additional information or want to change the attributes relating to a display, you must use Quartz Services. For more information, see <doc://com.apple.documentation/documentation/CoreGraphics/quartz-display-services>.

## Topics

### Getting Screen Objects

[`main`](/documentation/AppKit/NSScreen/main)

Returns the screen object containing the window with the keyboard focus.

[`deepest`](/documentation/AppKit/NSScreen/deepest)

Returns a screen object representing the screen that can best represent color.

[`screens`](/documentation/AppKit/NSScreen/screens)

Returns an array of screen objects representing all of the screens available on the system.

### Getting Screen Information

[`depth`](/documentation/AppKit/NSScreen/depth)

The current bit depth and colorspace information of the screen.

[`frame`](/documentation/AppKit/NSScreen/frame)

The dimensions and location of the screen.

[`supportedWindowDepths`](/documentation/AppKit/NSScreen/supportedWindowDepths)

A zero-terminated array of the window depths supported by the screen.

[`deviceDescription`](/documentation/AppKit/NSScreen/deviceDescription)

The device dictionary for the screen.

[`NSDeviceDescriptionKey`](/documentation/AppKit/NSDeviceDescriptionKey)

These constants are the keys for device description dictionaries.

[`userSpaceScaleFactor`](/documentation/AppKit/NSScreen/userSpaceScaleFactor)

Returns the scaling factor from user space to device space on the screen.

[`colorSpace`](/documentation/AppKit/NSScreen/colorSpace)

The color space of the screen.

[`localizedName`](/documentation/AppKit/NSScreen/localizedName)

The localized name of the display.

[`canRepresent(_:)`](/documentation/AppKit/NSScreen/canRepresent(_:))

A Boolean value indicating whether the color space of the screen is capable of representing the specified display gamut.

[`NSDisplayGamut`](/documentation/AppKit/NSDisplayGamut)

[`screensHaveSeparateSpaces`](/documentation/AppKit/NSScreen/screensHaveSeparateSpaces)

Returns a Boolean value indicating whether each screen can have its own set of spaces.

### Converting Between Screen and Backing Coordinates

[`backingAlignedRect(_:options:)`](/documentation/AppKit/NSScreen/backingAlignedRect(_:options:))

Converts a rectangle in global screen coordinates to a pixel aligned rectangle.

[`backingScaleFactor`](/documentation/AppKit/NSScreen/backingScaleFactor)

The backing store pixel scale factor for the screen.

[`convertRectFromBacking(_:)`](/documentation/AppKit/NSScreen/convertRectFromBacking(_:))

Converts the rectangle from the device pixel aligned coordinates system of a screen.

[`convertRectToBacking(_:)`](/documentation/AppKit/NSScreen/convertRectToBacking(_:))

Converts the rectangle to the device pixel aligned coordinates system of a screen.

### Getting the Visible Portion of the Screen

[`visibleFrame`](/documentation/AppKit/NSScreen/visibleFrame)

The current location and dimensions of the visible screen.

[`safeAreaInsets`](/documentation/AppKit/NSScreen/safeAreaInsets)

The distances from the screen’s edges at which content isn’t obscured.

[`auxiliaryTopLeftArea`](/documentation/AppKit/NSScreen/auxiliaryTopLeftArea-uglc)

The unobscured portion of the top-left corner of the screen.

[`auxiliaryTopRightArea`](/documentation/AppKit/NSScreen/auxiliaryTopRightArea-gr2n)

The unobscured portion of the top-right corner of the screen.

### Getting Extended Dynamic Range Details

[`maximumPotentialExtendedDynamicRangeColorComponentValue`](/documentation/AppKit/NSScreen/maximumPotentialExtendedDynamicRangeColorComponentValue)

The maximum possible color component value for the screen when it’s in extended dynamic range (EDR) mode.

[`maximumExtendedDynamicRangeColorComponentValue`](/documentation/AppKit/NSScreen/maximumExtendedDynamicRangeColorComponentValue)

The current maximum color component value for the screen.

[`maximumReferenceExtendedDynamicRangeColorComponentValue`](/documentation/AppKit/NSScreen/maximumReferenceExtendedDynamicRangeColorComponentValue)

The current maximum color component value for reference rendering to the screen.

### Getting Variable Refresh Rate Details

[`maximumFramesPerSecond`](/documentation/AppKit/NSScreen/maximumFramesPerSecond)

The maximum number of frames per second that the screen supports.

[`minimumRefreshInterval`](/documentation/AppKit/NSScreen/minimumRefreshInterval)

The shortest refresh interval that the screen supports.

[`maximumRefreshInterval`](/documentation/AppKit/NSScreen/maximumRefreshInterval)

The largest refresh interval that the screen supports.

[`displayUpdateGranularity`](/documentation/AppKit/NSScreen/displayUpdateGranularity)

The number of seconds between the screen’s supported update rates, for screens that support fixed update rates.

[`lastDisplayUpdateTimestamp`](/documentation/AppKit/NSScreen/lastDisplayUpdateTimestamp)

The time of the last framebuffer update, expressed as the number of seconds since system startup.

### Receiving Screen-Related Notifications

[`colorSpaceDidChangeNotification`](/documentation/AppKit/NSScreen/colorSpaceDidChangeNotification)

Posted when the color space of the screen has changed.

### Getting touch capabilities

[`NSScreen.TouchCapabilities`](/documentation/AppKit/NSScreen/TouchCapabilities-swift.struct)

### Synchronizing with the display’s refresh rate

[`displayLink(target:selector:)`](/documentation/AppKit/NSScreen/displayLink(target:selector:))

Returns a new display link whose callback will be invoked in-sync with the display the screen is on.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)