         Card.sort(&self.cards)
         Card.save(self.cards)
         self.tableView.reloadData()
+        self.updateEditButtonHidden()
     }
 
     func cardDidDelete(notification: NSNotification) {

        } else {
            let editorView = CardEditorViewController(card: card)
            let navigationController = UINavigationController(rootViewController: editorView)
            self.presentViewController(navigationController, animated: true, completion: self.editButtonDidPress)
        }
    }


        NSNotificationCenter.defaultCenter().removeObserver(self)
    }

    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
        self.updateEditButtonHidden()
        if self.tableView.editing {
            self.setTableViewEditing(false, animated: false)
        }
    }


    // MARK: - UITableView

