Composites the view’s contents into an offscreen image before final display.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- Xcode 11.0+
Framework
- Swift
UI
Declaration
func drawingGroup(opaque: Bool = false, colorMode: Color Rendering Mode = .nonLinear) -> some View
Parameters
opaque
A Boolean value that indicates whether the image is opaque. If
true
, the alpha channel of the image must be one.colorMode
The working color space and storage format of the image.
Return Value
A view that composites this view’s contents into an offscreen image before display.
Discussion
Views backed by native platform views don’t render into the image. Instead, they log a warning and display a placeholder image to highlight the error.