Context
public struct Context
Provides the relevant information about the context in which the layout is occurring.
-
The size constraint the layout is occurring in.
Declaration
Swift
public var size: SizeConstraint
-
The phase of the layout current occurring – measurement or layout.
You can use this value to vary calculations as needed between phases; eg, to make an element take up the full available size during the
.layout
phase, where sizing is known.Declaration
Swift
public var phase: LayoutPhase
-
The current phase of the layout event:
See more.measurement
or.layout
.Declaration
Swift
public enum LayoutPhase : Equatable