- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText // called when text changes (including clear) { if (searchBar.text.length > IMPUT_MAX){ searchBar.text = [searchBar.text substringToIndex:15]; } }