Add a possibility to disable/enable swipe actions of the cell #275
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have a business logic in the app where I should enable/disable swipe actions for one particular cell.
Initially I implement it by adding and removing buttons to the cell itself. But there was one issue with this solution. When user make pan gesture on the scroll view of the cell without buttons it changes content offset of a scrollview on every deceleration event and user see nothing. If table reload all cells in time when cell still have decelerating scroll view and still receiving deceleration events and such cell received some new buttons then correction logic implemented in deceleration event delegate method not work any more. Scroll view changes it's offset on next deceleration event and user see "randomly" cell that swiping by itself.
I think that it could always good to have a switch to enable/disable swipe actions without a side effects.