如何设置以下按钮项目的排序顺序(忽略和固定)?它没有以菜单列表中的确切排序顺序显示。我认为操作系统本身正在更新排序顺序。有什么选项可以限制相同吗?
结构ContentView:视图{
var body: some View {
Menu {
Button(action: {
self.self.placeOrder()
}) {
HStack {
Text("Ignore")
.multilineTextAlignment(.leading)
Image("Menu_Ignore")
.renderingMode(.original)
}
}
Button(action: {
self.adjustOrder()
}) {
HStack {
Text("Pin")
.multilineTextAlignment(.leading)
Image("Menu_Pin")
.renderingMode(.original)
}
}
} label: {
Label("Options", systemImage: "paperplane")
}
}
func placeOrder() { }
func adjustOrder() { }}
Run Code Online (Sandbox Code Playgroud)