Well, you would like to create a subclass of UIStoryBoardSegue, as shown in the walkthrough, however, in the .m file (implementation) of the Storyboard class you will need the following code, as your - (void) execute: method -
-(void)perform{ UIViewController *sourceViewController = (UIViewController *) self.sourceViewController; UIViewController *destinationViewController = (UIViewController *) self.destinationViewController; [sourceViewController.view addSubview:destinationViewController.view]; [destinationViewController.view setFrame:sourceViewController.view.window.frame]; [destinationViewController.view setTransform:CGAffineTransformMakeTranslation(0, -sourceViewController.view.frame.size.height)]; [destinationViewController.view setAlpha:1.0]; [UIView animateWithDuration:0.75 delay:0.0 options:UIViewAnimationOptionTransitionFlipFromTop animations:^{ [destinationViewController.view setTransform:CGAffineTransformMakeTranslation(0, 0)]; [destinationViewController.view setAlpha:1.0]; } completion:^(BOOL finished){ [destinationViewController.view removeFromSuperview]; [sourceViewController presentViewController:destinationViewController animated:NO completion:nil]; }];}
Hope this helps.
dmason82
source share