🎛️Picker

SwiftUIcontrolpickers ⟩ Picker

👉 SwiftUI Tutorials ⟩ Working with UI Controls ⟩ Sec 3. Define the Profile Editor

Picker (segmented style)
VStack(alignment: .leading, spacing: 20) {
    Text("Seasonal Photo").bold()
    /// ⭐️ Picker
    Picker("Seasonal Photo", selection: $profile.seasonalPhoto) {
        ForEach(Profile.Season.allCases) { season in
            Text(season.rawValue).tag(season)
        }
    }
    .pickerStyle(.segmented)
}

👉Implicit Alignment

Last updated

Was this helpful?