So I'm trying to change all the booleans in an NSMutableArray that I made which I followed from here.
i have:
@property (nonatomic, retain) NSMutableArray *isDinosaurTapped;
and synthesized:
@synthesize isDinosaurTapped;
and set up [EDITED to show isDinosaurTapped]:
NSMutableArray *newDinosaurTaps = [[NSMutableArray alloc] init];
for( int i = 0; i < [dinoSprites count]; i++ )
{
NSNumber *isTapped = [posPlist valueForKeyPath:[NSString stringWithFormat:@"Dinosaurs.Dinosaur_%i.isTapped", i]];
[newDinosaurTaps addObject:isTapped];
}
self.isDinosaurTapped = [newDinosaurTaps copy];
for( int i = 0; i < [isDinosaurTapped count]; i++ )
{
[isDinosaurTapped replaceObjectAtIndex:i withObject:[NSNumber numberWithBool:NO]];
}
When I build its fine, however when I actually build and run, I keep getting a SIGABRT: '-[__NSArrayI replaceObjectAtIndex:withObject:]: unrecognized selector sent to instance.
Have I set the properties of the NSMutableArray incorrectly? But according to this, my properties should be ok.
Any feedback is greatly appreciated! :D