While replacing or inserting into an NSMutable array, I am getting exception as:
Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘*** -[NSCFArray replaceObjectAtIndex:withObject:]: mutating method sent to immutable object’
[list replaceObjectAtIndex:indexRow withObject:editcontacts];
//or
[list insertObject:editcontacts atIndex:indexRow];
You are still using an
NSArrayinstead of anNSMutableArray. You need to allocatelistas such:See this question