     }
     //登录按钮的点击事件
     func loginBtnClicked() {
-        
+        if (usernameTextField.text?.isEmpty)!||usernameTextField.text==nil {
+            print("请输入用户名")
+        }else if (passwordTextField.text?.isEmpty)!||passwordTextField.text == nil{
+            print("请输入密码")
+        }else{
+            loginAndRemeberUsers()
+        }
+    }
+    
+    //进行登陆操作和记住密码
+    func loginAndRemeberUsers() {
+        if !checkImageView.isHidden {
+            //需要记住密码
+            usernamePasswordDict = NSMutableDictionary(capacity: 10)
+            usernamePasswordDict.setValue(passwordTextField.text, forKey: usernameTextField.text!)
+        }
+
     }
     //用户名下拉箭头按钮的点击事件
     func arrowBtnClicked() {
-        
-    }
+        if usernamePasswordDict.count>0 {
+            //让用户名的tableview显示出来
+            
+        }
+           }
     
     override func didReceiveMemoryWarning() {
         super.didReceiveMemoryWarning()

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

        backGroundImageView.addConstraint(passwordIconimageV_width)
        
        //用户名输入textfield
        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)
