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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:14:40+00:00 2026-05-25T19:14:40+00:00

I have a UITableView where we want to just put a colored square. Depending

  • 0

I have a UITableView where we want to just put a colored square. Depending on the data in the UITableViewCell, the UIView changes its background color. That’s the way it currently is. To me, it seems better to just have a UIImageView and have a .png image for the different color squares, and load the correct one per cell depending on the data in the UITableViewCell. I’m not sure which method is better, or if there is an even better method I do not know of. Any thoughts? Thanks.

  • 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-25T19:14:41+00:00Added an answer on May 25, 2026 at 7:14 pm

    Having worked with images contained in table cells, I have to believe that simply using a UIView and setting it’s background color to whatever you need is going to be far faster.

    Even with local images (those in your app bundle), think of all the extra work you’d be incurring to create a UIImage and then set the UIImageView’s image property?

    In my case, on two different projects, I had to load images off the ‘net into table cells. Quite slow, so we did it in the background, which had it’s own challenges and special conditions to deal with. This would be overkill for what you describe though.

    I’d go with UIView’s and background colors. Of course, you could try it yourself both ways and see how it works for you. 🙂 Remember to test on a real device, because it’s easy to be lulled into a sense of “everything is GREAT!” when you watch your app scream on the simulator! 🙂

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

Sidebar

Related Questions

I have an UITableView and I want to detect double touches on UITableViewCell. I
I want to put a uitabbar into a section in uitableview, I have hard
I have a UITableView where I want to force a refresh of just a
I have UITableView and I want to load more data when user tries to
I have a UITableView . I want to update the table data based on
I want to have a background image behind my UITableView . This works fine,
I have a plain ol UITableView, and I want its cells to have the
Okay, so I have a UITableView that I want to apply themes to. I
I have a UITableView with an Index on the side; I want to add
I want to display a UITableView with Multiple Columns. The first column will have

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.