Skip to content

'navigator.push' doesn't work in iOS 15 preview #44

@sugarwyc

Description

@sugarwyc
struct ContentView: View {
    @State var path = NBNavigationPath()

    var body: some View {
        NBNavigationStack {
            HomeView()
        }
    }
}

struct HomeView: View {
    @EnvironmentObject var navigator: PathNavigator

    var body: some View {
        VStack {
            Button {
                navigator.push(1)
            } label: {
                Text("Number 1")
            }
        }
        .padding()
        .nbNavigationDestination(for: Int.self) { number in
            Text("number: \(number)")
        }
    }
}

struct PreferencesView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

In iOS 15 preview
Tap the button, then go back, and then click the button again and there is no response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions