xmartlabs / XLPagerTabStrip

Android PagerTabStrip for iOS.
MIT License
6.98k stars 1.33k forks source link

Unable to access tableview's swipe/edit feature #609

Open hamzabinamin opened 6 years ago

hamzabinamin commented 6 years ago

Is there a way to disable the horizontal scroll so that I can access the swipe feature of the table view to delete or edit an item?

If not then maybe something that can achieved by keeping the horizontal scroll enabled?

angelinec commented 6 years ago

self.containerView.isScrollEnabled = false put this line in viewDidLoad() block in your base class file

aurora14 commented 6 years ago

@angelinec this solution worked for me, however it's worth noting that this (as the code suggests) disables the ability to swipe between pages.

For the user, the effect is that they must use the tabs for navigation, rather than swipe. For the developer, they must decide what's more important - swipe-activated features on their rows, or swipe navigation between different tabs.

On larger devices, such as + models of iPhones, this may not be a trivial decision

I don't know if there's a way to have both, if that's even possible with the way iOS handles gestures. In my case I decided that having row actions was more important, because users would need a quicker action on a row item, rather than quicker navigation.

angelinec commented 6 years ago

@aurora14 yes, I'm fully aware that it disables the ability to swipe between pages. I did forgo that ability in my project because, like you, I needed the row actions more than the former :)

I don't know if there's a way to have both, if that's even possible with the way iOS handles gestures.

If there's a way to have both, I don't think it would work great, UX wise 😕 what say you?

hamzabinamin commented 6 years ago

@angelinec I have noticed that when you swipe a little (but not too much) the row actions on the tableview do work sometimes. So maybe if we can find a way to force the page swipe only when the horizontal scroll distance is larger than a certain threshold that might work for both cases. What do you think?

chienpm304 commented 3 years ago

how can disable swipe left in last page only?