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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:22:16+00:00 2026-05-24T13:22:16+00:00

I´m trying to achieve a grouped styled UITableView like the Contact apps detailedView. I

  • 0

I´m trying to achieve a grouped styled UITableView like the Contact apps detailedView. I want the top most cell to be transparant and have a UISegemtedControl at the bottom.

When I try to create two different types of custom cells, only the first one is loaded even though i use two different cellIdentifiers.

Would appreciate som guidance. Or some good tutorial tips for the same topic.

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    /*
    UIView *backView = [[UIView alloc] initWithFrame:CGRectZero];
    backView.backgroundColor = [UIColor clearColor];
    cell.backgroundView = backView;
    [backView release];
    */

    static NSString *cellIdentifier1 = @"DetailCellStyle1";
    static NSString *cellIdentifier2 = @"DetailCellStyle2";

    if (indexPath.section == 0) {

        // Load from nib
        DetailCellViewController *cell = (DetailCellViewController *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier1];
        if (cell == nil) {
            NSArray *topLevelObjects = [[NSBundle mainBundle]
                                        loadNibNamed:@"DetailCellView" 
                                        owner:nil 
                                        options:nil];

            for (id currentObject in topLevelObjects) {
                if ([currentObject isKindOfClass:[UITableViewCell class]]) {
                    cell = (DetailCellViewController *) currentObject;
                    break;
                }
            }
        }

        return cell;
    }
    else  {
        // Load from nib
        DetailCellViewController2 *cell = (DetailCellViewController2 *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier2];
        if (cell == nil) {
            NSArray *topLevelObjects = [[NSBundle mainBundle]
                                        loadNibNamed:@"DetailCellView" 
                                        owner:nil 
                                        options:nil];

            for (id currentObject in topLevelObjects) {
                if ([currentObject isKindOfClass:[UITableViewCell class]]) {
                    cell = (DetailCellViewController2 *) currentObject;
                    break;
                }
            }
        }

        return cell;
    }

    return nil;
}
  • 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-24T13:22:17+00:00Added an answer on May 24, 2026 at 1:22 pm

    You load cell 1 and cell 2 in exactly the same way by taking the first object of type UITableViewCell in the “DetailCellView” nib. Therefore, you’re getting the same cell in both cases.

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

Sidebar

Related Questions

im trying to achieve the following, in php i have a form like this:
I have a standard, grouped UITableView that I am trying to add a custom
I have a UIView with a grouped UITableView and I'd like the UIView to
I have a IKImageBrowserView embedded inside an NSScrollView. I'm trying achieve scroll bars like
im trying to achieve something but i dont really know how I have set
I am trying to achieve something like this. The Expandable List consists of the
I'm currently trying to implement a editable details view using a grouped UITableView. I'd
Im trying to achieve an output like this {status:ok,0:{id:11,title:digg,url:http://www.digg.com}} but instead i am getting
I have been trying all afternoon to try and achieve this with no success.
I have a UIView (created in IB) with a grouped UITableView as a subview.

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.