/// 解决UIScrollView拖动手势和其他手势冲突问题
extension UIScrollView: UIGestureRecognizerDelegate {
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
if (gestureRecognizer.state != UIGestureRecognizer.State.possible) {
return true
}
return false
}
}
参考文章: https://blog.csdn.net/average17/article/details/79182587
网友评论