Questions tagged [swiftui-navigationstack]

For questions about SwiftUI's NavigationStack, a view that displays a root view and enables you to present additional views over the root view.

198 questions
3
votes
0 answers

Moving between NavigationStacks(path:...) throwing "Update NavigationAuthority bound path tried to update multiple times per frame."

I have a segmented picker on my main page allowing the user to select between views to be loaded into that main view. Each of those views has a NavigationStack with a path. Moving between them results in "Update NavigationAuthority bound path tried…
Ricardo B.
  • 41
  • 2
3
votes
0 answers

SwiftUI: Customizing the Native Navigation Bar in SwiftUI to Mimic the Apple TV App's Style and Animations - iOS 16

How can I customize the native navigation bar in SwiftUI to resemble the one used in the Apple TV app for iOS? On the detail screen, there's a native navigation bar where the tint color of the toolbar button item and the navigation bar background…
Yatheesha
  • 10,412
  • 5
  • 42
  • 45
3
votes
0 answers

Infinite loop by using @Binding when passing data between views

High-level description: There is a nested view problem when a state object is being passed through views. At the end of the deepest view in the hierarchy, the app is frozen and memory consumption is increasing continuously. Use-case Partners list →…
3
votes
1 answer

Using a custom background behind NavigationStack in SwiftUI

This ought to be straightforward enough, but I cannot find out how to place a background behind a NavigationStack. With NavigationView, it was simply a matter of embedding in a ZStack with the background view called before the NavigationView (as…
Hyoryusha
  • 175
  • 1
  • 11
3
votes
1 answer

Animating transition in NavigationStack on macOS

I made a simple macOS application with NavigationStack and few views presented using NavigationLink(value:label:). It works really nice, except there is no animation at all. Is it possible to add animations to NavigationStack in this way? I can't…
Damian Dudycz
  • 2,622
  • 19
  • 38
3
votes
1 answer

Search Bar is briefly visible when navigating with NavigationStack (SwiftUI)

I have a .searchable modifier on a list where I navigate to with new NavigationStack. However when the view loads the search box is briefly visible which looks weird. Am I using the navigation stack incorrectly or is this some kind of bug? Here is…
Can Celik
  • 2,050
  • 21
  • 30
3
votes
1 answer

Why does the navigation title change from large to "scrolled" when popping a NavigationLink inside a NavigationStack on iOS 16?

I have run into some unexpected behavior when using a NavigationLink inside a NavigationStack. If I navigate from a view with a large navigation title to a view with an inline title, the title display mode does not automatically revert to large when…
3
votes
1 answer

Why NavigationStack with NavigationPath calls navigationDestination multiple times on path append?

The navigationDestination is being called a single time when using an array of type (ie: [String]) but multiple times when using NavigationPath after an append. Check it with a breakpoint on Text(string) and switching the path types. Tested…
JS1010111
  • 341
  • 2
  • 12
3
votes
1 answer

SwiftUI using .NavigationDestination is making the app go back on the view after pressing the button

After changing the code to use NavigationStack and list to list clickable items which open a different View. Clicking the item changes the view for a second and then bounces back to HomeView. HomeView.swift ` // // HomeView.swift // LDMT // // …
3
votes
1 answer

SwiftUI 4.0 - Passing a Binding via .navigationDestination(for: , destination: )

How do I pass a Binding via the new .navigationDestination(for: , destination: )? import SwiftUI enum TestEnum: String, Hashable, CaseIterable { case first, second, third } struct ContentView: View { @State private var test: TestEnum…
3
votes
2 answers

NavigationLink fires more one times in NavigationStack

I faced the problem when NavTestChildView called more one times. I don't understand what going wrong. I tested on a real device with iOS 16.0.3 and emulator Xcode 14.0.1 I replaced original code to give more info about the architecture why I create…
3
votes
1 answer

navigate with NavigationStack swiftUI

I am new to SwiftUI framework I am trying to implement NavigationStack. I want to navigate on button action instead of using NavigationLink. The reason behind that is, I need to navigate once a particular function get performed on button…
2
votes
0 answers

How to use Navigation Stack with a Protocol as the data type?

I have a List that iterates over an array of protocols and creates a NavigationLink for each protocol, with a label that displays a field of the protocol. When trying to use the .navigationDestination modifier on the list for the Protocol's data…
2
votes
0 answers

NavigationStack push animation disappears after presenting a view with .sheet modifier

I need to present a view with .sheet modifier in NavigationStack. But the default push animation of NavigationStack will disappear if I present a view with .sheet modifier first. This is my code: import SwiftUI class Coordinator:ObservableObject…
Rufus
  • 640
  • 1
  • 7
  • 14
2
votes
2 answers

SwiftUI NavigationStack animation problem when navigating back to parent view

I have a parent view with a NavigationStack containing a List with NavigationLinks, the NavigationStack have a large title. These NavLinks go to an other List with Sections in it, this List have a inline title. The problem appears when going back to…
simsab
  • 81
  • 8
1
2
3
13 14