Get your own website
Demo.swift
ContentView.swift
App.swift
 
import SwiftUI

struct InputsAdvancedDemo: View {
  @State private var selection = 0
  @State private var count = 1
  var body: some View {
    Form {
      Picker("Options", selection: $selection) {
        Text("A").tag(0); Text("B").tag(1); Text("C").tag(2)
      }
      .pickerStyle(.segmented)
      Stepper("Count: \(count)", value: $count, in: 1...5)
    }
  }
}

                    
import SwiftUI

struct ContentView: View { var body: some View { InputsAdvancedDemo() } }

                    
import SwiftUI

@main
struct MyApp: App { var body: some Scene { WindowGroup { ContentView() } } }