swiftUI actionsheet1 SwiftUI를 이용한 하단 알림 메시지 (ActionSheet) Alert 와 유사하게 동작된다. Alert와 마찬가지로 알림창을 보여줄 지 말지를 결정할 Bool 타입 변수를 정의해야 한다. 조건이 true가 되면 ActionSheet가 하단에 표시된다. MacOS에는 ActionSheet를 이용할 수 없다. 기본코드 import SwiftUI struct ContentView: View { @State private var showActionSheet = false var body: some View { Button("Tap to show action sheet") { showActionSheet = true } .actionSheet(isPresented: $showActionSheet) { ActionSheet(title: Text("Resume Workout.. 2022. 11. 1. 이전 1 다음