Skip to content

Commit

Permalink
Expose 'screen' on WorkflowHostingController (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
amorde authored Sep 13, 2023
1 parent b4f86ae commit 235cfc0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions WorkflowUI/Sources/Hosting/WorkflowHostingController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public final class WorkflowHostingController<ScreenType, Output>: WorkflowUIView
didSet { setNeedsEnvironmentUpdate() }
}

/// The currently displayed screen - the most recent rendering from the hosted workflow
public var screen: ScreenType {
workflowHost.rendering.value
}

private(set) var rootViewController: UIViewController

private let workflowHost: WorkflowHost<AnyWorkflow<ScreenType, Output>>
Expand Down

0 comments on commit 235cfc0

Please sign in to comment.