1.self.userNameField.delegate = self
2.extension LoginViewController:UITextFieldDelegate
{
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
textField.resignFirstResponder()
return true
}
}
3.self.view.endEditing(true)
4.self.tableView.deselectRow(at: indexPath, animated: true)
5.距离左右10像素
tableView.separatorInset = UIEdgeInsetsMake(0,10, 0, 10)