enum SectionType: String, CaseIterable { case top = \"Top\" case best = \"Best\" } struct ContentView : View { @State private var selection: Int = 0
You can use Binding
let textBinding = Binding( get: { /* get */ }, set: { /* set $0 */ } )