-
Notifications
You must be signed in to change notification settings - Fork 87
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
onAppear called immediately after push/pop #19
Comments
Hi, For now, I've used the following method introducing a new
|
Hi, I've updated my example so no UUID has to be declared in the views that want to react on the end of navigation. The idea is simply to use
|
This is particularly evident when accessing an environmentObject. Like so: https://github.com/xyrer/navigation-stack-bug Even tho your solution might look like it works, it only does it with very simple instructions, doing anything beyond that will take it into an infinite loop and crash, best of cases it just bounces back like when using onAppear. I'm still looking into it |
Hi @spifd, thank you so much for investigating this issue. Unfortunately we can't rely on the framework |
Hi there,
First, thanks for this stack, really useful for my small side project as a SwiftUI rookie.
Actually, I've just encountered the following behavior:
onAppear
is called immediately when pushing/popping pages, and not when the transition is finished. As I have an advanced custom transition taking more time and leading to a page that will have its own animation, I would like onAppear to be delayed until the transition is finished.I believe this is not really a bug but I'm wondering if this could be solved by this stack. Note: I can probably use state and enhance my custom transition to workaround (even though tbh custom transitions are a bit buggy when I want to deal with timing/delays).
Here is a simple example:
The text was updated successfully, but these errors were encountered: