How do I check when a UITextField changes?

后端 未结 19 3237
情话喂你
情话喂你 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条回答
  •  猫巷女王i
    2020-11-22 16:24

    You can make this connection in interface builder.

    1. In your storyboard, click the assistant editor at the top of the screen (two circles in the middle).

    2. Ctrl + Click on the textfield in interface builder.

    3. Drag from EditingChanged to inside your view controller class in the assistant view.

    4. Name your function ("textDidChange" for example) and click connect.

提交回复
热议问题