struct LayeredView
Swift
struct LayeredView<Content, Layer> where Content : View, Layer : View
A base view with a layer drawn behind it (.underlay { }) or over it
(.overlayLayer { }), covering its box and taking no layout space and no
input.
Built the way the composed overlay(alignment:) is: the layer is an
absolutely positioned Yoga child pinned to all four edges, so the base
measures exactly as it did without it. What differs is that the layer is
inert — every hit walk passes straight through it — and that it can
go under the content as well as over it.
For chrome no single fill describes: a tab whose outline runs along three
sides and leaves the fourth open, a highlight over a pane that is about to
receive a drop. Give the layer .pct(100) in both axes and it is exactly
the base's size.
Sources/LavaUI/Underlay.swift:18
Constructors
init(content: Content, layer: Layer, above: Bool)
Not documented.
Sources/LavaUI/Underlay.swift:24
Properties
var above: Bool
Over the content rather than under it.
Sources/LavaUI/Underlay.swift:22
var content: Content
Not documented.
Sources/LavaUI/Underlay.swift:19
var dumpDetail: String { get }
Not documented.
Sources/LavaUI/Underlay.swift:30
var layer: Layer
Not documented.
Sources/LavaUI/Underlay.swift:20
Methods
func mountPrimitive() -> any AnyViewNode
Not documented.
Sources/LavaUI/Underlay.swift:41
func reconcilePrimitive(_ node: any AnyViewNode) -> any AnyViewNode
Not documented.
Sources/LavaUI/Underlay.swift:49
func structureLines(indent: Int = 0) -> [String]
Not documented.
Sources/LavaUI/Underlay.swift:32