I would like to have a separator between my two UITableViewRowActions
. Here is an example of what I would like for my app to look like (this is from Fitbit's app):
Here is what mine looks like:
Here is my code for the actions:
override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
return true
}
override func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
let delete = UITableViewRowAction(style: .Default, title: "Delete") { (action, indexPath) in
//Code for deleting
}
let edit = UITableViewRowAction(style: .Default, title: "Edit") { (action, indexPath) in
//Code for editing
}
edit.backgroundColor = UIColor(red: 0, green: 128/225, blue: 128/225, alpha: 1)
return [delete, edit]
}
How can I achieve this separator? Thank you for your help.