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
allowedStylesparameter. - allowedStyles:
The list of styles that the sheet can display to people. Specify
ImagePlaygroundStyle/allto 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
imagePlaygroundOptions(_:)imagePlaygroundSheet(isPresented:concept:sourceImage:onCompletion:onCancellation:)imagePlaygroundSheet(isPresented:concept:sourceImage:onCompletion:onAdaptiveImageGlyphCreation:onCancellation:)imagePlaygroundSheet(isPresented:concept:sourceImageURL:onCompletion:onCancellation:)imagePlaygroundSheet(isPresented:concept:sourceImageURL:onCompletion:onAdaptiveImageGlyphCreation:onCancellation:)imagePlaygroundSheet(isPresented:concepts:sourceImage:onCompletion:onCancellation:)imagePlaygroundSheet(isPresented:concepts:sourceImage:onCompletion:onAdaptiveImageGlyphCreation:onCancellation:)imagePlaygroundSheet(isPresented:concepts:sourceImageURL:onCompletion:onCancellation:)imagePlaygroundSheet(isPresented:concepts:sourceImageURL:onCompletion:onAdaptiveImageGlyphCreation:onCancellation:)