Created
November 12, 2014 14:42
-
-
Save spotlessicode/f815f2556db753c87571 to your computer and use it in GitHub Desktop.
This file contains 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
//in MyCustomUnwindSegue.m | |
// 1. beloveSubview | |
[window insertSubview:destinationView belowSubview:sourceView]; | |
// instead of aboveSubview | |
[window insertSubview:destinationView aboveSubview:sourceView]; | |
//2. dismiss view | |
[[self destinationViewController] dismissViewControllerAnimated:NO completion:nil]; | |
// instead of present | |
[[self sourceViewController] presentViewController:[self destinationViewController] animated:NO completion:nil]; | |
//3. y cordinate change | |
// MyCustomSegue.m animated from: | |
destinationView.center = CGPointMake(sourceView.center.x, sourceView.center.y - destinationView.center.y); | |
// to: | |
destinationView.center = CGPointMake(sourceView.center.x, sourceView.center.y); | |
sourceView.center = CGPointMake(sourceView.center.x, 0 + 2*destinationView.center.y); | |
// MyCustomUnwindSegue.m animated from: | |
destinationView.center = CGPointMake(sourceView.center.x, sourceView.center.y + destinationView.center.y); | |
// to: | |
destinationView.center = CGPointMake(sourceView.center.x, sourceView.center.y); | |
sourceView.center = CGPointMake(sourceView.center.x, 0 - 2*destinationView.center.y); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment