I tried to create a menu item with full width of the screen, as following the code:
But the menu label renders NOT in the full width using all preceding the codes.
Would you please help to check and share me the solution?
Thanks,
Philip
And tried to change the label using HStackVStack {
Menu {
Button("Option 1", action: actionOne)
Button("Option 2", action: actionTwo)
} label: {
Label("Options", systemImage: "paperplane")
.padding()
}
.frame(maxWidth: .infinity)
}
And tried to customize using MenuStyle.VStack {
Menu {
Button("Option 1", action: actionOne)
Button("Option 2", action: actionTwo)
} label: {
HStack {
Text("Options")
Spacer()
}
.padding()
}
.frame(maxWidth: .infinity)
}
But the menu label renders NOT in the full width using all preceding the codes.
Would you please help to check and share me the solution?
Thanks,
Philip