Random Error when using tabview

So I was coding so i get to learn Swift 5 and i want to make a TabView with multible Tabs.

 

Icodedt them everything went fine and I noticed i need one or two more so I added the code for them and then XCode tells me that error code “Argument passed to call that makes no arguments”. As soon as I delete my lines the error disappears.

 

In Line 9 he tells me the error and underlines the T  from .tabItem  I only added line 33 to 36.

 

import SwiftUI

struct ContentView: View {
    
    var body: some View {
    
            TabView {
                   
                CharakterView().tabItem {
                    Image(systemName: Constant.TabBarImageName.tabBar4)
                    Text("Charakter")
                    
                }
                
                AttributView().tabItem {
                    Image(systemName: Constant.TabBarImageName.tabBar1)
                    Text("Attribute")
                        
                }
                
                FertigkeitenView().tabItem {
                    Image(systemName: Constant.TabBarImageName.tabBar2)
                    Text("Fertigkeiten")
                        
                }
                
                VorNachView().tabItem {
                    Image(systemName: Constant.TabBarImageName.tabBar1)
                    Text("Vor/Nachteile")
                        
                }
                
                ConnectionView().tabItem {
                    Image(systemName: Constant.TabBarImageName.tabBar3)
                    Text("Connections")
                }
                
                
                BioCyberView().tabItem {
                    Image(systemName: Constant.TabBarImageName.tabBar1)
                    Text("Bio/Cyberware")
                        
                }
                
                ZauberView().tabItem {
                    Image(systemName: Constant.TabBarImageName.tabBar1)
                    Text("Zauber")
                        
                }
                
                AusruestungView().tabItem {
                    Image(systemName: Constant.TabBarImageName.tabBar1)
                    Text("Ausrüstung")
                        
                }
                
                VehicleView().tabItem {
                    Image(systemName: Constant.TabBarImageName.tabBar1)
                    Text("Vehicle")
                        
                }
               
                KiView().tabItem {
                    Image(systemName: Constant.TabBarImageName.tabBar0)
                    Text("Ki-Kräfte")
                        
                }
               
                KomplexView().tabItem {
                    Image(systemName: Constant.TabBarImageName.tabBar0)
                    Text("Komplexe Form")
                        
                }
                
                
            }
    }
}
        
    

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView().previewLayout(.fixed(width: 414, height: 896))
    }
}

Powered by WPeMatico

You may also like...

Comments are closed.