I have added a Bool value to a NSMutableArray like this:
[myMutableArray insertObject:[NSMutableArray arrayWithObjects:
[NSNumber numberWithBool:YES],
…,
…,
nil] atIndex:i];
but how do I later update the value to NO! Seems like a ridiculously simple question, but I am getting errors such as ‘Expression is not assignable’.
This, for example, doesn’t work:
[[myMutableArray objectAtIndex:i] objectAtIndex:0] = NO;
Advice appreciated. Thanks.
Take the snippet below for a test run:
Unless you’re able to use literals, then use rmaddy’s answer.