Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swipe right to left on tableview cell does not work if using XLPagerTabStrip #287

Open
aferrerb opened this issue Dec 16, 2016 · 6 comments

Comments

@aferrerb
Copy link

I am using XLPagerTabStrip and the latest version of Xcode.
Each tab has a tableview. I wanted to be able to swipe (standard iOS R-L swipe) on the table view items to delete, but it does not work.
I have another app where I am able to swim, so the code is OK, but that other app does not use XLPagerTabStrip, so I deduced that the issue might be that: using XLPagerTabStrip.
Would you know if I have to have further code to be able to swim items in a tableview?
Thanks!

@ThoseGuysInTown
Copy link

It's likely the XLPagerTabStrip overrides the swipe gesture the tableview uses so If you're able to find that and remove it swiping the tableview cells should work again.

Let me know if you need more help.

@aferrerb
Copy link
Author

Thank you! I am afraid I do need further help. I am not sure I fully understand what you mean when you say: "If you're able to find that and remove it" ... what is "that" and how do I remove it?

@fedeojeda95
Copy link

Hi @aferrerb

The problem with having a swipe in the UITableViewCell is that all the side to side gestures are taken by the containerView instead of the childViewController. In this case, the UITableView won't be receiving this events since the containerView receives them to know if it should go to the next tab.

This makes sense because of the conflict between the type of swipes. How could the application know if by swiping right to left in a cell it should go to the next tab or perform the swipe to delete? The user wouldn't know what would happen when swiping, too.

Hope this answer is of help! Regards,

@ThoseGuysInTown
Copy link

Note on this. Collection views in the childViewControllers work with scrolling side to side but no kind of swiping (panning works, I've used the Koloda View and it works fine) is recognized by views in the ViewControllers. A potential work around could be to use a paging collection view (maybe scrolling view, I haven't tried this option though).

Pretty frustrating though, wish there was a way to let the XLPager know which views you still want to be able to swipe on.

@ThoseGuysInTown
Copy link

Oh another note, as well as the reason I'm back here. When using a switch I'm getting a weird bug where dragging the switch "thumb" works in simulator but when it's on a phone it will just receive the swipe on the switch as a swipe on the whole view controller.

@mrezk
Copy link

mrezk commented Feb 7, 2018

You can disable horizontal scrolling by setting:

containerView.isScrollEnabled = false

in your PagerTabStripViewController.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants