I\'ve encountered a problem the same as UIScrollview enable delete row by swipe
It is a tableView and another view work as subViews of a scrollView , and I can\'t enab
I know this thread is old, but here is the swift 4 version, working in iOS 11 for me (You would subclass UIScrollView):
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRequireFailureOf otherGestureRecognizer: UIGestureRecognizer) -> Bool {
if (otherGestureRecognizer.view != nil && otherGestureRecognizer.view!.superview != nil) {
return otherGestureRecognizer.view!.superview!.isKind(of: UITableView.self)
}
return false
}
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
if (gestureRecognizer.state != .possible) {
return true
}
return false
}