Skip to content

Instantly share code, notes, and snippets.

@jmoreno
Created April 29, 2013 23:14
Show Gist options
  • Select an option

  • Save jmoreno/5485565 to your computer and use it in GitHub Desktop.

Select an option

Save jmoreno/5485565 to your computer and use it in GitHub Desktop.
UIStoryboardSegue for Origami
//
// 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