-
-
Save laevandus/aad4e73fcf3f5257ada4dd9e366497bf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final class FlowCoordinator: ObservableObject {} | |
let swiftUIView = ContentView() | |
.environmentObject(self) // self is FlowCoordinator | |
struct ContentView: View { | |
@EnvironmentObject var flowController: FlowCoordinator | |
var body: some View { | |
VStack(spacing: 8) { | |
Text("Root view") | |
Button("Present Sheet", action: flowController.showDetailView) | |
… |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment