Skip to content

EXTENSION

Screen

Methods

adaptedEnvironment(key:value:)

Wraps this screen in an AdaptedEnvironmentScreen with the given environment key and value.

adaptedEnvironment(keyPath:value:)

Wraps this screen in an AdaptedEnvironmentScreen with the given keypath and value.

adaptedEnvironment(adapting:)

Wraps this screen in an AdaptedEnvironmentScreen with the given configuration block.

asAnyScreen()

Wraps the screen in an AnyScreen

canUpdate(viewController:with:)

If the given view controller is of the correct type to be updated by this screen.

If your view controller type can change between updates, call this method before invoking update(viewController:with:).

update(viewController:with:)

Update the given view controller with the content from the screen.

Note

You must pass a view controller previously created by a compatible ViewControllerDescription that passes canUpdate(viewController:with:). Failure to do so will result in a fatal precondition.

buildViewController(in:)

Construct and update a new view controller as described by this Screen. The view controller will be updated before it is returned, so it is fully configured and prepared for display.