Real UINavigation animation
Is there a way to animate it so that the when a new view is pushed into the controller, the active view doesn't slide to the left to let the new one come in?
And when a view is popped, it will slide to the right and the previous one will be behind it instead of sliding from the left.
Right now the animation looks like a carousel while UINavigationController doesn't really look like a carousel.
Regards, Alex
I believe what you are looking for are the REVEAL_ and COVER_ transition styles: https://github.com/aputinski/react-navigation-controller#pushviewview-options
Is there a demo of those two working side by side?
If you're looking to mimic the exact transition of UINavigationController, you can pass a function as the transition option and do whatever you'd like:
navigationController.pushView(<MyView />, {
transition(prevElement, nextElement, done) {
// Do some sort of animation on the views
prevElement.style.transform = 'translate(100%, 0)';
nextElement.style.transform = 'translate(0, 0)';
// Tell the navigationController when the animation is complete
setTimeout(done, 500);
}
});
Ah sweet, just what I was looking for. Thank you!