Playbook Documentation

Structure Scenario​Layout

public struct ScenarioLayout: Equatable  

Represents how the component should be laid out.

ScenarioLayout ScenarioLayout Equatable Equatable ScenarioLayout->Equatable

Nested Types

ScenarioLayout.Sizing

A sizing strategy for the horizontal or vertical dimensions.

Conforms To

Equatable

Properties

h

public var h: Sizing

A horizontal sizing strategy.

v

public var v: Sizing

A vertical sizing strategy.

compressed

public static let compressed  

Compresses both the horizontal and vertical to the intrinsic size of the component.

fill

public static let fill  

Fill both the horizontal and vertical to the size of the canvas on which to layout the component.

fill​H

public static 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.

fill​V

public static 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.

fixed​H(_:​)

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.

fixed​V(_:​)

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

h Sizing

A horizontal sizing strategy.

v Sizing

A vertical sizing strategy.