           let updateError = error as NSError
           print(updateError)
         }
-        self.dismissViewControllerAnimated(true, completion: nil)
         tableView.setEditing(false, animated: false)
       })
       let cancelEdit = UIAlertAction(title: "Cancel", style: .Default, handler: {
         _ in
-        self.dismissViewControllerAnimated(true, completion: nil)
         tableView.setEditing(false, animated: false)
       })
       editBox.addAction(confirmEdit)

        self.tableView.reloadData()
      }
    })
    let cancelAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Default, handler: { _ in
      self.dismissViewControllerAnimated(true, completion: nil)
    })
    enterPanel.addAction(saveAction)
    enterPanel.addAction(cancelAction)
    enterPanel.addTextFieldWithConfigurationHandler({
      textField in
      textField.placeholder = "Type something"
    })
    self.presentViewController(enterPanel, animated: true, completion:nil)
  }

  private func saveItem(memo: String) {

        } catch {
          print("Error: delete a memo")
        }
      })
      let cancelDelete = UIAlertAction(title: "No", style: .Default, handler: {
        _ in
        tableView.setEditing(false, animated: false)
      })
      confirmBox.addAction(confirmDelete)
      confirmBox.addAction(cancelDelete)
