Help, can't use TabView

Hi, I learned swift only a few weeks ago, and im trying to make a TabView in Xcode. But, it shows only one item! I've already made this work in other apps, but I can't get it working here!

import SwiftUI


struct tabs: View {
    var body: some View {
        TabView {
            ContentView()
                .tabItem {
                    Image(systemName: "house.circle.fill")
                    Text("Home")
            Settngs()
                .tabItem {
                    Image(systemName:"gear.circle.fill")
                    Text("Settings")
                        }
                }
        }
    }
}

#Preview {
    tabs()
}

and also, I checked "settngs()" and its my name

Answered by Vision Pro Engineer in 793535022

Hi there! you're missing a closing bracket after Text("Home"), so it is only rendering the first tab since it never sees an end to the tab item.

Accepted Answer

Hi there! you're missing a closing bracket after Text("Home"), so it is only rendering the first tab since it never sees an end to the tab item.

Help, can't use TabView
 
 
Q