查找longPress发布位置[关闭]

问题描述 投票:-1回答:1

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

uigesturerecognizer cgpoint uilongpressgesturerecogni
1个回答
0
投票
if( UIGestureRecognizerStateChanged)
{
            CGPoint center = snapshot.center;
            center.y = location.y;
            snapshot.center = center;
}
if (UIGestureRecognizerStateEnded)
{
     location = [longPress locationInView:self.tableView];
}
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.