Created
February 12, 2014 07:28
-
-
Save amudi/8951353 to your computer and use it in GitHub Desktop.
Left to right transition iOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)perform | |
{ | |
UIViewController *sourceViewController = (UIViewController *)self.sourceViewController; | |
UIViewController *destinationViewController = (UIViewController *)self.destinationViewController; | |
[sourceViewController.view.window.layer addAnimation:[self.class leftToRightTransition] | |
forKey:kCATransition]; | |
[sourceViewController.navigationController pushViewController:destinationViewController | |
animated:NO]; | |
} | |
+ (CATransition *)leftToRightTransition | |
{ | |
static CATransition *transition = nil; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
transition = [CATransition animation]; | |
transition.duration = 0.3; | |
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; | |
transition.type = kCATransitionPush; | |
transition.subtype = kCATransitionFromLeft; | |
}); | |
return transition; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am facing issue in ios when i am using animation left to right to launch the subscreen after clicking the button in that some glitch is happening to open the subscreen
can anyone help me out to resolve this
i am using css pt-page-moveToLeftFade -
webkit-animation: moveToLeftFade .4s ease both;
animation: moveToLeftFade .7s ease both;