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

Try to use the NaivgationStackView to manage the back stack. #374

Closed
wants to merge 5 commits into from

Conversation

skywalkerdude
Copy link
Collaborator

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)

Copy link
Collaborator

@finben finben left a 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?

@finben
Copy link
Collaborator

finben commented Jul 6, 2020

Also, note that this branch reintroduces the tab bar icon alignment
Simulator Screen Shot - iPhone 11 Pro - 2020-07-06 at 11 10 01
bug.

@skywalkerdude
Copy link
Collaborator Author

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?

@skywalkerdude
Copy link
Collaborator Author

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?

@skywalkerdude skywalkerdude deleted the navigationstack branch April 7, 2024 05:46
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

Successfully merging this pull request may close these issues.

Look into using Navigation stack for project instead of SwiftUI stock navigation
2 participants