博客> iOS plist文件转换为NSMutableArray
iOS plist文件转换为NSMutableArray
2017-12-12 14:02 评论:0 阅读:351 yutaotst
ios NSMutableArray plist文件 数据转换 获取数据

iOS plist文件转换为NSMutableArray


+(NSMutableArray*)getTime{
    NSMutableArray *ary=[[NSMutableArray alloc]init];
    NSArray *array;
    array = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"buslinessTime" ofType:@"plist"]];

    for (NSDictionary *item in array) {

        BusinessTime *bst=[[BusinessTime alloc]init];
        bst.timeName=[item objectForKey:@"timename"];

        [ary addObject:bst];

    }
    return ary;

}
收藏
1
sina weixin mail 回到顶部