Structure
ScenarioLayout
public struct ScenarioLayout: Equatable
Represents how the component should be laid out.
Relationships
Nested Types
ScenarioLayout.Sizing
A sizing strategy for the horizontal or vertical dimensions.
Conforms To
Equatable
Properties
h
var h: Sizing
A horizontal sizing strategy.
v
var v: Sizing
A vertical sizing strategy.
compressed
let compressed
Compresses both the horizontal and vertical to the intrinsic size of the component.
fill
let fill
Fill both the horizontal and vertical to the size of the canvas on which to layout the component.
fillH
let fillH
Fill the horizontal to the size of the canvas on which to layout the component and compresses the vertical to the intrinsic size of the component.
fillV
let fillV
Fill the vetical to the size of the canvas on which to layout the component and compresses the horizontal to the intrinsic size of the component.
Methods
fixed(width:height:)
public static func fixed(width: CGFloat, height: CGFloat) -> ScenarioLayout
Layout both the vertical and horizontal with given fixed width and height.
Note: There are cases that to compressed to the size of the canvas on which to layout it when it can't be displayed on the user interface.
fixed(length:)
public static func fixed(length: CGFloat) -> ScenarioLayout
Layout both the vertical and horizontal with given fixed length.
Note: There are cases that to compressed to the size of the canvas on which to layout it when it can't be displayed on the user interface.
fixedH(_:)
public static func fixedH(_ width: CGFloat) -> ScenarioLayout
Layout the horizontal with given fixed width and compresses the vertical to the intrinsic size of the component.
Note: There are cases that to compressed to the size of the canvas on which to layout it when it can't be displayed on the user interface.
fixedV(_:)
public static func fixedV(_ height: CGFloat) -> ScenarioLayout
Layout the vertical with given fixed height and compresses the horizontal to the intrinsic size of the component.
Note: There are cases that to compressed to the size of the canvas on which to layout it when it can't be displayed on the user interface.
sizing(h:v:)
public static func sizing(h: Sizing, v: Sizing) -> ScenarioLayout
Layout the vertical and horizontal sizes according to the specified strategies.
Parameters
Name | Type | Description |
---|---|---|
h | Sizing |
A horizontal sizing strategy. |
v | Sizing |
A vertical sizing strategy. |