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

# CGDisplayIsOnline(_:)

Returns a Boolean value indicating whether a display is connected or online.

```
func CGDisplayIsOnline(_ display: CGDirectDisplayID) -> boolean_t
```

## Parameters

`display`

The identifier of the display to be accessed.

## Return Value

If `true`, the specified display is connected; otherwise, `false`.

## Discussion

A display is considered connected or online when the framebuffer hardware is connected to a monitor.

You can use this function to determine whether someone has plugged a display into the system while the main power was on. This hardware feature, called *hot-plugging*, may not be present on all displays.

---

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)