这个现象在高亮状态时最为明显 连续触碰button 高亮状态会不显示。 处理方案是关掉scrollView的延迟
代码:
在创建tableView的地方加下面这行
_tableView.delaysContentTouches =NO;
在tableView代理方法 cellForRow 里加入下面代码
for (UIView *currentView in cell.subviews)
{
if([currentViewisKindOfClass:[UIScrollViewclass]])
{
((UIScrollView *)currentView).delaysContentTouches = false;
break;
}
}
这段代码解决的条件是iOS7。 如果是iOS8环境下代码为
for (UIView *currentView in _tableView.subviews)
{
if([currentViewisKindOfClass:[UIScrollViewclass]])
{
((UIScrollView *)currentView).delaysContentTouches = false;
break;
}
}