我们如何才能获得用户完成向右滑动或向左滑动操作所花费的时间? 已经谷歌但没有运气。 如果没有内置解决方案,将触摸开始和触摸结束一起工作?
How can we get the time a user spent to finish a swipe right or swipe left action? Already googled but no luck. If there is not built-in solution already, will touch begin and touch end together work?
最满意答案
测量开始和结束时间,并计算在gestureRecognizer.state == UIGestureRecognizerStateBegan和gestureRecognizer.state == UIGestureRecognizerStateEnded的UIGestureRecognizer回调方法中的gestureRecognizer.state == UIGestureRecognizerStateBegan
Measure the start and end time, and calculate the difference in the UIGestureRecognizer callback method for gestureRecognizer.state == UIGestureRecognizerStateBegan and gestureRecognizer.state == UIGestureRecognizerStateEnded
更多推荐
发布评论