Skip to main content

All Questions

0 votes
1 answer
38 views

swiftui: NavigationStackHostingController containment skipped because source and destination were nil

Getting the below error when using the NavigationStack in SwiftUI for Apple Watch platform. NavitigationView works well but it does not serve the purpose. Not sure what wrong is happening. Any help ...
Vinod Sutar's user avatar
0 votes
1 answer
55 views

SwiftUI: How to Navigate from Screen C Back to Screen A (Skipping Screen B) with Back Swipe Gesture?

I'm building a SwiftUI app where I have three screens (A, B, and C) navigated sequentially. The flow looks like this: Screen A -> Screen B -> Screen C I want to achieve the following behavior: ...
akhsary's user avatar
1 vote
1 answer
39 views

NavigationStack(path: ) - Is path meant to update the Binding<Value> passed in?

I'm a little confused by the syntax of NavigationStack(path: Binding), as mentioned above, it looks like NavigationStack should automatically handle the updating of path when a NavigationLink is ...
Elliott D'Alvarez's user avatar
0 votes
1 answer
37 views

Determine if a SwiftUI view is presented as sidebar?

I'm using a NavigationSplitView to present a two-column view, with a sidebar and detail content on iPad, which is collapsed into a single-column view on iPhone and when the app is used in Split View ...
CompC's user avatar
  • 415
0 votes
1 answer
77 views

SwiftUI: How to correctly navigate in TabView and NavigationStack using NavigationPath?

I'm experiencing a problem using programmatic navigation using TabView and NavigationStack. I have a TabView with a $selection pointing to a NavigationPath in an environmentObject. I also have two ...
ZStacker's user avatar
0 votes
0 answers
65 views

Navigation link cannot be activated

I am working on combining two feeds in the same view. They are held inside a ZStack enclosed by a NavigationStack. The issue arises when clicking on the tab bar item to navigate to the message view, ...
jake42's user avatar
  • 1
0 votes
2 answers
453 views

Navigation issue in Swiftui iOS 18 skipping a page

I have an app that takes an ObservableObject known as AppState(), sets up as StateObject and is passed through to MenuView() and so on as an EnvironmentObject from the @main struct. My MenuView makes ...
PW1990's user avatar
  • 471
0 votes
0 answers
153 views

Get SwiftUI preview to work with NavigationStack

I've abstracted my navigation into a service for my SwiftUI app. When I run it on the simulator or physical device it works perfectly. However, when testing in the #Preview, the navigation doesn't ...
markb's user avatar
  • 1,238
0 votes
1 answer
27 views

Animation of VStack child inside NavigationStack animates other properties [duplicate]

Why is this happening? Here is a POC: struct POCNavigationStackBehavior: View { @State private var animating = false var body: some View { NavigationStack { VStack { ...
jonasmylesx's user avatar
2 votes
1 answer
105 views

Why does my SwiftUI View not show when it is wrapped in its own NavigationStack?

I have a SwiftUI view that is the landing page for my app with a body like this: @State private var navigationPath = NavigationPath() var body: some View { NavigationStack(path: $navigationPath) {...
ChillOutJimmy's user avatar
2 votes
0 answers
101 views

SwiftUI NavigationStack bug - tapping on NavigationLink leads to freeze when destination view contains AppStorage

struct NavStack: View { @AppStorage("userid") var userid: Int = 0 @State var memes = [MemeModel]() @State var path = NavigationPath() var body: some View { ...
TheGreatCornholio's user avatar
1 vote
1 answer
57 views

Why NavigationLink is not working sometimes, even when we alter the isActive variable?

Have you ever experienced the NavigationLink not working sometimes, but when you scroll the list to the bottom or do something else, the navigation is triggered? NavigationView { List { ...
Mushrankhan's user avatar
0 votes
1 answer
71 views

NavigationStack - NavigationLink doesn't work

In the MainView, I have this below NaviationStack: .navigationDestination(for: String.self){ selection in if(selection == "login"){ Login() }else if(selection == "...
TheGreatCornholio's user avatar
2 votes
1 answer
119 views

How to show large navigation title when using NavigationStack and .searchable?

I need to always show the search bar, but I want also to start the app with the large title. Instead what I get is a compacted version of it, like in the image: If I scroll then the large title ...
Alessandro Francucci's user avatar
0 votes
0 answers
36 views

Why does permission alerts inside a NavigationStack clear the navigationPath?

I ran into an weird bug this afternoon and I have no clue about what's happening. The problem is, as soon as the permission alert is shown, the navigation goes back to the root of the navigation ...
Nelo Angelo's user avatar

15 30 50 per page
1
2 3 4 5 6