Ios 如何检测哪个UITableView正在滚动
Im检测到Ios 如何检测哪个UITableView正在滚动,ios,uitableview,scroll,Ios,Uitableview,Scroll,Im检测到UITableView以这种方式滚动 ` } } ` 但是我必须加载几个UITableViews在这种检测下,我必须分别重新加载每个表。因此,我如何检测当前正在滚动的表 谢谢您认为所有这些方法中的scrollView参数用于什么?表格视图是一个滚动视图,如下所述: 因此,您只需检查在每个委托方法中传递的滚动视图是否为所需的表视图,例如: - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:
UITableView
以这种方式滚动
`
}
}
`
但是我必须加载几个UITableViews
在这种检测下,我必须分别重新加载每个表。因此,我如何检测当前正在滚动的表
谢谢您认为所有这些方法中的
scrollView
参数用于什么?表格视图是一个滚动视图,如下所述:
因此,您只需检查在每个委托方法中传递的滚动视图是否为所需的表视图,例如:
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{
if (scrollView == tblSongs) {
isDragging_msg = FALSE;
[tblSongs reloadData];
}
}
您可以检测每个表上的事件 要在UITableView上接收触摸事件,请使用:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
//<your stuff>
[super touchesBegan:touches withEvent:event];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
//<your stuff>
[super touchesMoved:touches withEvent:event];
}
- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event
{
//<your stuff>
[super touchesEnded:touches withEvent:event];
}
- (void)touchesCancelled:(NSSet*)touches withEvent:(UIEvent*)event
{
//<your stuff>
[super touchesCancelled:touches withEvent:event];
}
-(void)touchesbeated:(NSSet*)toucheevent:(UIEvent*)event
{
//
[超级触摸开始:触摸事件:事件];
}
-(无效)触摸移动:(NSSet*)触摸事件:(UIEvent*)事件
{
//
[超级触摸移动:触摸事件:事件];
}
-(void)touchesend:(NSSet*)toucheevent:(UIEvent*)event
{
//
[超级触控:触控事件:事件];
}
-(无效)触控取消:(NSSet*)触控事件:(UIEvent*)事件
{
//
[超级触控取消:触控事件:事件];
}
并且可以重新加载任何特定的tableview。谢谢我可以只为表格的滚动视图添加一些标签吗?或者滚动视图可以获得与UITableView相同的标签号
- (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView{
isDecliring_msg = TRUE; }
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate{
if (scrollView == tblSongs) {
isDragging_msg = FALSE;
[tblSongs reloadData];
}
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
//<your stuff>
[super touchesBegan:touches withEvent:event];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
//<your stuff>
[super touchesMoved:touches withEvent:event];
}
- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event
{
//<your stuff>
[super touchesEnded:touches withEvent:event];
}
- (void)touchesCancelled:(NSSet*)touches withEvent:(UIEvent*)event
{
//<your stuff>
[super touchesCancelled:touches withEvent:event];
}