问题描述:UITableView添加手势后,经过一次滚动不能再次滚动
解决办法:将添加的手势delegate设置为self,并在self中实现协议<UIGestureRecognizerDelegate>如下:
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{
return YES;
}
该方法官方说明:
Asks the delegate if two gesture recognizers should be allowed to recognize gestures simultaneously.
询问委托如果有两个手势,是否允许一起识别。