#import "ViewController.h"
@interface ViewController ()
/** <#注释#> */
@property(nonatomic, strong) NSMutableArray *arrM;
@end
@implementation ViewController
-(NSMutableArray *)arrM{
if (_arrM == nil) {
_arrM = [NSMutableArray array];
}
return _arrM;
}
- (void)viewDidLoad {
[super viewDidLoad];
NSArray *larger = @[@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10"];
[self.arrM addObjectsFromArray:[larger subarrayWithRange:NSMakeRange(0, 3)]];
//[larger subarrayWithRange:NSMakeRange(0, 3)];
NSLog(@"%@--%zd",self.arrM,self.arrM.count);
}
@end
NSArray *larger = @[@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10"];
[self.arrM addObjectsFromArray:[larger subarrayWithRange:NSMakeRange(0, 3)]];
//[larger subarrayWithRange:NSMakeRange(0, 3)];
NSLog(@"%@--%zd",self.arrM,self.arrM.count);