EDIT:
NOTE: I don't want to push a segue. I want to push a view with that animation.
EDIT 2:
Some people are confused when I talk about animation names. However here is an example of an animation name that works (name is: UIViewAnimationTransitionFlipFromRight):
[UIView beginAnimations: @"Showinfo"context: nil];
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.75];
[self.navigationController pushViewController: view animated:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];
[UIView commitAnimations];
I am using push and pop to recall the actions on a stack. I believe that Navigation controller keeps the navigation in a stack style structure.
I am using a Navigation controller and I like the effect that I get when I go back (pop) to the previous view using the navigation bar item. It is a nice and smooth from right to left effect.
This is an example of a from right to left effect:

How can I create the complementary a from right to left effect? In other words when I go down in the view hierarchy?
This is how I push the view controller at the moment:
[self.navigationController pushViewController:view animated:YES];
We need to add CATransition animation for our viewController. look at this,
add <CAAnimationDelegate> in your .h file
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
ViewController *VC = [storyboard instantiateViewControllerWithIdentifier:@ViewController"];
CATransition *transition = [CATransition animation];
transition.duration = 0.45;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromLeft;
transition.delegate = self;
[self.navigationController.view.layer addAnimation:transition forKey:nil];
[self.navigationController pushViewController:VC animated:NO];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With