I've tried gestureRecognizerShouldBegin and it did the job. Here is my solution (zoomed it indicates if collectionView is fullscreen or not). The logic is to check if gesture start point is inside any of tableView rows ( with small gap on left/right to keep ability of collectionView scroll when pan from the sides using insetBy(dx:dy:) ), currentCell is parent UICollectionViewCell.
extension MyCollectionView: UIGestureRecognizerDelegate {
override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
guard zoomed, let currentCell = currentCell, gestureRecognizer.view is MyCollectionView else { return true }
let cellViews = currentCell.myTableView.visibleCells
let touchPoint = gestureRecognizer.location(in: currentCell.myTableView)
let cellsAtPoint = cellViews.filter {
let localPoint = $0.convert(touchPoint, from: currentCell.myTableView)
return $0.bounds.insetBy(dx: 40, dy: 0).contains(localPoint)
}
return cellsAtPoint.count == 0
}
}