/ Published in: Objective C
Cascade to 4 mode: Expand horizontally, Expand vertically, Shrink horizontally, Shrink vertially
Expand |
Embed | Plain Text
- (void)handleMyPinchFrom:(UIPinchGestureRecognizer *)recognizer { /* Add Blocking Code here~! // if ([detailCellLayer.sublayers count]) { // return; // } */ if(recognizer.state == UIGestureRecognizerStateBegan) { originP = [recognizer locationOfTouch:0 inView:recognizer.view]; //Save original point return; } if(recognizer.state == UIGestureRecognizerStateEnded) { CGPoint point = [recognizer locationOfTouch:0 inView:recognizer.view]; NSLog(@"PINCH %f,%f -> %f,%f : scale: %f",originP.x,originP.y,point.x,point.y,recognizer.scale); if (recognizer.scale > 1) { NSLog(@"Expand Horizontal"); } NSLog(@"Expand Vertical"); } } else { //shrink NSLog(@"Shrink Horizontal"); } NSLog(@"Shrink Vertical"); } } } }
You need to login to post a comment.
