UITextFieldDelegate has a method - (BOOL)textFieldShouldClear:(UITextField *)textField which gets called when that little x icon is clicked by the user.
I couldn’t find something similar for UISearchBar or UISearchBarDelegate. Is there another way to find out if that button / icon has been clicked inside a UISearchBar?
You can use:
which according to the Reference is also called when the X is pressed to clear the field.