I have a NavigationView where I set the .navigationBarHidden(true) in my SplashScreen. Here it correctly does not display, however when I go to the next screen the NavigationView bar appears. How can i properly hide the navigation bar? The background does also not properly display.
View
struct EventsScreen: View { var eventsRepository: EventsRepository @State var currentPage: Int = 0 @State private var searchTerm : String = "" func getEventSections() -> [EventSection] { eventsRepository.fetchEventSections() } func getViewControllers() -> [UIHostingController<EventFeatureView>] { return eventsRepository.fetchFeaturedEvents().map({ event in UIHostingController(rootView: EventFeatureView(event: event)) }) } var body: some View { NavigationView { List { ZStack(alignment: .top) { EventViewController(controllers: self.getViewControllers(), currentPage: self.$currentPage) VStack { SearchBar(text: $searchTerm) .padding(EdgeInsets.init(top: 16, leading: 16, bottom: 0, trailing: 16)) HStack { Spacer() Chip(text: "Dates", action: { //TODO filter on dates }) Chip(text:"Type", action: { //TODO filter event type }) Chip(text: "Points", action: { //TODO filter points }) Spacer() } } }.listRowInsets(EdgeInsets()) .frame(height: 600) ForEach(self.getEventSections()) { section in EventSectionView(eventSection: section) } } } .background(LinearGradient(gradient: Gradient(colors: [.black, ColorTheme.brandPurple.color]), startPoint: .top, endPoint: .bottom)) .navigationBarTitle(Text("Events"), displayMode: .inline) .navigationBarHidden(true) } }