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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:13:20+00:00 2026-06-05T11:13:20+00:00

I have a UIviewController, in the xib file I added 3 uitableview cells, but

  • 0

I have a UIviewController, in the xib file I added 3 uitableview cells, but I want to give the top and bottom cells rounded corners similar to a grouped table look. How can I do this, also how can I add table cells to a uiviewcontroller progammatically?

  • 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-05T11:13:21+00:00Added an answer on June 5, 2026 at 11:13 am

    Here’s my approach, but for this to work you’ll need to have an image for top cell, bottom cell, and middle cell. This will help distinguish between the first row, middle rows and the bottom one.

        UIImage *rowBackground;
        UIImage *selectionBackground;
        NSInteger sectionRows = [tableView numberOfRowsInSection:[indexPath section]];
        if (indexPath.row == 0)
        {
            rowBackground = [UIImage imageNamed:@"topRow.png"]; //Top Rounded
            selectionBackground = [UIImage imageNamed:@"topRowSelected.png"]; //Top Rounded Selected
        }
        else if (indexPath.row == sectionRows - 1)
        {
            if (indexPath.section == 0) {
            rowBackground = [UIImage imageNamed:@"bottomRow.png"];// Bottom Rounded
            selectionBackground = [UIImage imageNamed:@"bottomRowSelected.png"]; //Bottom Rounded Selected
            } else {
                rowBackground = [UIImage imageNamed:@"bottomRowSelected.png"];
                selectionBackground = [UIImage imageNamed:@"bottomRow.png"];
            }
        }
        else
        {
            rowBackground = [UIImage imageNamed:@"middleRow.png"]; // Anything in the middle
            selectionBackground = [UIImage imageNamed:@"middleRowSelected.png"];
        }
    
        ((UIImageView *)cell.backgroundView).image = rowBackground;
        ((UIImageView *)cell.selectedBackgroundView).image = selectionBackground;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIViewController I am loading from a xib file and pushing onto
I have made a UIViewController subclass without a .xib file, thinking I would not
I have a UIViewController with a XIB and want to add programmatically another subview.
I have added a XIB based UIViewController to my solution and dragged some UIViews
I have declared IBOutlets in the header file but when I open the XIB
I have a xib in which I have added a UIViewController named delta. The
I have a UIViewController with its own .xib, and I want to use a
In xcode4.2, I have a UiViewController bundled with a same name xib file. In
I have two NIB's ParentViewController.xib ChildViewController.xib ParentViewController.xib contains a UIView and a UIViewController. ChildViewController.xib
I have a problem with data in UITableView. I have UIViewController, that contains UITableView

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.