Playbook Documentation Beta

Structure Scenario​Context

public struct ScenarioContext 

The context of scenario.

Initializers

init(snapshot​Waiter:​is​Snapshot:​screen​Size:​)

public init(
        snapshotWaiter: SnapshotWaiter,
        isSnapshot: Bool,
        screenSize: @autoclosure @escaping () -> CGSize
    ) 

Creates a new context.

Parameters

snapshot​Waiter Snapshot​Waiter

The waiter that controls snapshot to wait until content did finished rendering.

is​Snapshot Bool

Specifies whether that currently in snapshotting context.

screen​Size @autoclosure @escaping () -> CGSize

The size of screen or snapshotting device.

Properties

snapshot​Waiter

public var snapshotWaiter: SnapshotWaiter

The waiter that controls snapshot to wait until content did finished rendering.

is​Snapshot

public var isSnapshot: Bool

Specifies whether that currently in snapshotting context.

screen​Size

public var screenSize: CGSize 

The size of screen or snapshotting device.