Created
May 17, 2022 14:48
-
-
Save meyusufdemirci/166324cf093474e2fbd0c3354155f6d6 to your computer and use it in GitHub Desktop.
Dynamic Alert and Sheet Article
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
.onAppear { | |
// Show alert | |
self.viewModel.alert = .init(alert: Alert(title: Text("Hello, I am an alert!"))) | |
// Show sheet | |
self.viewModel.sheet = .init(view: AnyView(SheetView())) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment