我拉从xml数据所以是可能的,以显示他们组?显示表格视图数据分组在iphone上
我现在没有plsit现在我显示数据就像简单,所以现在我想通过什么应该是方法/概念组?
我做了这样的事情,但没有运气
d O I需要做一些排序?像使用NSSortDescriptor ****
如果是的话那么在viewdidload或cellforrowatindxpath??
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
//UITableView *tableView;
UITableViewCell *cell;
static NSString *CellIdentifier = @"Cell";
**Book *aBook = [appDelegate.books objectAtIndex:indexPath.row];**
///如何将它们排列在组中?
我想这
NSString *keys =aBook.name;
NSMutableDictionary *dicta = [NSMutableDictionary dictionary];
[dicta setObject:keys forKey:@"message"];
NSSortDescriptor *sortNameDescriptor =
[[[NSSortDescriptor alloc]
initWithKey:@"message" ascending:YES]
autorelease];
,但我不能按字母顺序排列:(显示它们
}
感谢
有这些东西叫做表格部分。也许你应该看看它们和TableViewSuite示例。 – Nick 2010-09-02 02:17:01
谢谢,但我不知道如何进行,我应该创建词典,然后显示?我应该在哪里添加元素到dic?你能否详细说明 – prajakta 2010-09-02 02:35:05