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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:07:35+00:00 2026-05-31T22:07:35+00:00

I got an app with UITableView. Every cell has accessory. But i cant set

  • 0

I got an app with UITableView. Every cell has accessory. But i cant set backgroundColor ti this cells.

enter image description here

I tried to set backgrounColors in this ways:

cell.contentView.backgroundColor =[UIColor redColor];
cell.backgroundView.backgroundColor = [UIColor redColor];
cell.backgroundColor = [UIColor redColor];

But only contentView work. How can i do it? Thnx

  • 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-31T22:07:37+00:00Added an answer on May 31, 2026 at 10:07 pm

    the second way cell.backgroundView.backgroundColor = [UIColor redColor]; is not that wrong. Unfortunately there is no backgroundView until you create one. You have to create an UIView and set it as background of the cell.

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"Cell"];
        UIView *background = [[UIView alloc] initWithFrame:CGRectZero];
        background.backgroundColor = [UIColor redColor];
        cell.backgroundView = background;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing my first iphone app and through several examples I've got a UITableView
I got app with UITableView. There is UILabel in each UITableViewCell. I add labels
I got an app with group style table. I tried to customize table header
I ran the instruments for my app (which contains a UITableView) and got the
In Navigation-based App, when i try to load another view which has got implemented
I got an app with some text data. From TableView user choose one cell
So, I've got an UITableView showing the contents of the app Documents folder. In
Alright, I might make this confusing, but hopefully not. So I have a UITableView
I got this app where the user must connect the DB manually, I do
I've got an app that worked OK in iOS 4 but is having several

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.