<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ScreenCaptureKit",
  "identifier" : "/documentation/ScreenCaptureKit/SCScreenshotManager/captureScreenshot(rect:configuration:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "ScreenCaptureKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCScreenshotManager(cm)captureScreenshotWithRect:configuration:completionHandler:"
  },
  "title" : "captureScreenshot(rect:configuration:completionHandler:)"
}
-->

# captureScreenshot(rect:configuration:completionHandler:)

```
class func captureScreenshot(rect: CGRect, configuration config: SCScreenshotConfiguration, completionHandler: (@Sendable (SCScreenshotOutput?, (any Error)?) -> Void)? = nil)
```

## Parameters

`rect`

the rect for the region in points on the screen space for the screen shot, this is display agnostic and supports multiple displays

`config`

is the screenshot configuration containing information on how to format the screenshot

`completionHandler`

is the handler that will deliver the SCScreenshotOutput object to the client

## Discussion\abstract captureScreenshotWithRect:configuration:completionHandler:
\discussion this method returns an SCScreenshotOutput object containing CGImages of the screenshot requested by the client

---

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)