Why does UITextField lock up when setting itself to delegate

前端 未结 3 942
刺人心
刺人心 2021-01-16 02:46

I have a class that extends UITextfield. I also have the same class set to be it\'s own delegate so when the text field is selected I can change the background color. Once I

3条回答
  •  日久生厌
    2021-01-16 03:07

    Subscribe to UITextFieldTextDidBeginEditingNotification or UITextFieldTextDidEndEditingNotification NSNotifications. In callbacks check if notification object is self. Then perform some action on it.

提交回复
热议问题