spatialOverlay(alignment:content:)
Adds secondary views within the 3D bounds of this view.
Declaration
nonisolated func spatialOverlay<V>(alignment: Alignment3D = .center, @ViewBuilder content: () -> V) -> some View where V : View
Parameters
- alignment:
The alignment with a default value of Center that you use to position the secondary view.
- content:
The view builder which produces views to occupy the same 3D space as this view. Multiple views provided by content are organized into a Spatialcontainer.
Return Value
A view that adds content within the view’s 3D bounds.
Discussion
Multiple views provided by content are stacked depthwise.