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

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

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)