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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:34:12+00:00 2026-05-26T04:34:12+00:00

I wanna create the uitableview like this image . loading data from server and

  • 0

I wanna create the uitableview like this image . loading data from server and assigning the values to columns of Row. I saw the link of stack, but not helpful to me.
UPDATE
My code: –

#pragma mark UITableViewDelegate methods

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger) section {
    return [modelArray count];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = nil;
    static NSString *AutoCompleteRowIdentifier = @"AutoCompleteRowIdentifier";
    cell = [tableView dequeueReusableCellWithIdentifier:AutoCompleteRowIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:AutoCompleteRowIdentifier] autorelease];
    }
    cell.selectionStyle = UITableViewCellSelectionStyleGray;      
    // Configure the cell...
    RankModel *model = [modelArray objectAtIndex:indexPath.row];
    cell.textLabel.text = [NSString stringWithFormat:@"%@    %@     %@     %@     %@     %@",  model.level, model.name, model.score, model.rightAnswersCount, model.currentRank, model.country];
    return cell;
}

but I wanna display like the given image. so please help me to overcome this problem. thanks in advance.

  • 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-26T04:34:13+00:00Added an answer on May 26, 2026 at 4:34 am

    Well this will require a bit more code than the method you present.
    My suggestion is you could create a UILabel for each of your fields, instrad of using a single NSString. Don’t use cell.textLabel, but rather add your content on cell.contentView and then you can manage each label’s color, background color and labels’ sizes. The “grid” look can be rendred by assigning a white color to contentView and assigning a green color for example to each label’s background. For example, after your cell is created :

    cell.contentView.backgroundColor = [UIColor clearColor];
    
    UILabel* aLabel = [[UILabel alloc] initWithFrame:CGRectMake(100, 0.0, 100, 44)];
    aLabel.tag = indexPath.row;
    aLabel.textAlignment = UITextAlignmentLeft;
    aLabel.textColor = [UIColor whiteColor];
    aLabel.text = @"Test";
    aLabel.backgroundColor = [UIColor greenColor];
    [cell.contentView addSubview:aLabel];
    [aLabel release];
    

    Start your next label at 201 or more to leave an impression of a white vertical line.
    Keep the row index in the tag so you can manage alternate colors in :

    - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell
                                                            *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
    
        if (indexPath.row == 0 || indexPath.row%2 == 0) {
            // use light green, get access to the labels via [cell.contentView viewWithTag:indexPath.row]
        } else {
            // use dark green   
        }
    }
    

    Hope this helps.

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

Sidebar

Related Questions

I wanna create some loading dots, like this: At 0000 miliseconds the span content
I've got collection of words, and i wanna create collection from this collection limited
It's like this, I created a UITableViewCell subclass called NewsItemCell, then I wanna use
i wanna create an emulator looks like a 「Desire」 screen , could someone tell
i wanna create a simple bookmarklet that hides all images from the current website
I wanna create a loyalty system for various activities on my web app like
I wanna create queue management system (for bank, hostpital...) Something like that There will
What I wanna create is page that fetches results from my DB and display
i wanna create a Menu which come from the left of the screen, classics
I wanna create a simple calculator. One from my goals its place in EditText

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.