So i Have this NavBar with five items. The middle one is suppose to be a little bit bigger, have a orange background and have the logo of openai (its a school project). But no matter what i add to the tabitem, literally nothing happens.....
struct ContentView: View {
@State var workoutPlansManager = WorkoutPlansManager()
@State var exerciseManager = ExercisesManager()
init(){
UINavigationBar.appearance().largeTitleTextAttributes = [.foregroundColor : UIColor.init(Color.white)
]
}
var body: some View {
NavigationStack {
TabView {
HomeScreen(workoutPlansManager: workoutPlansManager, exerciseManager: exerciseManager)
.tabItem {
Label("Home", systemImage: "house")
}
WorkoutPlansScreen(workoutPlansManager: workoutPlansManager, exerciseManager: exerciseManager)
.tabItem {
Label("Home", systemImage: "house")
}
AiScreen()
.tabItem {
Image("openai").font(.largeTitle)
}
ExercisesScreen(exercisesManager: exerciseManager)
.tabItem {
Label("Home", systemImage: "house")
}
TimerScreen()
.tabItem {
Label("Home", systemImage: "house")
}
}
.onAppear{
UITabBar.appearance().barTintColor = UIColor(.black)
UITabBar.appearance().backgroundColor = UIColor(.black)
UITabBar.appearance().unselectedItemTintColor = UIColor(.white)
}
}
.foregroundColor(Color.white)
}
}
I have tried to add frame, font and everything, but nothing happens to anything inside of a tabitem as well as the tabitem itself.. what am i doing wrong? :/