I build a Picker and it is a menu type, my content is too short but picker item’s width is to large, i want resize the content’s width, how can i do it. May someone know, i am glad you could help me out!!!
struct PickerResizeBootcamp: View {
@State var currentRepeatMode = "yearly"
var body: some View {
VStack {
Picker(selection: $currentRepeatMode, label: Text("")) {
Text("yearly")
Text("daily")
Text("monthy")
}
.frame(width: 100)
}
}
}
enter image description here
New contributor
forthonliu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1