How can I get a textDidChange (like for a UISearchBar) method for a UITextField?

后端 未结 7 801
不知归路
不知归路 2020-12-17 15:23

How can I get a textDidChange method for a UITextField? I need to call a method every time a change is made to a text field. Is this possible? Thanks!

相关标签:
7条回答
  • 2020-12-17 16:06

    You can setup a delegate and use

    - (BOOL) textField: (UITextField *) textField shouldChangeCharactersInRange: (NSRange) range replacementString: (NSString *) string;
    
    0 讨论(0)
提交回复
热议问题