I have a search bar added in the user interface. The Searchbar is already set, and works, but I can't figure out how to make it search content in the UITableView. Can I just remove the items that do not start with the characters typed in the search bar??
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
if (searchBar.text.length < 1) {
return;
}
else {
// Do search stuff here
}}
This code works, the else function is called. But I don't know how to do it. I don't want to create a whole new array just for that.