Last active
January 4, 2016 19:09
-
-
Save i386/8665421 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//Setup transition on both _visibleLayer and newLayer | |
CATransition* transition = [CATransition animation]; | |
transition.startProgress = 0; | |
transition.endProgress = 1.0; | |
transition.type = kCATransitionPush; | |
transition.subtype = kCATransitionFromRight; | |
transition.duration = 0.5; | |
[layer addAnimation:transition forKey:@"sublayers"]; | |
//Swap layers | |
[self.layer replaceSublayer:_visibleLayer with:newLayer]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment