iOS 多个UIScollerView嵌套导致手势冲突解决方法

2018-04-16  本文已影响44人  ShanJiJi

遇到scollerView多个嵌套导致滑动时手势冲突的问题,写一个继承UIScollerView的类并且在.m中实现手势识别多个手势方法:

/**
同时识别多个手势

@param gestureRecognizer gestureRecognizer description
@param otherGestureRecognizer otherGestureRecognizer description
@return return value description
*/
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
   return YES;
}

上一篇下一篇

猜你喜欢

热点阅读