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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:05:27+00:00 2026-05-27T06:05:27+00:00

In my app, I have a UITableView and each UITableViewCell utilizes a custom background

  • 0

In my app, I have a UITableView and each UITableViewCell utilizes a custom background and style with the following code in the “WillDisplayCell” method:

UIImage *cellBackgroundImage = [UIImage imageNamed:@"TableView_Cell_Background_iPhone"];

UIImageView *backgroundImage = [[UIImageView alloc] initWithImage:cellBackgroundImage     highlightedImage:cellBackgroundImage];

[cell setBackgroundView:backgroundImage];

[backgroundImage release];

The problem is that the PNG I’m using as the background is a rectangle, but the UITableViewCell is a rounded rectangle with a specific layer radius property. When I select a cell, the background overrides the rounded nature of the cell and I get a jarring blue highlighted sharp rectangle. Is there a way to set the selected state corner radius or something along those lines? My only other option if not would be to create a PNG background that fits the rounded rectangle perfectly.

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-27T06:05:28+00:00Added an answer on May 27, 2026 at 6:05 am

    I would set the selectionStyle of the cell to UITableViewCellSelectionStyleNone, this stops the blue highlight. Then start to do a custom selection job.

    You will have to make a custom subclass of UITalbeViewCell. Override setSelected or if that doesn’t work user a gesture recognizer or override touchesBegan etc. I have done it once, before, I forget exactly how, if you have trouble let me know and ill look it up.

    When you detect that the cell is selected, perhaps create a translucent overlay as a PNG and make it appear when the cell is selected. Alternatively lower the transparency of the background image or add a color mask.

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

Sidebar

Related Questions

On my iphone app, I have a UITableView in edit mode, containing custom UITableViewCell.
In my iPhone app, I have a UITableView with the following method - (NSInteger)numberOfSectionsInTableView:(UITableView
I have an app wherein the datasource for a UITableView updates by a background
In an app I'm working on, I have a plain style UITableView that can
I have a UITableView with a few UITableViewCell s. Each cell contains a UITextfield
I have a UITableview setup in my iphone app. At the moment, each row
I have to create a UITableView, that contains richly formatted text within each UITableViewCell.
I have a UITableView consisting of roughly 10 subclassed UITableViewCell s named TBPostSnapCell. Each
Inside each UITableViewCell of my UITableView , I have a UIScrollView . The scroll
I have a UITableView with custom cells. Inside each cell is 2 views. Each

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.