How to create Radiobuttons in SwiftUI?

Picker(selection: $order.avocadoStyle, label: Text("Avocado:")) { 
    Text("Sliced").tag(AvocadoStyle.sliced) 
    Text("Mashed").tag(AvocadoStyle.mashed)
}.pickerStyle(RadioGroupPickerStyle())

This is the code from the 2019 swiftUI essentials keynote (SwiftUI Essentials – WWDC 2019. Around 43 minutes in the video they show this example.

It will look like this:

radio button group

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)