You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @kutakmir, thanks for this interesting question. I'd like to have the actual default animation too, but at the moment I can't manage to do it. Basically you should try to play with the defaultTransitions property in the NavigationStack.swift file. If I try to write something like this (100 is just an example of course):
public static var defaultTransitions: (push: AnyTransition, pop: AnyTransition) {
let pushTrans = AnyTransition.asymmetric(insertion: .move(edge: .trailing), removal: .offset(x: -100))
let popTrans = AnyTransition.asymmetric(insertion: .offset(x: -100), removal: .move(edge: .trailing))
return (pushTrans, popTrans)
}
The outcome is not the expected one. I think it is something related to this (still open) issue: #17
Hey @kutakmir, depending on your use case I created a much simpler SwiftUI navigation library that basically wraps the UINavigation controller and makes programmatic navigation super easy. You get exactly the benefit mentioned above, the native iOS push transition including the drag to dismiss gesture.
Hi, quick question - how do I replicate the default NavigationView's transition animation?
It's not a plain .slide, it's both slide and slide of the original one at a half distance.
The text was updated successfully, but these errors were encountered: