2011-07-28 65 views

回答

0

您可以激活轻敲识别器,检测注册的所有触摸。

如果tableview滚动,但没有touchgestures参与,它应该覆盖它。

26

UITableView是UIScrollView的子类。 所以你可以使用这个

if (!tableView.isDragging && !tableView.isDecelerating) 
{ 
    // the table is *not* being scrolled 
} 

这个工程。我在我的一个应用程序中使用它。

+0

伟大的工作伙伴 –

4

您可以实现以下UIScrollViewDelegate的方法,来了解你的表视图的滚动:

- (void)scrollViewWillBeginDragging:(UIScrollView *)activeScrollView 

不要忘记把这个太...

@interface YourViewController : UIViewController <UIScrollViewDelegate> 

希望它帮助,欢呼:)

0

我发现的最佳方法是使用isTracking属性而不是isDragging

if tableView.isTracking && tableView.isDecelerating { 
    // Table was scrolled by user. 
} 
相关问题