Skip to content

Instantly share code, notes, and snippets.

@BradB132
Created June 10, 2015 05:15
Show Gist options
  • Save BradB132/2ef03459ac4a04503b77 to your computer and use it in GitHub Desktop.
Save BradB132/2ef03459ac4a04503b77 to your computer and use it in GitHub Desktop.
ViewControllerTransitionsPart2-6
//remove this line
//[transitionContext completeTransition:finished];
//use this code instead:
//put the original stuff back in place if the user cancelled
if(transitionContext.transitionWasCancelled)
{
[toController.view removeFromSuperview];
[container addSubview:fromController.view];
}
[transitionContext completeTransition:!transitionContext.transitionWasCancelled];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment