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.
You could create a label for each field and add it to the cell in cellForRowAtIndexPath, the outline being :
Of course you’ll need to work the size for each field and the total length in the screen.