<!--
{
  "availability" : [
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGConfigureDisplayMode(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@F@CGConfigureDisplayMode"
  },
  "title" : "CGConfigureDisplayMode(_:_:_:)"
}
-->

# CGConfigureDisplayMode(_:_:_:)

Configures the display mode of a display.

```
func CGConfigureDisplayMode(_ config: CGDisplayConfigRef?, _ display: CGDirectDisplayID, _ mode: CFDictionary?) -> CGError
```

## Parameters

`config`

A display configuration, acquired by calling [`CGBeginDisplayConfiguration(_:)`](/documentation/CoreGraphics/CGBeginDisplayConfiguration(_:)).

`display`

The identifier of the display being configured.

`mode`

A display mode dictionary (see the discussion below).

## Return Value

A result code. See `Core Graphics Data Types and Constants`.

## Discussion

A display mode is a set of properties such as width, height, pixel depth, and refresh rate, and options such as stretched LCD panel filling.

The display mode you provide must be one of the following:

- A dictionary returned by one of the `CGDisplayBestMode` functions, such as [`CGDisplayBestModeForParameters(_:_:_:_:_:)`](/documentation/CoreGraphics/CGDisplayBestModeForParameters(_:_:_:_:_:)).
- A dictionary in the array returned by [`CGDisplayAvailableModes(_:)`](/documentation/CoreGraphics/CGDisplayAvailableModes(_:)).

If you use this function to change the mode of a display in a mirroring set, Quartz may adjust the bounds, resolutions, and depth of the other displays in the set to a safe mode, with matching depth and the smallest enclosing size.

### Special Considerations

This deprecated function takes as a parameter a display mode dictionary. Starting in OS X v10.6, display mode dictionaries have been replaced by the `CGDisplayMode` opaque type. For information on the `CGDisplayMode` opaque type, see [Getting Information About a Display Mode](/documentation/CoreGraphics/quartz-display-services#Getting-Information-About-a-Display-Mode).

---

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)