---
title: ImagePlaygroundViewController
framework: imageplayground
role: symbol
role_heading: Class
path: imageplayground/imageplaygroundviewcontroller
---

# ImagePlaygroundViewController

Displays a standard system interface to generate images from the provided input.

## Declaration

```swift
@MainActor @objc @preconcurrency class ImagePlaygroundViewController
```

## Overview

Overview Present an ImagePlaygroundViewController to display a standard system interface to generate images from a description you provide. People use the view controller interface to generate images and experiment with the contents before returning an image to your app. You can then incorporate that image into your app’s content. Create an ImagePlaygroundViewController and configure it with an initial description of the image you want before you present it. Specify a text-based description of the image using the concepts property. If you have a starting image that you want to use to create the new image, specify your image in the sourceImage property. Present this view controller from your interface and wait for it to deliver results to your custom delegate object. If the person approves the image, the view controller sends that image to your app via this delegate object. The view controller also notifies your delegate if the person cancels the operation.

## Topics

### Creating the view controller

- [init()](imageplayground/imageplaygroundviewcontroller/init().md)

### Processing a generated image

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

### Specifying the configuration of the playground

- [selectedGenerationStyle](imageplayground/imageplaygroundviewcontroller/selectedgenerationstyle.md)
- [allowedGenerationStyles](imageplayground/imageplaygroundviewcontroller/allowedgenerationstyles.md)
- [personalizationPolicy](imageplayground/imageplaygroundviewcontroller/personalizationpolicy.md)
- [ImagePlaygroundPersonalizationPolicy](imageplayground/imageplaygroundpersonalizationpolicy.md)

### Specifying the source content

- [concepts](imageplayground/imageplaygroundviewcontroller/concepts.md)
- [sourceImage](imageplayground/imageplaygroundviewcontroller/sourceimage.md)

### Getting the feature availability

- [isAvailable](imageplayground/imageplaygroundviewcontroller/isavailable.md)

### Managing the view

- [viewDidLoad()](imageplayground/imageplaygroundviewcontroller/viewdidload().md)
- [viewDidDisappear()](imageplayground/imageplaygroundviewcontroller/viewdiddisappear().md)
- [viewWillAppear()](imageplayground/imageplaygroundviewcontroller/viewwillappear().md)

### Instance Properties

- [isModalInPresentation](imageplayground/imageplaygroundviewcontroller/ismodalinpresentation.md)
- [modalPresentationStyle](imageplayground/imageplaygroundviewcontroller/modalpresentationstyle.md)
- [options](imageplayground/imageplaygroundviewcontroller/options.md)
- [preferredContentSize](imageplayground/imageplaygroundviewcontroller/preferredcontentsize.md)

### Instance Methods

- [viewDidDisappear(_:)](imageplayground/imageplaygroundviewcontroller/viewdiddisappear(_:).md)

## Relationships

### Inherits From

- [NSViewController](appkit/nsviewcontroller.md)
- [UIViewController](uikit/uiviewcontroller.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSEditor](appkit/nseditor.md)
- [NSExtensionRequestHandling](foundation/nsextensionrequesthandling.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSeguePerforming](appkit/nssegueperforming.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [UIActivityItemsConfigurationProviding](uikit/uiactivityitemsconfigurationproviding.md)
- [UIAppearanceContainer](uikit/uiappearancecontainer.md)
- [UIContentContainer](uikit/uicontentcontainer.md)
- [UIFocusEnvironment](uikit/uifocusenvironment.md)
- [UIPasteConfigurationSupporting](uikit/uipasteconfigurationsupporting.md)
- [UIResponderStandardEditActions](uikit/uiresponderstandardeditactions.md)
- [UIStateRestoring](uikit/uistaterestoring.md)
- [UITraitChangeObservable](uikit/uitraitchangeobservable-67e94.md)
- [UITraitEnvironment](uikit/uitraitenvironment.md)
- [UIUserActivityRestoring](uikit/uiuseractivityrestoring.md)
