I have a custom object and NSMutableArray as instance member. I fill the array with some data after creation. I need a method to replace the content of the array. I tried:
-(void)replaceArr:(MyClass*) obj
{
[mList removeAllObjects];
NSMutableArray * tempArr=[obj mList];
mList=[NSMutableArray initWithArray:tempArr];
}
But it is failed on
mList=[NSMutableArray initWithArray:tempArr];