My tab bar has different height when I switch between different tab.
At the info tab, the height of the tab view looks pretty normal but at the home page, the tab bar height is abnormal
Are there any ways to solve this problem
my code block for the main page
TabView{
aboutMe()
.tabItem(){
Image("ghost")
Text("Info")
}
topSpaceBar()
.tabItem(){
Image(systemName: "lifepreserver")
Text("Home")
}
Moments()
.tabItem(){
Image(systemName: "square.and.pencil")
Text("call")
}
Messages()
.badge(10)
.tabItem(){
Image(systemName: "bubble")
Text("call")
}
}
when I goes to second tab, the height changes , but the rest of tab works fine
NavigationView{
ZStack(alignment:.top){
TabView(selection: self.$currentTab){
Home(type:"lt")
.tag(0)
.background(.red)
Home(type:"pp")
.tag(1)
.background(.yellow)
Home(type:"yl")
.tag(2)
.background(.blue)
Home(type: "kj")
.tag(3)
.background(.green)
Home(type:"ks")
.tag(4)
.background(.white)
}
.foregroundColor(.black)
TabBarView(currentTab: $currentTab)
}
.navigationBarHidden(true)
}```
TabBarView is mu custom Tab bar