Closed netgfx closed 4 years ago
I was able to solve this by adding the following line:
self.navigationController?.hero.navigationAnimationType = .autoReverse(presenting: .cover(direction: .up))
or
self.navigationController?.hero.navigationAnimationType = .selectBy(presenting: .cover(direction: .up), dismissing: .slide(direction: .down))
then
self.navigator.push("app://about", context: nil, from: nil, animated: true)
So the trick here is to have .hero.isEnabled = true
on the navigator controller and then apply the animation to the navigator controller and not the presented view
What did you do?
Trying to use the build in transitions with URLNavigator library https://github.com/devxoul/URLNavigator
then
self.navigator.push("app://about", context: nil, from: TransparentNavigationViewController.self as? UINavigationControllerType, animated: true)
What did you expect to happen?
Expected to see the custom animation
What happened instead?
Normal push animation happens.
General Information
Hero Version: Latest
iOS Version(s): 13.5
Swift Version: 5.1
Devices/Simulators: Simulator iPhone X
Reproducible in Examples? (Yes/No): Not sure about this scenario
Demo Project