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

var snapshotWaiter: SnapshotWaiter

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

is​Snapshot

var isSnapshot: Bool

Specifies whether that currently in snapshotting context.

screen​Size

var screenSize: CGSize

The size of screen or snapshotting device.