我想有一个底部的工具栏与SwiftUI. 以下代码在iOS 15中运行,但在iOS 16中不起作用. 在iOS 16中,工具栏不显示.(如果我改变位置,它就起作用了…)
Text("Content")
.toolbar {
ToolbarItemGroup(placement: .bottomBar) {
Button("Greeting") {
print("Hello world!")
}
}
}
您有解决此问题的方法吗?
谢谢!