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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:36:09+00:00 2026-06-09T16:36:09+00:00

I have a uitableviewcell which display a product and 5 logos or less, depending

  • 0

I have a uitableviewcell which display a product and 5 logos or less, depending on if some feature is available or not for that product.

for exemple if the product has features a, b, c, d, e (on a b c d e), it should display :
a b c d e

for exemple if the product has features b, c and e (on a b c d e), it should display :
b c e

by doing removefromsuperview on the logo that are not to display, and doing a setFrame:CGRectZero, I have this :
“empty space” b c “empty space” e
(I dont know how to do an empty space on this editor)

I can’t find a way to have what I want. I can use a grayed icon if the feature is not available, but wanted to use only 3 logos when needed

Any idea ?

  • 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-09T16:36:10+00:00Added an answer on June 9, 2026 at 4:36 pm

    Just add 5 UIImageViews to the button and fill them from left to right and set the not needed ImageViews-Images to nil.

    Something like:

    myCell.ImageView1.Image = imageB;
    myCell.ImageView2.Image = imageC;
    myCell.ImageView3.Image = imageE;
    myCell.ImageView4.Image = nil;
    myCell.ImageView5.Image = nil;
    

    You could also use an array.

    NSMutableArray* arr = [[NSMutableArray allo] init];
    
    if (logo1IsNeeded == true) [arr addObject:imageA];
    if (logo2IsNeeded == true) [arr addObject:imageB];
    if (logo3IsNeeded == true) [arr addObject:imageC];
    if (logo4IsNeeded == true) [arr addObject:imageD];
    if (logo5IsNeeded == true) [arr addObject:imageE];
    
    for (int i = arr.count; i < 5; i++)
    {
       [arr addObject: nil]; //Fill the remaining entries with nil
    }
    
    myCell.ImageView1.Image = [arr objectAddIndex:0];
    myCell.ImageView2.Image = [arr objectAddIndex:1];
    myCell.ImageView3.Image = [arr objectAddIndex:2];
    myCell.ImageView4.Image = [arr objectAddIndex:3];
    myCell.ImageView5.Image = [arr objectAddIndex:4];
    

    Please excuse if there are any typos in the code. I did this from mind.

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

Sidebar

Related Questions

I have a custom UITableViewCell which has an image & and some text. When
I have a custom UITableViewCell which has some subviews. i.e. some labels, some images.
I made a UITableViewCell and I have 20 rows in that table in which
I want to display different UITableViewCell s depending on what content is available .
In my app, I have a UITableViewCell which is used to display a background
I have a UITableView in my app that displays some Location objects which I
I have a UITableViewCell subclass which draws a rectangular vertical line of 5px width
I have a custom UITableViewCell which contains several UIButtons. Each button's frame position is
I have a UITableViewCell nib file in which there is a UIImageView and a
I have created a UITableViewCell using UITableViewCellStyleValue1, which the Apple docs define as: A

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.