         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
 

        self.tableView.endUpdates()
    }


    // MARK: - Navigation Item

    func editButtonDidPress() {
        let editing = self.tableView.editing
        if editing {
            self.navigationItem.leftBarButtonItem = self.editButton
        } else {
            self.navigationItem.leftBarButtonItem = self.doneButton
        }
        self.tableView.setEditing(!editing, animated: true)
    }

    func addButtonDidPress() {

        Card.sort(&self.cards)
        Card.save(self.cards)
        self.tableView.reloadData()
        self.updateEditButtonHidden()
    }

    func cardDidDelete(notification: NSNotification) {
