-
Notifications
You must be signed in to change notification settings - Fork 0
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
Try to use the NaivgationStackView to manage the back stack. #374
Conversation
910af33
to
fff7589
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I took a look. One thing is that you need to use Screen so that the whole page changes on each transition instead of just the view content. It is on the home page of https://github.com/biobeats/swiftui-navigation-stack#usage starting at the IMPORTANT note lol. When I added screen I got some better results but it was still buggy and slow.
Idk, is there a reason for implementing this app wide. I wonder if we can just use it to address our issue
#248 for this one case?
…ui-navigation-stack/blob/master/Sources/NavigationStack/NavigationStack.swift) to manage the back stack. Let's see if this works
fff7589
to
598dc42
Compare
One caveat: currently, NavigationStackView calls onAppear immediately after push/pop, versus after the transition is completed. (matteopuc/swiftui-navigation-stack#19). If you add a 0.2 second delay in the onAppear before doing the viewModel logic, the animation transition is perfect: matteopuc/swiftui-navigation-stack#23 (comment) @finben what do you think? should we go with this workaround? Or should we just wait until the library is fixed or SwiftUI decides to support navigation stack management? |
…make animation much smoother
We do need to fix the tab bar icon alignment bug. @finben could you take a stab to see if you can fix it on this branch? |
Let's see if this works... (https://github.com/biobeats/swiftui-navigation-stack/blob/master/Sources/NavigationStack/NavigationStack.swift)
@finben could you try to play around with this branch a bit? The view transitions don't work too well for me, but maybe you can edit the transition animations and have better luck than I did (https://github.com/biobeats/swiftui-navigation-stack#usage)