Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8202119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:03:40+00:00 2026-06-07T07:03:40+00:00

I have, in my main tableView, some custom cells (cells with an imageView, basically).

  • 0

I have, in my main tableView, some custom cells (cells with an imageView, basically).

The imageView is set only if a value on my plist is false. Then, when it’s true, the imageView is nil.

Basically when the user enters the detailView, the value is set to YES and the cell.imageView is nil.

And it’s okay, it works

I’m using a searchDisplayController, when i search for something that has a cell.imageView, going into the detailView and then coming back to the searchResultsTable, the cell has still the image, while it shouldn’t, but the main tableView has the correct cell (so, with no image).

I thought that it could depend on searchResultsTableView, but i’m not sure.
I tried with

[self.searchDisplayController.searchResultsTableView reloadData]; 

with no effect.

How could i reload the searchResultsTableView so that it shows the right cells, those with the image and those that don’t have the image anymore?

Any help appreciated!

EDIT

This is my cellForRowAtIndexPath method:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{
    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    }


    NSArray *rows;
    if (tableView == self.searchDisplayController.searchResultsTableView) {
        rows = filteredList; //for search
    } else {
        NSDictionary *section = [localSortedTips objectAtIndex:indexPath.section];
        rows = [section objectForKey:@"Rows"];
    }

    NSDictionary *item = [rows objectAtIndex:indexPath.row];
    cell.textLabel.text = [item objectForKey:@"name"];  
    if ([[item valueForKey:@"isRead"] boolValue] == NO) {
        cell.imageView.image = [UIImage imageNamed:@"unread.png"];
    } else {
        cell.imageView.image = nil;
    }
    cell.textLabel.font = [UIFont boldSystemFontOfSize:15.0];
    cell.textLabel.adjustsFontSizeToFitWidth = YES;

    return cell;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:03:44+00:00Added an answer on June 7, 2026 at 7:03 am

    If I understood you right, then you can have a workaround but searching again with the same search string:

    if (self.searchDisplayController.active) {
        self.searchDisplayController.searchBar.text = self.searchDisplayController.searchBar.text;
    }
    

    put it in viewWillAppear: or viewDidAppear: which will be called each time the view is shown up (eg. you go back from the detail view to your search view). And reloading the data in this place would be nice too, to get the right data (for example if you marked the cell as read like in your sample code)

    Just [self.tableView reloadData]; and not the searchResultsTableView (it will be automatically use the updated data after the new search)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have one tableview that have custom cells and one cell contains uiimageview,uilabels .
I have a custom tableview cell, which contains some object UIImageView, UILabel, and a
I have a main-section div that is set to inherit it's height from its'
I have created a custom queue where I am doing some processing and thereby
So I have a Titanium.UI.tableview in my main window in my tab group which
Well I have a view of this type of hierarchy Main View (having some
I have a generic question about tableview Draw and reload data, and wanted some
I have a main tabBarController with some tabs as main controller and each tab
I have 2 tableViews, the first one is the Main table and the second
I have main window which has inner grid components. When I press a button

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.