Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swiftui menu

struct ContentView: View {
    var body: some View {
        Menu("Options") {
            Button("Order Now", action: placeOrder)
            Button("Adjust Order", action: adjustOrder)
            Button("Cancel", action: cancelOrder)
        }
    }

    func placeOrder() { print("tapped") }
    func adjustOrder() { print("tapped") }
    func cancelOrder() { print("tapped") }
}
Source by www.hackingwithswift.com #
 
PREVIOUS NEXT
Tagged: #swiftui #menu
ADD COMMENT
Topic
Name
4+6 =