         lastNameTextField.text = ""
         nicknameTextField.text = ""
         emailTextField.text = ""
-        view.firstResponder()?.resignFirstResponder()
+        view.endEditing(true)
 
         refreshUsersArray()
         dbStateTableView.reloadData()

            }
        }
        
        cell.onClick { [weak self] (tapGestureRecognizer) in
            self?.tableView(tableView, didTapOnRowAtIndex: index)
        }
        cell.onLongPress({ [weak self] (longPressGestureRecognizer) in
            self?.tableView(tableView, didLongTapOnRowAtIndex: index)
        })


        userDefaultsTextField.text = NSUserDefaults.standardUserDefaults().objectForKey(UserDefaultsKey) as? String
        self.view.onClick {_ in 
            self.view.endEditing(true)
        }

        dbStateTableView.layer.cornerRadius = 5
