Created
June 19, 2013 01:06
-
-
Save wagyu298/5810926 to your computer and use it in GitHub Desktop.
UISwipeGestureRecognizer event handler from iPhone Flat Design UI http://www.appdesignvault.com/iphone-flat-ui-design-patterns/.
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
- (void)swipedScreen:(UISwipeGestureRecognizer*)gesture { | |
UIView* view = gesture.view; | |
CATransition *transition = [CATransition animation]; | |
transition.duration = 0.75; | |
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; | |
transition.type = kCATransitionPush; | |
transition.subtype =kCATransitionFromLeft; | |
transition.delegate = self; | |
[self.view.layer addAnimation:transition forKey:nil]; | |
[view removeFromSuperview]; | |
[view removeGestureRecognizer:self.swipeGesture]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment