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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:41:36+00:00 2026-05-29T19:41:36+00:00

I am creating an application in which I have to divide a cell into

  • 0

I am creating an application in which I have to divide a cell into three parts. For example I have to give the title in one cell and display the corresponding data immediately below.

How can I do that?


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:
   (NSIndexPath  *)indexPath

{

static NSString *CellIdentifier = @"Cell";
myappAppDelegate *mydelegate=(myappAppDelegate *)[[UIApplication sharedApplication]delegate];

 database *objdata =[mydelegate.myarray objectAtIndex:indexPath.row];
 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) 
{
     cell = [[[UITableViewCell alloc] 
     initWithStyle:UITableViewCellStyleSubtitle     
     reuseIdentifier:CellIdentifier] autorelease];

    cell.accessoryType = UITableViewCellAccessoryNone;



    if (indexPath.row == 0) 
    {
        UILabel *temp = [[UILabel alloc] initWithFrame:CGRectMake(20, 0, 200, 44)];
        temp.text =@"Main Balance";  
        temp.backgroundColor = [UIColor clearColor];
       temp.font = [UIFont systemFontOfSize:19];
        [cell addSubview:temp];

        UILabel *temp1 = [[UILabel alloc] initWithFrame:CGRectMake(240, 0, 50, 44)];
        temp1.text =@"2000";  
        temp1.backgroundColor = [UIColor clearColor];
        temp1.font = [UIFont systemFontOfSize:19];
        [cell addSubview:temp1];

    else if(indexPath.row==1)
    {
        UILabel *temp = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 108, 44)];
        temp.text =@"Income";  
        temp.backgroundColor = [UIColor clearColor];
        temp.font = [UIFont systemFontOfSize:19];
       [cell addSubview:temp];

    }

    else 
    {
       UILabel *temp = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 108, 44)];
        temp.text =[NSString stringWithFormat:@"%d",objdata.amount];       
       temp.backgroundColor = [UIColor clearColor];
        temp.font = [UIFont systemFontOfSize:19];
        [cell addSubview:temp];


    }

enter code here

On Home screen I create One Main Blaance text box and two Buttons Like Income,Expense,and One final display button. When I click Income it display another view in which Add income in TextBox and one button for Add to main balance.I type the Income Amount in that TextBox then click on Save,it will save in database I do same for Expense then I click on Add to main balance button it will be added or subtracted the amount in main balance text box which I display on home screen.then Click Final display button on home screen it will display three label Income,Expense,Main Balance..in TableView.I get the value Under Income and Expense But it display only Initial value which I entered in database At design time By Query.

My Question:- suppose I add 4 data then final display will be display all that data even If i add more data it also display in final display….I hope U can get my point..please Guide me I m so confused.

  • 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-29T19:41:39+00:00Added an answer on May 29, 2026 at 7:41 pm

    You can add 3 labels to every cell. And assign them value in UITableView. That’s the only simple way of doing it.

    You have to define the labels in your UITableViewCell declaration. Once it’s done you can assign there values where you are declaring your UITableView.

    So basically your each cell will contain the 3 labels which you can place anywhere you want.

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

Sidebar

Related Questions

I am creating an application in which I have two mxml components, MainPanel.mxml and
I am creating a application which have webviews as well as native screens.I have
I am creating a C# application which will have to upload and read data
I'm creating a little Java application which should have a progress indicator with percentages.
I'm creating a Rails application which uses MySQL. I have a table in my
I am creating an Android application which will have some embedded music inside of
I am creating an android application in which I have to insert an image
I am currently creating a java application in which I have a 2d array
I am creating a wpf application and in which i have to create a
I have an ASP.NET application which tracks statistics by creating and writing to custom

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.