This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [AnyObject]? { | |
var deleteAction:UITableViewRowAction = UITableViewRowAction(style: UITableViewRowActionStyle.Default, title: "Delete", handler: { (tvra:UITableViewRowAction!, indexPath:NSIndexPath!) -> Void in | |
self.baseArray[indexPath.section].removeAtIndex(indexPath.row) | |
tableView.reloadData() | |
}) | |
//Change background color | |
deleteAction.backgroundColor = UIColor(red: 203/255, green: 76/255, blue: 76/255, alpha: 1) | |
//Optional use image as background, remove 'title' text in declaration / Not ideal implimentation |