Contents

ImagePlaygroundViewController

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

Declaration

@MainActor @objc @preconcurrency class ImagePlaygroundViewController

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

Processing a generated image

Specifying the configuration of the playground

Specifying the source content

Getting the feature availability

Managing the view

Instance Properties

Instance Methods