         backGroundImageView.addConstraint(passwordIconimageV_width)
         
         //用户名输入textfield
-        let usernameTextField = UITextField()
+        usernameTextField = UITextField()
         usernameTextField.placeholder = "请输入用户名"
         //        usernameTextField.backgroundColor = UIColor.green
         usernameTextField.translatesAutoresizingMaskIntoConstraints = false
+        usernameTextField.clearButtonMode = .whileEditing
         userNameBGView.addSubview(usernameTextField)
         let usernameTextField_leading = NSLayoutConstraint(item: usernameTextField, attribute: .leading, relatedBy: .equal, toItem: userNameIconimageV, attribute: .trailing, multiplier: 1.0, constant: 5)
         userNameBGView.addConstraint(usernameTextField_leading)


import UIKit

class ViewController: UIViewController {

    var checkImageView : UIImageView!
    
    
    override func viewDidLoad() {

        arrowBtn.addTarget(self, action: #selector(ViewController.arrowBtnClicked), for: UIControlEvents.touchUpInside)
        
        //密码输入textfield
        passwordTextField = UITextField()
        passwordTextField.placeholder = "请输入密码"
        //        passwordTextField.backgroundColor = UIColor.green
        passwordTextField.translatesAutoresizingMaskIntoConstraints = false
