触摸屏幕时停止` - [tableView reloadData]`

时间:2015-05-14 09:56:16

标签: ios xcode uitableview

在我的应用中,有一个-[tableView reloadData]方法,可以定期调用。在加载数据时,我将userInteractionEnabled设置为NO。我希望TableView在屏幕上发生单击并重新启用UserInteraction时停止加载数据,但我希望加载的单元格不受影响且-cellDidSelectRowAtIndexPath保持不变。我怎么能这样做?

1 个答案:

答案 0 :(得分:0)

- (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView  // called on finger up as we are moving
{
//Stop ur periodic method Or stop timer if u have set
}
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView     // called when scroll view grinds to a halt{

//Re-start ur periodic method 
 }

实现ur tableview scrollview委托方法

相关问题