我正在使用以下代码从以下代码创建标签NSMutableArray
:
CGRect punti = CGRectMake(270, 200, 50, 50);
CGRect punti2 = CGRectMake(370, 200, 50, 50);
CGRect punti3 = CGRectMake(470, 200, 50, 50);
[_Cordinate3lettere insertObject:[NSMutableArray arrayWithObjects:[NSValue valueWithCGRect:punti],[NSValue valueWithCGRect:punti],[NSValue valueWithCGRect:punti], nil] atIndex:0];
UILabel *label = [[UILabel alloc] init];
NSIndexSet *indexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 2)];
// Error occurs on line below
label.frame = [[_Cordinate3lettere objectAtIndexs:indexSet] CGRectValue];
label.text = @"a";
label.backgroundColor = [UIColor colorWithWhite:1 alpha:0];
//label.font =
[self.view addSubview:label];
但是,以下行会产生错误。
label.frame = [[_Cordinate3lettere objectAtIndexs:indexSet] CGRectValue];
收到的错误是No visible @interface for NSMutableArray declares the selector "objectAtIndexs"
是什么导致了这个错误,我该如何解决?