查找longPress发布位置

时间:2016-02-23 07:51:15

标签: uigesturerecognizer cgpoint uilongpressgesturerecogni

我在控制中使用LongPress并在视图中拖动不同的位置。我使用UIGestureRecognizerStateBegan找到了起始位置。我如何找到UIGestureRecognizerStateChanged位置?

1 个答案:

答案 0 :(得分:0)

if( UIGestureRecognizerStateChanged)
{
            CGPoint center = snapshot.center;
            center.y = location.y;
            snapshot.center = center;
}
if (UIGestureRecognizerStateEnded)
{
     location = [longPress locationInView:self.tableView];
}