struct ContentView: View {
@State private var selectedTab = 0
var body: some View {
TabView(selection: $selectedTab) {
HomeView() .tabItem { Label("Home", systemImage: "house") } .tag(0)
SearchView() .tabItem { Label("Search", systemImage: "magnifyingglass") } .tag(1)
SettingsView() .tabItem { Label("Settings", systemImage: "gear") } .tag(2) }
.accessibilityLabel("Main Navigation Tab Bar")
.accessibilityElement(children: .contain)
}
I am trying to read UITabBar of TabView before reading TabBarItems but none of the solutions works.