---
title: UIScreenshotServiceDelegate
framework: uikit
role: symbol
role_heading: Protocol
path: uikit/uiscreenshotservicedelegate
---

# UIScreenshotServiceDelegate

Methods you use to generate PDF data that accompanies a user-requested screenshot.

## Declaration

```swift
@MainActor protocol UIScreenshotServiceDelegate : NSObjectProtocol
```

## Overview

Overview When the user captures a screenshot of your app’s windows, UIKit calls the methods of this protocol to retrieve PDF data for those windows, and then it provides that data to the user. Adopt this protocol in a custom object of your app, and assign that object to the UIScreenshotService object associated with one of your window scenes. Use your custom delegate object to generate PDF content for the windows in the associated window-scene object.

## Topics

### Providing the PDF data

- [screenshotService(_:generatePDFRepresentationWithCompletion:)](uikit/uiscreenshotservicedelegate/screenshotservice(_:generatepdfrepresentationwithcompletion:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Responding to screenshot requests

- [delegate](uikit/uiscreenshotservice/delegate.md)
