在SwiftUI的TabbedView
中,有没有办法在选中或未选中时更改选项卡项的图像?
TabbedView(selection: $selection) {
Text("Home").tabItem {
Image(systemName: "house")
Text("Home")
}.tag(0)
Text("Away").tabItem {
Image("away")
Text("Away")
}.tag(1)
}
我尝试在网络上搜索但没有找到答案。 我正在使用Xcode 11 beta 4。