Skip to content

Default UINavigationController animation? #7

@kutakmir

Description

@kutakmir

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions