I want to create a design similar to the image above. To create the bottom TabView, I used this code:
import SwiftUI
struct ParentTabView: View {
var body: some View {
TabView {
HomeView()
.tabItem {
Image(systemName: "star.fill")
Text("Home")
}
Text("Second Tab")
.tabItem {
Image(systemName: "star.fill")
Text("Discover")
}
Text("Third Tab")
.tabItem {
Image(systemName: "star.fill")
Text("Settings")
}
}
}
}
and the HomeView
struct HomeView: View {
var body: some View {
NavigationView {
Text("Home")
.navigationBarItems(
trailing:
Button(action: {
}) {
Image(systemName: "plus")
}
)
.navigationTitle("Home")
}
}
}
The problem I encounter is with the top navigation bar, as I'm not able to edit the NavigationView to receive other views below the title. I can set the title and add the "plus" button, but not edit the whole top bar.
Can NavigationView be customized in such a way and if not, how can I achieve that result while still keeping the advantages NavigationViews offer, such as NavigationLinks etc.