码迷,mamicode.com
首页 > 其他好文 > 详细

.plist

时间:2015-08-09 22:45:01      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:

 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

标签:

原文地址:http://my.oschina.net/u/2329800/blog/489835

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!