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

  • Home
  • SEARCH
  • 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 7064317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:49:10+00:00 2026-05-28T04:49:10+00:00

I have designed my UITableViewCell in iPhone. Unfortunately I need to redesign the Cell.

  • 0

I have designed my UITableViewCell in iPhone. Unfortunately I need to redesign the Cell. I will explain my problem. My previous/current cell design like below:

Header(11.1.2012) //single row
event1
time1
Header(12.1.2012) //single row
event1
time1
Header(13.1.2012) //single row
event1
time1
Header(13.1.2012) //single row
event2
time2
Header(13.1.2012) //single row
event3
time3

Header(11.1.2012)
event1 is a singel row in a TableView cell. But, i need to change the design like this:

Header(11.1.2012) //single row
event1
time1
Header(12.1.2012) //single row 
event1
time1
Header(13.1.2012) //single row
event1
time1
event2
time2
event3
time3

I’m really confused as to how to do this? Can anyone please suggest any ideas and sample code to do like this?

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{
    static NSString *CellIdentifier = @"Cell";

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


        UIView *dateView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 30)];
        dateView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"transactionHeader.png"]];

        UILabel *headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, 300, 30)];
        headerLabel.tag = 100;
        headerLabel.backgroundColor = [UIColor clearColor];
        headerLabel.font = [UIFont fontWithName:@"Helvetica" size:16];
        headerLabel.font = [UIFont boldSystemFontOfSize:16];
        headerLabel.highlightedTextColor = [UIColor whiteColor];
        [dateView addSubview: headerLabel];
        [cell.contentView addSubview:dateView]; 

        UILabel *eventLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 30, 300, 25)];
        eventLabel.tag = 101;
        eventLabel.backgroundColor = [UIColor clearColor];
        eventLabel.font = [UIFont fontWithName:@"Helvetica" size:14];
        eventLabel.font = [UIFont boldSystemFontOfSize:14];
        eventLabel.highlightedTextColor = [UIColor whiteColor];
        [cell.contentView addSubview: eventLabel];

        UILabel *timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 55, 300, 25)];
        timeLabel.tag = 102;
        timeLabel.backgroundColor = [UIColor clearColor];
        timeLabel.font = [UIFont fontWithName:@"Helvetica" size:14];
        timeLabel.highlightedTextColor = [UIColor whiteColor];
        [cell.contentView addSubview: timeLabel]; 
    }

    UILabel * headerLabel = (UILabel *) [cell.contentView viewWithTag:100];
    headerLabel.text = [headerDateArray objectAtIndex:indexPath.row];

    UILabel *eventLabel = (UILabel *) [cell.contentView viewWithTag:101];
    eventLabel.text = [eventArray objectAtIndex:indexPath.row];

    UILabel * timeLabel = (UILabel *) [cell.contentView viewWithTag:102];
    timeLabel.text = [timeArray objectAtIndex:indexPath.row];

    return cell;
}

Currently am using this code in my project. What i need to change? 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-28T04:49:11+00:00Added an answer on May 28, 2026 at 4:49 am

    Hi Thanks to all for answering and viewing my question. I have got the idea and solved the problem. I have added Header for each row and removed the header where the data returns null.
    Now, it is working very well in my app. Once again i thank you all.

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

Sidebar

Related Questions

I have designed a custom section handler before but I'm faced with a problem
I have designed the following class that should work kind of like a method
I have designed some classes using Visual Studio class diagramming. Now I would like
I have designed an input validation loop in C#, and I would like it
I have designed a Report in my ASP.NET web site now i need to
I have designed a class containing some information about a given object which will
I have a simple cell - designed in IB - and with the reuseIdentifier
I have designed a custom Windows application in C#. Now, I would like to
I have designed a report with 4 subreports, the problem is that when I
I have designed database tables (normalised, on an MS SQL server) and created a

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.