How do I check when a UITextField changes?

后端 未结 19 2984
情话喂你
情话喂你 2020-11-22 15:44

I am trying to check when a text field changes, equivalent too the function used for textView - textViewDidChange so far I have done this:

  fu         


        
19条回答
  •  遇见更好的自我
    2020-11-22 16:37

    Swift 3

     textField.addTarget(self, action: #selector(ViewController.textFieldDidChange(sender:)), for: UIControlEvents.editingChanged)
    

提交回复
热议问题