Error: Value of type 'SettingsView' has no member 'tabItem'

I'm going through the tutorial and have copied the code given to me verbatim, but I am still getting the error 'Value of type 'SettingsView' has no member 'tabItem'. Not sure what to do. Code is below.

import SwiftUI

@main struct MyApp: App { var body: some Scene {

    WindowGroup {
       
        TabView {
            ContentView()
                .tabItem {
                    Label("Journal", systemImage: "book")
                }
            SettingsView()
                .tabItem { *error is here - Value of type 'SettingsView' has no member 'tabItem'
                    Label("Settings", systemImage: "gear")
                }
        }
    }
}

}

Answered by ForumsContributor in
Accepted Answer

What tutorial? Perhaps you've not copied the code correctly, or have missed something out.

And, please format your code correctly.

Three backticks before your code, and three afterwards, i.e.

ALL of my code is within the two lines of backticks.

Error: Value of type 'SettingsView' has no member 'tabItem'
 
 
Q