UITextField text change event

后端 未结 21 1016
南方客
南方客 2020-11-22 06:49

How can I detect any text changes in a textField? The delegate method shouldChangeCharactersInRange works for something, but it did not fulfill my need exactly.

21条回答
  •  长情又很酷
    2020-11-22 07:21

    XenElement's answer is spot on.

    The above can be done in interface builder too by right-clicking on the UITextField and dragging the "Editing Changed" send event to your subclass unit.

    UITextField Change Event

提交回复
热议问题