For example: I have a mutable array of BOOLs(or [NSNumber numberWithBool:TRUE]; ). and then I want to change, for example the first value in this array to FALSE.
[array addObject:[NSNumber numberWithBool:TRUE]];
[array objectAtIndex:0] ???
我知道,完成这项任务的方法非常奇怪。
[array replaceObjectAtIndex:0 withObject:[NSNumber numberWithBool:FALSE]];
Yes, this fully satisfies me, but I am looking for another way, that is more simple than this. Something like [[array objectAtIndex:0] setBoolValue:FALSE];
for example, imagine, if I had UIButton instead of BOOLs: [[array objectAtIndex:0] setHidden:TRUE];
or this is only dreams?
提前感谢!