如何更改 NSMutable 数组中按钮(在索引处)的属性?
这是我的代码:
[btnRange addObject:btn12Out];
[btnRange addObject:btn13Out];
[btnRange addObject:btn14Out];
[btnRange addObject:btn17Out];
[btnRange addObject:btn18Out];
[btnRange addObject:btn19Out];
//start ordering
for (NSInteger i=0; i <= 5; i++) {
nxt = btnRange[arc4random_uniform([btnRange count])];
btnOrder[i] = nxt;
[btnRange removeObject:nxt];
}
//skipping down
if ([status isEqualToString:@"Computer"]) {
switch (level) {
case 1:
//here's where I want to edit the properties
//of a buttonn in the array (at a certain index)
nxt = btnOrder[current];
UIButton *newbutton = nxt;
[newbutton setBackgroundImage:@"buttonmem3" forstate:UIControlStateNormal];
//Fin
但是 xcode 喜欢说“newbutton”没有@interfae
任何人都可以帮忙吗?