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
9
votes
1 answer

searchable modifier not displaying search bar below navigation bar title

I'm using iOS 15 and trying out the new searchable modifier on Lists in SwiftUI. It looks like when you attach searchable(text: $searchText) to a NavigationView the search bar renders on the screen by default below the navigation bar title. When…
Petesta
  • 1,623
  • 3
  • 19
  • 29
9
votes
1 answer

Navigation + Tabview + Sheet broken in iOS 15

It looks like Navigation + TabView + Sheet is broken in iOS 15. When I do this: ContentView -> DetailView -> Bottom Sheet When the bottom sheet comes up, the Detail view is automatically popped off the…
8
votes
1 answer

SwiftUI Error: Update NavigationAuthority bound path tried to update multiple times per frame

I am getting the following debug message: "Update NavigationAuthority bound path tried to update multiple times per frame." Does anyone know how to resolve the output message? I can't find anything online about how to resolve this message, and it…
Romin
  • 121
  • 6
8
votes
0 answers

Why does the navigation title display mode change from large to inline when popped in iOS 16?

When I pop from a pushed view that has a display mode of inline the display mode of the parent view which was originally large is changed to inline and the user has to scroll down for the title to revert back to its original mode. Q: How do I…
8
votes
1 answer

SwiftUI navigation titles within TabView

For the reason outlined in the answer outlined in this question SwiftUI TabView brightness views vertical location the menu structure for my app is NavigationView -> TabView -> sub view with varying navigation titles. The problem is that…
8
votes
1 answer

SwiftUI Toolbar item getting clipped when back button is pressed

I've run in to a strange behavior in SwiftUI that I can't seem to work around. Given the following simple example app I experience this behavior: The toolbar item renders correctly on the initial run, but navigating away and returning it gets…
8
votes
3 answers

SwiftUI's NavigationLink `tag` and `selection` in NavigationView stops working if not all NavigationLinks are displayed

I have a list of items in a Form in a NavigationView, each having a detail-view that can be reached with NavigationLink. When I add a new element to the list, I want to show its detail-view. For that I use a @State var currentSelection that the…
8
votes
1 answer

How to push onto an existing UINavigationController stack from SwiftUI?

We're pushing to a SwiftUI view embedded in a UIHostingViewController in UIKit land like this: First making the UIViewController: func hostingController() -> UIViewController { let swiftUIView = swiftUIView(viewModel: viewModel(data: [Data,…
7
votes
2 answers

Add accessory view below navigation bar title in SwiftUI

I’m trying to add an accessory view embedded in a navigation bar below the title, which can be seen in the default iOS calendar app (the “s m t w t f s” row) or the GitHub mobile app: And I’d like it to work along with the large title style…
Jay Lee
  • 1,684
  • 1
  • 15
  • 27
7
votes
0 answers

SwiftUI preview's subviews are unselectable when embedded in NavigationView

When I embed my view's body inside of a NavigationView I lose all ability to select subviews within the preview window, as well as the reverse ability of selecting code to trigger and display the blue border around the associated subview in the…
Aaron
  • 6,466
  • 7
  • 37
  • 75
7
votes
2 answers

Remove screen from navigation stack in SwiftUI

I'm using NavigationLink to navigate screens in NavigationView. How can I remove screen from navigation stack? Not just hide the navigation "Back" button but completely remove screen from stack? For example, I have screen chain like this: A -> B ->…
badadin
  • 507
  • 1
  • 5
  • 18
7
votes
2 answers

Too much space left between items when using ToolbarItemGroup

When I use toolbar group in SwiftUI, there is too much space between elements. I put it with HStack in iOS 13, it is ok. But when I put it with toolbar in iOS 14, there is a problem. How can I fix this? var muteUser: some View { …
ursan526
  • 485
  • 3
  • 10
6
votes
0 answers

Navigation bar title stays inline in iOS 15

I have a NavigationView that contains a ScrollView with a large title. When I navigate to a page with an inline title, then navigate back, the title stays inline rather than reverting to the large title. This only occurs in iOS 15 - in iOS 14 the…
sia
  • 256
  • 3
  • 14
6
votes
2 answers

NavigationView bar material invisible on iOS 15

On iOS 15, an app with a NavigationView with .inline mode no longer shows the blurry material color you would see for the navigation bar. Example code: struct ContentView: View { var body: some View { NavigationView { ZStack…
George
  • 25,988
  • 10
  • 79
  • 133
6
votes
1 answer

SwiftUI macOS toolbar icons alignment for three column layout

Following this question, how to add a toolbar divider for a three column view in swiftUI life cycle , I have a slightly different issue. I am trying to achive the same thing but the second and third columns are contained in a view which in turn is…
horace1921
  • 73
  • 5
1
2
3
38 39