HOW DO I MAKE THEM BOTH APPEAR IN THE VIEW?
I'm trying to make a view with both tabbar & navigationbar,
but it's either shows the navigationBar or the tabBar (depends on which I put first \ on top)
for example - this will show only the Navigation Bar:
var body: some View {
TabView(selection: $selectedTab) {
NavigationView{
CustomTableView(lang: $lang)
.tag(0)
.tabItem {
Text("Home")
Image(systemName: "house.fill")
}
//NavigationBar Title:
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .principal) {
let title = "Title"
Text(title)
.font(.title)
}
ToolbarItem(placement: .navigationBarTrailing) {
Image(Constants.logoImage).resizable()
.scaledToFit()
.frame(width: 100, height: 50, alignment: .trailing)
}
}
}
}
}