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

Add z index to the views being pushed and popped so that the views appear on top of each other. #42

Closed
wants to merge 1 commit into from

Conversation

Alexandru981
Copy link

Hi @matteopuc! I really love the work you did on the NavigationStackView and I think it's a really grate alternative for the SwiftUI default NavigationView.

I started using it and wanted to create a custom transition, one that mimics the iOS's push and pop transition where the view being pushed goes on top of the other. Like this:

https://i.stack.imgur.com/Lmb7G.gif

Unfortunately in the current implementation the currentView will always appear on top (even when popping) and I got something like this:

push_pop_demo.mov

To get the effect I wanted I added a zIndex to the pushed and popped views.

Screen.Recording.2021-01-29.at.15.58.00.mov

I am writing this pull request as an idea, please take a look at it and disregard it if you think it's not in the direction you want to take your project 😄 .

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.

None yet

1 participant