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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:00:26+00:00 2026-05-26T09:00:26+00:00

i am newer to iphone application development so please anybody help me.my main problem

  • 0

i am newer to iphone application development so please anybody help me.my main problem is

–>after parsed the xml i am inserting attribute value of the xml in a nsarray which nsarray is an object of nsmutable array. something like that…

[records addObject:[NSArray arrayWithObjects:
                            [TBXML textForElement:visitor],
                            [TBXML textForElement:uniqueVisitor],
                            [TBXML textForElement:order],
                            [TBXML textForElement:revenue],
                            [TBXML textForElement:conversionRate],
                            [TBXML textForElement:newProduct],
                            [TBXML textForElement:outOfStockProduct],
                            [TBXML textForElement:productInCart],
                            [TBXML textForElement:visitorInc],
                            [TBXML textForElement:uniqueVisitorInc],
                            [TBXML textForElement:orderInc],
                            [TBXML textForElement:revenueInc],
                            [TBXML textForElement:conversionRateInc],
                            [TBXML textForElement:newProductInc],
                            [TBXML textForElement:outOfStockProductInc],
                            [TBXML textForElement:productInCartInc],nil]]; 

now i want to display each attribute value one bye one in every cell of the uitableview.but i do not know what will be the number of rows in a section method.please any body help me.i am giving the sample code….

    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:    (NSInteger)section{
    NSLog(@"The number of row in the object array:  %d ",[records count]);
return [records count];
    }

tableview method is here…now tell me what will be the return type for displaying all the attribute value one bye one in every cell.

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-26T09:00:26+00:00Added an answer on May 26, 2026 at 9:00 am

    You could create a label for each field and add it to the cell in cellForRowAtIndexPath, the outline being :

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
    static NSString *CellIdentifier = @"CellPortrait";
    UITableviewCell *cell;
    
    cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    
    // THIS CREATES THE CELL
    NSInteger index = (page-1)*pagesize + indexPath.row;
    NSDictionary* dataAtIndex = [records getDataAtIndex:index];
    if (cell == nil) {
        cell = [[[myTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
                                       reuseIdentifier:CellIdentifier] autorelease];
    
        int x = 0;
        int cellsize = 50;
        int padding = 1;
        int nbxmlrecords = [[records objectAtIndex:indexPath.row] count];
    
        for (int idx = 0 ; idx < nbxmlrecords; idx++)
        {
                UILabel* aLabel = [[[UILabel alloc] initWithFrame:CGRectMake(x, 0.0,
                                                                             cellsize, cell.contentView.frame.size.height)] autorelease];
                x = x + cellsize + padding;
    
                aLabel.tag = idx;
                aLabel.font = [UIFont systemFontOfSize:10.0];
                aLabel.textAlignment = UITextAlignmentLeft;
                aLabel.textColor = [UIColor blackColor];
                aLabel.autoresizingMask = UIViewAutoresizingFlexibleHeight;
                aLabel.opaque = true;
    
                [cell.contentView addSubview:aLabel];
        }
    }
    
    // THIS FILLS THE DATA IN THE CELL
    for (int idx = 0 ; idx < nbxmlrecords; idx++)
    {
            NSString* value = [[records objectAtIndex:indexPath.row] objectAtIndex:idx];
            UILabel* aLabel = (UILabel *)[cell.contentView viewWithTag:idx];
            aLabel.text = value;
    }
    
    ...
    

    Of course you’ll need to work the size for each field and the total length in the screen.

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

Sidebar

Related Questions

I am newer in iPhone application development. I want to find out why tableview
I am getting started with iPhone application development and would like to create an
I am going to attempt to teach some iphone application development at my job,
I come from the iPhone development world but have never developed desktop applications. Now
I am trying to use Aptana to build an IPhone web application. I've never
I am iPhone application developer, many people told me to join with the android
I have a few quick questions about the iPhone software development. I did some
I am primarily a web developer (ruby, python) that is new to iPhone development.
I have a custom iPhone application which doesn't rely on UIKit in any way
I have an Objective C - iPhone Application I am writing, and I think

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.