Wrap UI with Cloneable Renderer
When you start a workflow Cloneable will be able to take over rendering of the navigation stack to run the workflow
Overview
When you want to start a workflow, the Cloneable SDK will take over rendering of the UI and work under it's own navigation stack in order to run the workflows.
Wrapping the UI
We provide a SwiftUI view which you wrap around your Full Screen view. You should be able to wrap any view in your stack, or your stack as a whole. Under the hood, the wrapper is actually hosting your view within it's navigation stack and will begin navigating beyond that when a workflow is started.
When the workflow stops running either by cancelling the workflow or completing the workflow, the wrapper will pop the views back to where the workflow was entered.
Example implementation
// example usage
// This view should take up the entirety of the screen
struct YourApp: View {
@EnvironmentObject var cloneable: CloneablePlatform
var body: some View {
CloneableWorkflowWrapper(cloneablePlatform: cloneable) {
// The rest of your apps views and children views
MyAppViews()
}
}
}
Last updated