Built-in UITableView does not detect scroll to remove row gesture

I have a UITableView embedded inside a UICollectionView, the collection view scrolls horizontally, so if I try to "swipe to delete" in one of the rows of the table inside the collection view cell, it obviously just scrolls the View collection. I wonder if there is work around so that it can detect napkins on the uitableview side of the collection cell, instead of scrolling through the uicollection view? A UITableView takes up about a quarter of the collection view cell. I am using UIViewController. And I also have paging enabled in my collection view.

+6
source share
3 answers

You can use it as a workaround by applying the hit test as described here to make sure that the UICollectionView does not receive gesture events when scrolling inside the cell frame

but IMHO you should not try to break the default behavior and you should search to change your interface ...

+1
source

Try one of two options:

, / (: gestureRecognizers, PanGestureRecognizers)


.

+1

UISwipeGestureRecognizer , (gestureRecognizer.state == UIGestureRecognizerStateEnded) .

-1
source

All Articles