<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: 18.4.0 -",
    "macOS: 15.4.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/imagePlaygroundGenerationStyle(_:in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewP15ImagePlaygroundE05imageE15GenerationStyle_2inQrAD0deH0V_SayAHGtF"
  },
  "title" : "imagePlaygroundGenerationStyle(_:in:)"
}
-->

# imagePlaygroundGenerationStyle(_:in:)

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

```
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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)