UITextFieldDelegate vs UITextField control events

后端 未结 5 815
隐瞒了意图╮
隐瞒了意图╮ 2021-02-14 08:17

If I want to handle changes to a UITextField, such as the user typing in it; it seems like this can be done either by assigning a delegate to that text field, and then having th

5条回答
  •  春和景丽
    2021-02-14 08:51

    The delegation approach is the way to homogenize UITextField and UITextView behavior.

    UITextView does not have control events. In contrast, UITextFieldDelegate and UITextviewDelegate provide parallel methods.

提交回复
热议问题