0

I updated xcode to version 13 and the Picker project does not work the same as in previous versions. Previously, I clicked on the attributes button, selected the desired attribute and it was recorded next to it, but now there is just one of the attributes.

Tell me how you can return to the previous appearance, so that after clicking on the attributes button, the attribute that you selected fits next to it.

Properties:

@State public var attribute: String = ""
var attributes = [NSLocalizedString("Strength", comment: ""),
                  NSLocalizedString("Intelligence", comment: ""),
                  NSLocalizedString("Responsibility", comment: ""),
                  NSLocalizedString("Rest", comment: "")]

Picker:

Picker(selection: $attribute,
       label: Text(NSLocalizedString("Attribute: ", comment: "") + "\(attribute)")){
    ForEach(attributes, id: \.self){
        Text($0)
    }
}
.pickerStyle(MenuPickerStyle())

ruzaykina
  • 69
  • 1
  • 6

0 Answers0