Skip to content

Instantly share code, notes, and snippets.

@BradB132
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BradB132/b8f5b1924aae262ca31a to your computer and use it in GitHub Desktop.
Save BradB132/b8f5b1924aae262ca31a to your computer and use it in GitHub Desktop.
ViewControllerTransitionsPart3-5
@interface TTPushController ()
@property (nonatomic, strong) TTInteractivePinchTransition* transition;
@property (nonatomic, strong) UIPinchGestureRecognizer* pinch;
@end
// ...
- (void)viewDidLoad
{
[super viewDidLoad];
self.transition = [[TTInteractivePinchTransition alloc] init];
_transition.delegate = self;
_transition.sensitivity = 0.5f;
_transition.pinchFilter = PinchFilter_RecognizeOpenOnly;
self.pinch = [[UIPinchGestureRecognizer alloc] initWithTarget:_transition action:@selector(handlePinch:)];
[self.view addGestureRecognizer:_pinch];
}
#pragma mark - TTInteractivePinchTransitionDelegate
-(void)delegateShouldPerformSegue:(TTInteractivePinchTransition*)transition
pinch:(UIPinchGestureRecognizer*)pinch
{
[self performSegueWithIdentifier:@"push" sender:pinch];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment