A closure that receives a new Graphics
as input. This context represents a new transparency layer that you can draw into. When the closure returns, SwiftUI draws the new layer into the current context.
Instance Method
インスタンスメソッド
draw
drawLayer(content:)
Draws a new layer, created by drawing code that you provide, into the context.
Availability 有効性
- iOS 15.0+
- iPadOS 15.0+
- macOS 12.0+
- Mac Catalyst 15.0+
- tvOS 15.0+
- watchOS 8.0+
Technology
- Swift
UI
Declaration 宣言
func drawLayer(content: (inout GraphicsContext
) throws -> Void
) rethrows
Parameters パラメータ
context
Context