watchOS 多个工具栏项目
我的目标是在我的WatchOS应用程序中将2个按钮作为工具栏项目,但是即使我将其分组为工具键或单独放置多个工具栏,也只有一个显示。知道这里有什么问题吗?
.toolbar {
ToolbarItem {
Button("1") {
}
}
ToolbarItem {
Button("2") {
}
}
}
或者
.toolbar {
ToolbarGroup {
Button("1") {
}
Button("2") {
}
}
}
my goal is to have 2 buttons as a toolbar item in my WatchOS app, but even if I group them in a toolbargroup or place multiple toolbarItems on their own, there is only one that is shown. Any idea what is wrong here ?
.toolbar {
ToolbarItem {
Button("1") {
}
}
ToolbarItem {
Button("2") {
}
}
}
or
.toolbar {
ToolbarGroup {
Button("1") {
}
Button("2") {
}
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,找到了。将它们放在堆栈(V或H)工作中
Ok, found it. Placing them in a Stack (V or H) works