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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:48:18+00:00 2026-06-02T11:48:18+00:00

I am loading a cell from a xib directly using code below but the

  • 0

I am loading a cell from a xib directly using code below but the problem is background color of the cell is not showing even i had set in xib and i am also setting it through code. Can any guide me about the problem.

I want to know why it is not showing the background color set in xib

    static NSString *cellIdentifier = @"GameCell123";

UITableViewCell *cell = [tableViewTemp dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) 
{
    NSArray *array=[[NSBundle mainBundle] loadNibNamed:@"GameCell" owner:self options:nil];
    if (array !=nil && [array count]>0) 
    {
        cell=[array objectAtIndex:0];
    }
    [cell setAccessoryView:[cell viewWithTag:3]];
    [(UIButton *)[cell viewWithTag:assessoryButtonCellSubviewTag] addTarget:self action:@selector(teamsAccessoryButtonTap:event:) forControlEvents:UIControlEventTouchUpInside];

    cell.backgroundColor=[UIColor blueColor];
    //cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier] autorelease];
    // seting teams button as accessory view; 
}
  • 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-02T11:48:19+00:00Added an answer on June 2, 2026 at 11:48 am

    As graver indicated, change the background color in the willDisplayCell delegate method:

    - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
    {
        cell.backgroundColor = [UIColor blueColor];  
    }
    
    • 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 loads data from XML using the below code. It
I'm loading a view from a tableview touched cell that contains a photo that
I'm loading icons from an XML file in to an NSMutableArray using the following:
I have a TableView loading a custom cell and loading the data from a
I am loading approximately 60 to 80 data from web-service. But If you have
I am using jqGrid . I am loading the data into the grid from
I have problem with loading images from the Documents folder of iPhone application into
A follow on to my last question UITableViewCell custom cell using IB loading data
I have problem with deleting rows from table. I have a class for cell
I am loading a UITableViewCell using, [[NSBundle mainBundle] loadNibNamed:@BlogCell owner:self options:nil]; cell = blogCell;

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.