.plist

 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.

}


你可能感兴趣的:(.plist)