Skip to content

Commit 235cfc0

Browse files
authored
Expose 'screen' on WorkflowHostingController (#246)
1 parent b4f86ae commit 235cfc0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

WorkflowUI/Sources/Hosting/WorkflowHostingController.swift

+5
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ public final class WorkflowHostingController<ScreenType, Output>: WorkflowUIView
3535
didSet { setNeedsEnvironmentUpdate() }
3636
}
3737

38+
/// The currently displayed screen - the most recent rendering from the hosted workflow
39+
public var screen: ScreenType {
40+
workflowHost.rendering.value
41+
}
42+
3843
private(set) var rootViewController: UIViewController
3944

4045
private let workflowHost: WorkflowHost<AnyWorkflow<ScreenType, Output>>

0 commit comments

Comments
 (0)