I try to replace a object in a NSMutableArray. To figure out, what the index number is, I use following code:
NSUInteger index = [self.nameArray indexOfObject:[NSString stringWithFormat:@"James"]];
Now I try to replace it:
self.nameArray = [[NSMutableArray alloc] replaceObjectAtIndex:index withObject:@"Johanna"];
But even I want to start the app, I will become an error: Assigning to 'NSMutableArray *' from incompatible type 'void'