Created
June 13, 2021 18:39
-
-
Save StewartLynch/66bd1ed9bfdc94177d9efbacdb2cf73a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| struct ContentView: View { | |
| @State private var isPresented = false | |
| var body: some View { | |
| Button("Show Alert") { | |
| isPresented = true | |
| } | |
| .alert("Alert Title", isPresented: $isPresented) { | |
| Button("OK",role: .cancel) {} | |
| } message: { | |
| Text("Message below Title") | |
| } | |
| } | |
| } | |
| struct ContentView_Previews: PreviewProvider { | |
| static var previews: some View { | |
| ContentView() | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment