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

The Archive Base Latest Questions

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

I load cell from xib. I added 3 vertical separators to the cell (tried

  • 0

I load cell from xib. I added 3 vertical separators to the cell (tried to add from xib and from code). Everything is OK until I select the cell. When I select the sell, separators disappear.

Here are the images:
Not selected:
enter image description here

Selected
enter image description here

Code of adding separators:

- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super initWithCoder:aDecoder];
    if (self) {
        self.topSeparator = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, 1)] autorelease];
        [self addSubview:topSeparator];

        self.bottomSeparator = [[[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height - 1, self.bounds.size.width, 1)] autorelease];
        [self addSubview:bottomSeparator];

        // Initialization code
        CGFloat xOffset = 314;
        UIView *imageView1 = [[[UIView alloc] initWithFrame:CGRectMake(xOffset, 0, 1, self.bounds.size.height)] autorelease];
        imageView1.tag = kTagBorder1;
        imageView1.backgroundColor = [UIColor blackColor];
        [self addSubview:imageView1];

        xOffset = 487;
        imageView1 = [[[UIView alloc] initWithFrame:CGRectMake(xOffset, 0, 1, self.bounds.size.height)] autorelease];
        imageView1.tag = kTagBorder2;
        imageView1.backgroundColor = [UIColor blackColor];
        [self addSubview:imageView1];

        xOffset = 573;
        imageView1 = [[[UIView alloc] initWithFrame:CGRectMake(xOffset, 0, 1, self.bounds.size.height)] autorelease];
        imageView1.tag = kTagBorder3;
        imageView1.backgroundColor = [UIColor blackColor];
        [self addSubview:imageView1];
    }
    return self;
}

I even tried this:

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];
    [self bringSubviewToFront:[self viewWithTag:kTagBorder1]];
    [self bringSubviewToFront:[self viewWithTag:kTagBorder2]];
    [self bringSubviewToFront:[self viewWithTag:kTagBorder3]];
    [self setNeedsDisplay];

    // Configure the view for the selected state
}
  • 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-09T20:55:01+00:00Added an answer on June 9, 2026 at 8:55 pm

    I fixed it. I used UIImageView with black image instead of uiview with black background. In this case view doesn’t disappear.

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

Sidebar

Related Questions

I'm trying to load image from a plist to a custom cell. It all
In CustomCell.m I define init method where I want to load cell from the
Here is what I already have; I have loaded a Custom cell from XIB
I am currently trying to load my custom table view cell from its own
The question is simple: How do you load custom UITableViewCell from Xib files? Doing
In my tableview, I load a custom cell from a nibFile: customCell = (cellReponseCircuit
I have X sections. I want to lazy load images in different Custom Cell
load.js: jQuery(document).ready(function($) { $('.dialog ul li').click(function(e) { switch($(this).attr('id')) { case 'addProject': $('.addDialog').load('/add/addprojectform'); break; case
load() just returns a proxy by default and database won’t be hit until the
I load a webpage from my assets in a webview. Now i need to

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.