Picker

Creating a Picker

init(LocalizedStringKey, selection: Binding, content: () -> Content)

Available when Label is Text.

init(S, selection: Binding, content: () -> Content)

Available when Label is Text.

init(selection: Binding, label: Label, content: () -> Content)

Creates an instance that selects from content associated with Selection values.

Styling Pickers

struct DefaultPickerStyle
struct PopUpButtonPickerStyle
struct RadioGroupPickerStyle
struct SegmentedPickerStyle
struct WheelPickerStyle

protocol PickerStyle

A custom specification for the appearance and interaction of a Picker.

var section = ["1","2","3","4","5","6"]
@State var selectRow = 1
var body: some View {
    
    VStack {
        
        Picker.init("Picker", selection: $selectRow) {
            ForEach(0..

你可能感兴趣的:(Picker)