Answers for "swiftui 3 actionsheet custom view"

0

swiftui actionsheet

.actionSheet(isPresented: $showingActionSheet) {
    ActionSheet(title: Text("Change background"), message: Text("Select a new color"), buttons: [
        .default(Text("Red")) { self.backgroundColor = .red },
        .default(Text("Green")) { self.backgroundColor = .green },
        .default(Text("Blue")) { self.backgroundColor = .blue },
        .cancel()
    ])
}
Posted by: Guest on October-17-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language