Created
April 29, 2013 23:14
-
-
Save jmoreno/5485565 to your computer and use it in GitHub Desktop.
UIStoryboardSegue for Origami
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
| // | |
| // ZNOrigamiSegue.m | |
| // mindcar | |
| // | |
| // Created by Javi on 17/04/13. | |
| // Copyright (c) 2013 Zink In Apps!. All rights reserved. | |
| // | |
| #import "ZNOrigamiSegue.h" | |
| @implementation ZNOrigamiSegue | |
| - (void)perform | |
| { | |
| UIViewController *sourceViewController = (UIViewController*)[self sourceViewController]; | |
| UIViewController *destinationController = (UIViewController*)[self destinationViewController]; | |
| [sourceViewController.view showOrigamiTransitionWith:destinationController.view | |
| NumberOfFolds:3 | |
| Duration:0.5 | |
| Direction:XYOrigamiDirectionFromLeft | |
| completion:^(BOOL finished) { | |
| NSLog(@"animation completed."); | |
| [sourceViewController presentViewController:destinationController animated:NO completion:nil]; | |
| }]; | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment