【发布时间】:2011-10-19 06:14:10
【问题描述】:
我是 iphone 应用程序开发的新手,所以请任何人帮助我。我的主要问题是
-->解析 xml 后,我将 xml 的属性值插入到 nsarray 中,其中 nsarray 是 nsmutable 数组的对象。类似的东西...
[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]];
现在我想在 uitableview 的每个单元格中逐个显示每个属性值。但我不知道节方法中的行数是多少。请任何人帮助我。我正在提供示例代码....
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection: (NSInteger)section{
NSLog(@"The number of row in the object array: %d ",[records count]);
return [records count];
}
tableview 方法在这里...现在告诉我在每个单元格中逐一显示所有属性值的返回类型是什么。
提前致谢。
【问题讨论】:
标签: xml uitableview nsarray