How to find out when the text in the search bar changes

I have a search bar and I need to be notified when the bar text changes, how can I do this? I need to reload the table view every time the string value of the search string changes

+3
source share
1 answer

Create an IBOutlet for your search, then add the searchBar properties to your delegate.

This method should be called when the text in the search bar changes:

- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText;

Of course, you should add protocols for your viewController monitor:

    <UISearchBarDelegate, UISearchDisplayDelegate>
+6
source

All Articles