Objective-C 数组

文章目录

1. 二维数组声明

		People *p00 = [[People alloc]initWithName:@"00"];
        People *p01 = [[People alloc]initWithName:@"01"];
        People *p02 = [[People alloc]initWithName:@"02"];
        NSArray *line0 = [NSArray arrayWithObjects:p00,p01,p02, nil];
        
        
        People *p10 = [[People alloc]initWithName:@"10"];
        People *p11 = [[People alloc]initWithName:@"11"];
        People *p12 = [[People alloc]initWithName:@"12"];
        NSArray *line1 = [NSArray arrayWithObjects:p10,p11,p12, nil];

        
        People *p20 = [[People alloc]initWithName:@"20"];
        People *p21 = [[People alloc]initWithName:@"21"];
        People *p22 = [[People alloc]initWithName:@"22"];
        NSArray *line2 = [NSArray arrayWithObjects:p20,p21,p22, nil];
        
        NSArray *ad = [NSArray arrayWithObjects:@"dd", nil];
        
        NSMutableArray <NSArray<People*>*> *aaa = [NSMutableArray arrayWithCapacity:0];
        
        [aaa addObject:line0];
        [aaa addObject:line1];
        [aaa addObject:line2];
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值