---
title: delegate
framework: imageplayground
role: symbol
role_heading: Instance Property
path: imageplayground/imageplaygroundviewcontroller/delegate-swift.property
---

# delegate

The delegate object that receives the generated image and handles events from the view controller.

## Declaration

```swift
@MainActor @objc @preconcurrency weak var delegate: (any ImagePlaygroundViewController.Delegate)?
```

## Discussion

Discussion Set the value of this property to a custom type you define. The view controller reports relevant interactions to your type using the methods of the ImagePlaygroundViewController.Delegate protocol. For example, the view controller notifies your delegate when the person accepts a generated image.

## See Also

### Processing a generated image

- [ImagePlaygroundViewController.Delegate](imageplayground/imageplaygroundviewcontroller/delegate-swift.protocol.md)
