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

Default UINavigationController animation? #7

Open
kutakmir opened this issue Feb 10, 2021 · 1 comment
Open

Default UINavigationController animation? #7

kutakmir opened this issue Feb 10, 2021 · 1 comment

Comments

@kutakmir
Copy link

kutakmir commented Feb 10, 2021

Hi, quick question - how do I replicate the default NavigationView's transition animation?

It's not a plain .move, it's both move and offset of the original one at a half distance.
Any idea on how to implement this using NavigationKit?

I've got:

let pushTrans = AnyTransition.asymmetric(insertion: .move(edge: .trailing), removal: .offset(x: -UIScreen.main.bounds.size.width / 2, y: 0))
        let popTrans = AnyTransition.asymmetric(insertion: .move(edge: .leading), removal: .offset(x: UIScreen.main.bounds.size.width / 2, y: 0))

But that doesn't change the z-value and looks incorrect.

@rebeloper
Copy link
Owner

Good question. Don’t know just yet. Let me know if you come up with the right transition

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

2 participants