iOS 数组~把创建的字典添加到数组中

//联系人:石虎 QQ:1224614774 昵称:嗡嘛呢叭咪哄

一、概念


    NSMutableArray *tempArray = [NSMutableArray array] ;

     

    NSMutableDictionary *dic1 = [NSMutableDictionary dictionary];

    dic1[@"code"] = @"0";

    dic1[@"value"] = @"更新时间";


    NSMutableDictionary *dic2 = [[NSMutableDictionary alloc]init];

    dic2[@"code"] = @"1";

    dic2[@"value"] = @"播放量";


    [tempArray addObject:dic1];

    [tempArray addObject:dic2];


    注意点:1.数组没有创建2.添加对象为空,3.数组越界


谢谢!!!

你可能感兴趣的:(iOS,数组,字典,iOS,知识点)