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

  • Home
  • SEARCH
  • 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 6390845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:35:53+00:00 2026-05-25T03:35:53+00:00

Only the bottom cell of my UITableView is being edited when i change the

  • 0

Only the bottom cell of my UITableView is being edited when i change the backgroundView. I want the same background for each cell. But top 3 are white and last one is the image. I dont know why this is. Here is my code under the tableView cellForRowAtIndexPath:

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyIdentifier"];

if (cell == nil) {
    cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"MyIdentifier"];

}

[cell setBackgroundView:backgroundImage];
[cell.detailTextLabel setFont:[UIFont boldSystemFontOfSize:15]];
[cell.detailTextLabel setTextColor:[UIColor blackColor]];

[cell.textLabel setFont:[UIFont systemFontOfSize:10]];
[cell.textLabel setTextColor:[UIColor darkGrayColor]];

cell.detailTextLabel.text = [packArray objectAtIndex:[indexPath row]];
cell.textLabel.text = @"Soleternity Productions";
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.textLabel.shadowColor = [UIColor grayColor];
cell.detailTextLabel.shadowColor = [UIColor grayColor];
cell.textLabel.backgroundColor = [UIColor clearColor];
cell.detailTextLabel.backgroundColor = [UIColor clearColor];

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-05-25T03:35:54+00:00Added an answer on May 25, 2026 at 3:35 am

    The concept is simple. If you add a view X as a subView of another view A, then A will contain the view X. Later, if you add the same view X to some other view B, then X will be first removed from A and added to B. That is what happening here.

    Here , you are having a view backgroundImage and assigning it as the backgroundView of all the cells. So, obviously the lastly assigned cell will contain the backgroundImage.

    You have to create new views in cellForRowAtIndexPath: method and assign it to the current cell.

    UIImageView *backgroundImage = ...
    // Configure backgroundImage
    [cell setBackgroundView:backgroundImage];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Change the cell border width and also make the cell border only all,left ,right,top,bottom
I want to change only bottom border style. Is it possible? I know this
I've set each cell of UITableView with a gradient background, however, the gradients are
i need to paint only background of DataGridView cell not its Content.But while i'm
I have no idea why but only the bottom div works the code is:
Currently SWT's TabFolder supports only the TOP and BOTTOM styles, ie. it will only
I am populating a UITableViewController's UITableView through code only. At the bottom of the
I want to add a subview to the bottom of my UITableView and in
Essentially I would like to apply a bottom-border , but rather than being in
My UITextView has only 1 line of text. But the bottom half of the

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.