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 8103011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:23:55+00:00 2026-06-05T23:23:55+00:00

I have a UITableView which contains names in each row alongwith images for each

  • 0

I have a UITableView which contains names in each row alongwith images for each name. When on searching the particular name gets searched, the images are not searched for the same UITableViewCell. The image of the first row or the cell remains the same. How can I search for the images also?

I have uploaded the Images of the search issue.

[1]: https://i.stack.imgur.com/QcvtU.png“TableView “

[2]: https://i.stack.imgur.com/RmsIv.png“Search In Tableview “

- (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 ];
} 
if(temp==1)
{
    cell.textLabel.text = [newarray objectAtIndex:indexPath.row];
    //cell.textLabel.text = [newarray2 objectAtIndex:indexPath.row];
}
else
{     
    cell.textLabel.text= [array objectAtIndex:indexPath.row];
    cell.imageView.image = [UIImage imageNamed:[imagearray objectAtIndex:indexPath.row]];
}
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
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-05T23:23:57+00:00Added an answer on June 5, 2026 at 11:23 pm

    you have newarray mutable for the name items, you must create a newarrayimages too.
    So alloc and init newarrayimages like newarray and add:

    if(temp==1)
    {
        cell.textLabel.text = [newarray objectAtIndex:indexPath.row];
    
        //line to add
        cell.imageView.image = [UIImage imageNamed:[newarrayimages objectAtIndex:indexPath.row]];
    
    }
    

    try this and let me know.
    by

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

Sidebar

Related Questions

I have a UITableView , which when I select a row, I want to
I have UITableView which contains cells. what I would like to do once user
I have a UITableView which contains x amount of cells. However, I want to
Short Explanation Currently I have a UITableView which contains cells of videos from a
I have a custom plist file which contains dictionaries. Each dictionary contains information about
I have a UITableView in a UINavigationController that contains a rightBarButtonItem which should hide
I have a UIViewController named RootViewController which contains a UITableView and a UITabBar (2
another weird problem with the iPhone SDK here. I have a UITableView which contains
I have a UI which contains a UITableView and a UIDatePicker. When I select
I have a UITableViewController which contains a UITableView. I try to control the UITableViewController's

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.