长按手势点击方法

2017-05-08  本文已影响0人  小小淡定

- (void)longAction:(UILongPressGestureRecognizer*)longRecognizer{

  if (longRecognizer.state == UIGestureRecognizerStateBegan)

       //成为第一响应者,需要重写改方法

         [self becomeFirstResponder];

        CGPoint location = [longRecognizer locationInView:self];

        NSIndexPath *indexPath = [self indexPathForRowAtPoint:location];

}

上一篇下一篇

猜你喜欢

热点阅读