I want my table list to have a swipe-able menu like in iOS 8 (first introduced in iOS 7).
I've found a Ray Wenderlich guide that is clear on how to do it, but it was written a year and 4 months ago and the code is in Objective-C.
Did iOS 8 or the upcoming iOS 9 finally include this function in Apple's SDK? I know they made the "swipe to reveal delete function" built-in years ago. I don't want to waste my time implementing patched-together code to mimic the iOS 8 mail function, if Apple's new iOS is going to hand it to me in a neatly wrapped package.
Swift 3 complete solution:
AFAIK there is no in-built ready to go solution, and even if there was in iOS9, you probably cannot use it since you can't only support iOS9 in your app for foreseeable future.
Instead, I recommend you look into this library:
https://github.com/CEWendel/SWTableViewCell
It is very easily configurable, quite polished, and worked well in any swift project that I worked on.
Hope it helps!
It is easier than you think. Here is an example of a Swift class with an implemented UITableView and the ability to swipe UITableViewCell.
Try this. (Updated for Swift 3.0) (Developer Docs)
Also implement this: (You can make it conditional, but here everything is editable)
(Older Version)
This code is work for me in the swift4.
You can use a UITableView delegate method to ask for those actions. Implement this method as follows:
You can of course return multiple actions and customize the text and background color.
Implementing this method is also required to make the row editable: