How to correct error: "Cannot convert value of type 'MyType.Type' to expected argument type 'Binding<MyType>'"?

42 views Asked by At

I am new to coding and get this error message:

"Cannot convert value of type 'Tab.Type' to expected argument type 'Binding'"

What can I change to fix this? Here's my code:

enum Tab: String, CaseIterable{ 
    case house 
    case person 
    case message 
    case gearshape 
}

struct ContentView: View { 
    @Binding var selectedTab: Tab 
    private var fillImage: String { 
    selectedTab.rawValue + ".fill" 
    }
    var body: some View {
    VStack {
        HStack {
            
        }
        .frame(width: nil, height: 60)
        .background(.thinMaterial)
        .cornerRadius(10)
        .padding()
      }
   } 
}
0

There are 0 answers