It's a public API to a point in iOS8, as explained in answers here Swipe to Delete and the "More" button (like in Mail app on iOS 7)
There are also several implementations already on Github, such as this one by MortimerGoro (part of the answer above).
If you want to do it yourself, you can use a custom UISCrollView or add subviews to your cell's contentView
. Add gesture recognizers as appropriate to handle different swipe directions.
Essentially you reposition the button subviews with negative values as the gesture progresses, which gives the appearance of uncovering static buttons. In reality, everything is moving, just in opposite directions.
Ray Wenderlich.com has a very in-depth tutorial for how to recreate the effect.
It's also a right-sided button approach, but the concepts are identical - just swap the direction of the swipe gesture & where you place the button subviews.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…