All Questions
85
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 ...
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:
...
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...
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 {
...
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) {...
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 {
...
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 {
...
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 == "...
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 ...
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 ...