Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programmatically navigation does not work on simulator or physical device with iOS 14.5 #54

Open
vegiwoo opened this issue May 14, 2021 · 0 comments

Comments

@vegiwoo
Copy link

vegiwoo commented May 14, 2021

On a simulator with iOS 13.0, programmatically navigation works fine, but on the same simulator with iOS 14.5 and on a physical device with iOS 14.5, the transition does not work. With what it can be connected?

// First View
@EnvironmentObject var navigationStack: NavigationStack
//...
DispatchQueue.main.async {
    let destination = ModelDetailContainerView()
        .environmentObject(appStore)
        .environmentObject(navigationStack)
    self.navigationStack.push(destination)
}

// Second View
@EnvironmentObject var navigationStack: NavigationStack

var body: some View {
    ModelDetailRenderView(item: detailedSelectedItem)
        .valueChanged(value: detailedSelectedItem.wrappedValue) { value in
            if value == nil {
                navigationStack.pop(to: .root)
            }
        }
}

UPD
Transition occurs by tap on the context menu item of custom cell. Programmatic behavior of all interested entities does not change depending on iOS version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant