When i am replacing or inserting an object into nsmutable array, I am getting Exception.
- by Madan Mohan
Hi,
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];
please help me.
Madan,
Thank You.