I have my application set up such that the user can swipe left or right to navigate between view controllers, similar to SnapChat. I implemented this using a
The way I implemented this feature was by subclassing
UITableViewCell and adding a UIPanGestureRecognizer to the cell, as well as an "overlay view" on top of the cell itself, which contained the buttons, background images, or whatever else needed to be on the cell.
recognizer.translationInView(self), I was able to find out exactly how much the user's touch had translated, and then adjust the origin of the overlay view accordingly, so all the user elements would appear to slide. As the overlay view translated, it would reveal a view that I had added directly to the cell itself.
After the gesture recognizer had translated beyond a certain threshold, I would manually adjust the content offset of the
UIScrollView, just like I had with the cell.