Detect Focus Change for UITextField

后端 未结 4 1829
臣服心动
臣服心动 2021-02-01 02:20

I\'m trying to set the animation for the view to move up when keyboard is hiding and appearing for the text fields and I got it to work perfectly fine, but when the focus moves

4条回答
  •  不要未来只要你来
    2021-02-01 02:32

    Use UITextFieldDelegate

    and

    func textFieldDidBeginEditing(textField: UITextField) {
            println("did")
            if textField.tag == 1{
                self.txtFullName.layer.borderColor = UIColor.blueColor().CGColor
            }
        }
    

提交回复
热议问题