首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

数组新增添法

2013-10-23 
数组新添加法数组新添加法NSMutableArray*mArray [NSMutableArray new]for (int i 0 i 3 i ) {[m

数组新添加法

数组新添加法

NSMutableArray  *mArray = [NSMutableArray new];

    for (int i = 0; i < 3; i ++) {

        [mArray addObject:@[@"one",@"tow",@"three"][i]];

    }


输出mArray:@"one",@"tow",@"three"


 NSDictionary *tempDict = @{@"expand3":@{@"res":@{@"time": @"2013-10-31"}}};

    

  NSLog(@"expand3.res = %@ time = %@",[tempDict valueForKeyPath:@"expand3.res"],[tempDict valueForKeyPath:@"expand3.res.time"]);


输出@"2013-10-31"


热点排行