UITextFieldDelegate 有一个方法 - (BOOL)textFieldShouldClear:(UITextField *)textField
当用户点击那个小的 x
图标时会调用它。
我找不到与 UISearchBar
或 UISearchBarDelegate
类似的东西。是否有另一种方法可以确定是否已在 UISearchBar
中单击该按钮/图标?
最佳答案
关于ios - UISearchBarDelegate 和 textFieldShouldClear 替代方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12011986/