Contents

imagePlaygroundGenerationStyle(_:in:)

Sets the selected and allowed styles to use when displaying the image generation sheet.

Declaration

nonisolated func imagePlaygroundGenerationStyle(_ style: ImagePlaygroundStyle, in allowedStyles: [ImagePlaygroundStyle] = ImagePlaygroundStyle.all) -> some View

Parameters

  • style:

    The style to pre-select in the sheet. This style must also be present in the allowedStyles parameter.

  • allowedStyles:

    The list of styles that the sheet can display to people. Specify ImagePlaygroundStyle/all to make all styles available from the sheet.

Return Value

An image playground sheet configured with the specified style information.

Discussion

Configures the sheet with the specified style information. At presentation time, the sheet selects the style from the style parameter initially, but the person can change the selected style to any of the values in the allowedStyles parameter.

See Also

Generating images