SwiftUI9 Alert & ConfirmationDialog func alert(_ titleKey: LocalizedStringKey, isPresented: Binding, @ViewBuilder actions: () -> A, @ViewBuilder message: () -> M) -> some View where A: View, M: View struct AlertView: View { @State private var isShowing = false var body: some View { Button { isShowing.toggle() } label: { Text("Click Me!") } .alert("Alert Title", isPresented: $isShowing) { Button("확인", role: .none) { // 확인 버튼 눌렀을 때 .. 2023. 11. 20. 이전 1 2 3 다음