I have an NSMutableArray that did its initialisation like follows:
@interface Countries ()
{
NSMutableArray *arrayofCountry;
}
@end
- (void)viewDidLoad
{
//...
arrayofCountry=[[NSMutableArray alloc]init];
//...
}
Then I wanted to apply a removeObjectAtIndex to that NSMutableArray:
[arrayofCountry removeObjectAtIndex:sourceRow];
The problem is it is crashing with that log:
-[__NSArrayI removeObjectAtIndex:]: unrecognized selector sent to instance
I verified it with:
NSLog( NSStringFromClass( [arrayofCountry class] ));
and it's returning __NSArrayI.
The question is how it was converted to NSArray?
I'm just populating it with:
arrayofCountry=[JSON valueForKeyPath:@"country_name"];
Thank you for your help.
arrayofCountry = [NSMutableArray array];