Skip to content

Instantly share code, notes, and snippets.

View archieedwards's full-sized avatar

Archie archieedwards

View GitHub Profile
struct ContentView: View {
@State var showAlertOne = false
@State var showAlertTwo = false
var body: some View {
VStack{
/// button 1
struct ContentView: View {
@State var showAlert = false
var body: some View {
Button(action: {
self.showAlert.toggle()
}, label: {
Text("SHOW ALERT")
struct ContentView: View {
@State var showAlert = false
var body: some View {
Button(action: {
self.showAlert.toggle()
}, label: {
Text("SHOW ALERT")
@archieedwards
archieedwards / a_simple_alert.swift
Last active May 25, 2020 14:17
Simple Alert in SwiftUI
struct ContentView: View {
@State var showAlert = false
var body: some View {
Button(action: {
self.showAlert.toggle()
}, label: {
Text("SHOW ALERT")