Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

simple alert swifti

struct ContentView: View {
    @State private var showingAlert = false

    var body: some View {
        Button("Show Alert") {
            showingAlert = true
        }
        .alert("Important message", isPresented: $showingAlert) {
            Button("OK", role: .cancel) { }
        }
    }
}
Source by www.hackingwithswift.com #
 
PREVIOUS NEXT
Tagged: #simple #alert #swifti
ADD COMMENT
Topic
Name
6+8 =