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 がないと言いたがります。
誰でも助けることができますか?