Search result of UISearchDisplayController has other cell layout and behaviour than searched table

I am using storyboarding. I have an UITableView with one prototype cell. This cell is of style "subtitle". I have added a segue from the cell to the detailed view. So when the user taps a cell it will open the corresponding editor... That all works great.

Now I added a UISearchDisplayController an a UISearchBar, implemented the delegates. That works very well.

But in the search result table the cells are of style "default" and are not tapable. What do I have to do to get a result table looking and behaving like the "unsearched" table?


I would like to contribute for answer #1 this is what I did and it worked for me

in the method

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

instead of assigning the cell from the parameter tableView

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

assign it directly from the TableView on the view so you have to replace this

// UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

with this

 UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];

Need Your Help

Passing special characters to mailto body blows up JavaScript

javascript jquery html mailto

I have a C# ASP.NET app that creates a JavaScript array of values for some user profile information. Client-side, I use jQuery/JavaScript to read the array and generate a mailto link. Some of the f...

Responsive show/hide menu malfunctioning

javascript jquery html css sidebar

In a new design I've been working on, there is a sidebar, which is meaning to be shown fully while browsing using desktop. On mobile, the menu is meant to be collapsed into a button, which, when cl...