Playbook Documentation

Enumeration Scenario​Layout.​Sizing

public enum Sizing: Equatable, ExpressibleByIntegerLiteral, ExpressibleByFloatLiteral  

A sizing strategy for the horizontal or vertical dimensions.

ScenarioLayout.Sizing ScenarioLayout.Sizing ExpressibleByIntegerLiteral ExpressibleByIntegerLiteral ScenarioLayout.Sizing->ExpressibleByIntegerLiteral Equatable Equatable ScenarioLayout.Sizing->Equatable ExpressibleByFloatLiteral ExpressibleByFloatLiteral ScenarioLayout.Sizing->ExpressibleByFloatLiteral

Member Of

ScenarioLayout

Represents how the component should be laid out.

Conforms To

Equatable
ExpressibleByFloatLiteral
ExpressibleByIntegerLiteral

Initializers

init(integer​Literal:​)

public init(integerLiteral value: Int)  

Creates a fixed sizing with the specified value converted to a CGFloat.

Parameters

value Int

The actual value of fixed sizing.

init(float​Literal:​)

public init(floatLiteral value: Float)  

Creates a fixed sizing with the specified value converted to a CGFloat.

Parameters

value Float

The actual value of fixed sizing.

Enumeration Cases

compressed

case compressed

Compresses to the intrinsic size of the component.

fill

case fill

Fill to the size of the canvas on which to layout the component.

fixed

case fixed(CGFloat) 

Layout with given fixed size. 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 UI.