When i am replacing or inserting an object into nsmutable array, I am getting Exception.

Posted by Madan Mohan on Stack Overflow See other posts from Stack Overflow or by Madan Mohan
Published on 2010-04-26T12:37:36Z Indexed on 2010/04/26 12:43 UTC
Read the original article Hit count: 237

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.

© Stack Overflow or respective owner

Related posts about exception

Related posts about nsmutablearray