- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
This function load a view from right side. How can I Load a view from left side?
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
This function load a view from right side. How can I Load a view from left side?
Here it is
CATransition *animation = [CATransition animation];
[[self navigationController] pushViewController:elementController animated:NO];
[animation setDuration:0.45];
[animation setType:kCATransitionPush];
[animation setSubtype:kCATransitionFromLeft];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]];
[[elementController.view layer] addAnimation:animation forKey:@"SwitchToView1"];
For this you have to #import <QuartzCore/QuartzCore.h>
don't think there is a readymade way to do that. You will have to animate the view yourself using animateWithDuration:delay:options:animations:completion:
or animateWithDuration:animations:completion:
(or any other animation methods) and change frames of your view accordingly so that it animates from the right side.
Hope this helps :)
if you already been pushed to a viewController you can use this:
[self.navigationController popViewControllerAnimated:YES]