Questions tagged [swiftui-navigationview]

For questions about NavigationView - a view in Apple's SwiftUI framework that presents a stack of views representing a visible path in a navigation hierarchy. When using this tag also include the more generic [swiftui] tag where possible.

Links:

583 questions
0
votes
0 answers

TabView Navigation SwiftUi

I have such a code and I can't set up navigation struct ContentView: View { var body: some View { TabView{ RootView(title: "Main") .tabItem{ Image(systemName: "house") …
dev_nil
  • 89
  • 1
  • 8
0
votes
0 answers

SwiftUI Navigate up down not working in Grid

Here is my simple tvOS 16.0 app with the following code: import SwiftUI struct ContentView: View { var sixColumnGrid: [GridItem] = Array(repeating: .init(.flexible()), count: 6) let colors: [Color] = [.red, .green, .blue, .yellow,…
0
votes
1 answer

SwiftUI NavigationView cannot appears multiple NavigationLinks

I have a navigation view and each NavigationLink jumps to a color view: struct ContentView: View { private let navigationLinks: [NavigationItem] = [ NavigationItem("Red", AnyView(Color.red.edgesIgnoringSafeArea(.all))), …
0
votes
0 answers

Spacer() doesn't work properly in .toolbar

I've encountered the following issue with a .toolbar in NavigationView. It seems Spacer() doesn't work properly there. Here's a screenshot Issue And here's the code NavigationView { ... .toolbar { // bottom …
0
votes
1 answer

Navigation View in Tab View Child Views SwiftUi

I have started learning swiftUI so I have question about Navigation View. My app starts with splash screen which is embedded in Navigation View and after that I have navigation link to the second screen which is Tab View. Do I need navigation views…
0
votes
0 answers

How to implement different navigation titles for different tab views in SwiftUI?

My code is currently seen below. I'm expecting the first tab to have the navigation title "Friends" and the second tab to have the navigation title "Filtered View". However, they both show the navigation title of "Friends"…
0
votes
0 answers

How to show detail of multiple items together which are selected in a list in SwiftUI

Taking the example from SO answer itself where multiple selection in a list is performed. Next step is how to show detail view of selected items together in detail view. Not able to figure out this issue. Created a button which will redirect to…
0
votes
0 answers

SwiftUI navigation bug

I'm experiencing a weird issue where a navigation link will break when I don't want it to. I'm using a state based navigation system that looks like this : @State var isNavActive: Bool = false @State var destination: AnyView =…
0
votes
0 answers

SwiftUI 3-Column NavigationView crashes when middle removes detail

I am using NavigationView with three columns: Sidebar, Search & Detail. When a search result in the middle column is selected on the iPad (where search and detail are displayed side by side) and then disappears from the list due to the search term…
Stefan
  • 1,051
  • 3
  • 11
  • 23
0
votes
2 answers

In SwiftUI how do I decrease the size or get rid of a Section header when using InsetGroupedListStyle?

In a view like this: struct ContentView: View { var body: some View { List { Section("How do I get rid of this space") { Text("Static content") } Section("How do I get rid of this space") { Text("Static…
0
votes
1 answer

SwiftUI TabView inside a NavigationView

So I know it's not really encouraged to put a TabView inside a NavigationView and that you're supposed to do it the other way around. But the way I want my app I don't really see how I can have it another way... So I have a login screen in which a…
0
votes
1 answer

Remove title when pushing EKCalendarChooser to Navigation Stack with SwiftUI

I'm working on an app where I want to push the EKCalendarChooser View Controller to the navigation stack with a navigation link. Everything works as expected apart from the fact that I can't get rid of some magic title/label. I want to hide the…
0
votes
1 answer

Align multiple dynamic HStack in VStack inside navigation View

Need to align this : import SwiftUI struct MainAct: View { private let images = ["ImageSlide/first","ImageSlide/second","ImageSlide/third","ImageSlide/fourth","ImageSlide/five","ImageSlide/six","ImageSlide/seven"] @StateObject var imageList =…
0
votes
3 answers

Swiftui push to full screen SFSafariViewController from half model sheet

I want to push to a full screen SFSafariViewController from half model sheet. What I want is first present a sheet with a "Link Btn" , the click "Link Btn" to push to a full screen webview to show a web page, just like bellow: My code is a…
0
votes
0 answers

NavigationLink causing ChildView to reinitialize whenever ParentView is visible again (SwiftUI)

I currently have an app where the user goes through pages of lists to make multiple selections from. (using NavigationLinks) PROBLEM: The functionality is fine if the user simply makes their selection then moves on, however the issue is when the…