uisearchdisplaycontroller
Displaying search bar in navigation bar in iOS 8
According to Apple : UISearchDisplayController is deprecated in iOS 8. (Note that UISearchDisplayDelegate is also deprecated.) To manage the presentation of a search bar and display search results in iOS 8 and later, instead use UISearchController. The UISearchController class defines an interface that manages the presentation of a search bar in concert with the search … Read more
Installed App from TestFlight crashes due to alleged UISearchDisplayController
After receiving the same error and finding no references to UISearchDisplayController across our app, we realized we needed to search for and replace searchDisplayController from within one of our storyboards. That corrected the issue after resubmitting a beta to TestFlight.
iOS 7 UISearchDisplayController search bar overlaps status bar while searching
Putting the following line in the viewDidLoad fixed it for me: self.edgesForExtendedLayout = UIRectEdgeNone;
Prevent a UISearchDisplayController from hiding the navigation bar
I just debugged a bit into UISearchDisplayController and found that it’s calling a private method on UINavigationController to hide the navigation bar. This happens in -setActive:animated:. If you subclass UISearchDisplayController and overwrite this method with the following code you can prevent the navigationBar from being hidden by faking it to be already hidden. – (void)setActive:(BOOL)visible … Read more
How to change background color of UISearchBar in iOS7
Need to use: searchBar.barTintColor = [UIColor redColor]; All thanks!
Assertion failure when using UISearchDisplayController in UITableViewController
Try using self.tableView instead of tableView in dequeueReusableCellWithIdentifier: – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:@”BreedCell”]; //Create PetBreed Object and return corresponding breed from corresponding array PetBreed *petBreed = nil; if(tableView == self.searchDisplayController.searchResultsTableView) petBreed = [_filteredBreedsArray objectAtIndex:indexPath.row]; else petBreed = [_breedsArray objectAtIndex:indexPath.row]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; cell.textLabel.text = petBreed.name; return cell; } This … Read more
How to filter NSFetchedResultsController (CoreData) with UISearchDisplayController/UISearchBar
I actually just implemented this on one of my projects (your question and the other wrong answer hinted at what to do). I tried Sergio’s answer but had exception issues when actually running on a device. Yes you create two fetch results controllers: one for the normal display and another one for the UISearchBar’s table … Read more