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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:13:09+00:00 2026-05-25T13:13:09+00:00

I add UIView with background image(that has transparent parts) into the UITableViewCell. At first

  • 0

I add UIView with background image(that has transparent parts) into the UITableViewCell. At first everything looks perfect, but after deselecting row, background of my UIView looses transparency.

step 1

http://img29.imageshack.us/img29/1842/screenshot20110910at409.png

step 2

http://img41.imageshack.us/img41/1842/screenshot20110910at409.png

static NSString *CellIdentifier = @"Cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}

UIView *priceView = [[UIView alloc] init];
priceView.frame = CGRectMake(250, 10, 40, 21);

priceView.backgroundColor = [UIColor colorWithPatternImage:[ UIImage imageNamed:@"priceBG.png" ]];
priceView.opaque = NO;
[priceView.layer setOpaque:NO];
[cell addSubview:priceView];
[priceView release];
return cell;
  • 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-25T13:13:10+00:00Added an answer on May 25, 2026 at 1:13 pm

    Use a UIImageView instead and add it to the cell’s contentView:

    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    }
    
    UIImageView *priceImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"priceBG.png" ]];
    priceImageView.frame = CGRectMake(250, 10, 40, 21);
    priceImageView.backgroundColor = [UIColor clearColor];
    [cell.contentView addSubview:priceImageView];
    [priceImageView release];    
    return cell;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIView to which i add a background image. Then to that
I want to add a UIView to another UIView so that child view covers
I'm trying to add a custom image as a background for my application using
I have a regular-style UITableView—the one that has a white background and gray horizontal
The problem: On top of existing UIView, load a background image From the card
I have a button that uses a stretchable PNG as the background image, like
While using UIVIEW I put an image to the background and added a UIBUtton,
I have an image that I want to use as the background of my
I have a class that implements UIView and inside - (void)drawRect:(CGRect)rect method I add
i will like to add in a background image bgImageView.image = [UIImage imageNamed:@frame_trans]; for

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.