Skip to content

Does this library address issue in iOS 16 NavigationStack when popping multiple items off the path? #41

Closed Answered by davdroman
rkonopka asked this question in Q&A
Discussion options

You must be logged in to vote

@rkonopka good news! I was able to come up with a workaround — see #44.

Here's a working example (from https://stackoverflow.com/q/73753796/1922543):

import NavigationTransitions
import SwiftUI

struct DemoPop: View {

    @State private var path = NavigationPath()

    var body: some View {
        NavigationStack(path: $path) {
            List {
                Section("List One") {
                    NavigationLink("Navigate to View 1", value: "View 1")
                    NavigationLink("Navigate to View 2", value: "View 2")
                }
            }
            .navigationDestination(for: String.self) { textDesc in

                VStack {
                    Text(textDesc).p…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rkonopka
Comment options

Answer selected by davdroman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants