LongPress의 down과 up만 체크



 UILongPressGestureRecognizer *longPressGesture =

        [[UILongPressGestureRecognizer allocinitWithTarget:self

                                                action:@selector(handleLongPress:)];


          


[targetView addGestureRecognizer:longPressGesture];



.....


// Handler

- (void)handleLongPress:(UILongPressGestureRecognizer *)recognizer {

    CGPoint location = [recognizer locationInView:[recognizer.view superview]];

    

    if (recognizer.state == UIGestureRecognizerStateBegan) {

        NSLog(@" long press start ... ");

    }else if(recognizer.state == UIGestureRecognizerStateEnded){

        NSLog(@" long press ended ... ");


    }

      

}



Posted by tenn
,