标签:
NSString *path = nil;
path = [[NSBundle mainBundle] pathForResource:@"AreaBBSPlist" ofType:@"plist"];
NSArray *pathArray = [NSArray arrayWithContentsOfFile:path];
for (int i=‘A‘; i<=‘Z‘; i++) {
NSMutableArray *arr = [[NSMutableArray alloc] init];
for (NSDictionary *dict in pathArray) {
if ([[dict objectForKey:@"firstletter"] isEqualToString:[NSString stringWithFormat:@"%c",i]]) {
[arr addObject:dict];
}
}
if (arr.count) {
[_dataArray addObject:arr];
}
[arr release];
}
// Do any additional setup after loading the view.
}
标签:
原文地址:http://my.oschina.net/u/2329800/blog/489835