             }
         })
     }
+
+    override func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [AnyObject]? {
+        let edit = UITableViewRowAction(style: .Default, title: "Edit title") {
+            (action, indexPath) in
+            self.editPlaylist(indexPath.item)
+        }
+        edit.backgroundColor = ColorHelper.greenColor
+        let remove = UITableViewRowAction(style: .Default, title: "Remove") {
+            (action, indexPath) in
+            self.playlists[indexPath.item].remove()
+        }
+        remove.backgroundColor = ColorHelper.redColor
+        return [edit, remove]
+    }
+
+    override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
+        return true
+    }
 }

                                          style: UIBarButtonItemStyle.Plain,
                                         target: self,
                                         action: "close")
        let appDelegate = UIApplication.sharedApplication().delegate as AppDelegate
        navigationItem.leftBarButtonItems = [closeButton]
    }

    var playlists: [Playlist] = []
    var callback: ((Playlist?) -> Void)?

    var appDelegate: AppDelegate { get { return UIApplication.sharedApplication().delegate as AppDelegate }}

    override func viewDidLoad() {
        super.viewDidLoad()
        clearsSelectionOnViewWillAppear = true
        let nib = UINib(nibName: "SelectPlaylistTableViewCell", bundle: nil)
        tableView?.registerNib(nib, forCellReuseIdentifier:self.tableCellReuseIdentifier)
        observePlaylists()
    }

    override func viewWillAppear(animated: Bool) {
