NSMutableArray数组初始化, NSInteger转换NSNumber, 把NSNumber添加至NSMutableArray.
NSMutableArray *array = [[NSMutableArray alloc] init];
NSInteger num = 7;
NSNumber *number = [NSNumber numberWithInt:num];
[ar addObject:number];
NSLog(@"Array %@",array);
版权声明:本文为博主原创文章,未经博主允许不得转载。
时间: 2024-10-05 05:41:37