ios - Terminating with uncaught exception of type NSException on my NSArray -
i've been trying add object in array. here's i've done far:
nsmutablearray *mutablemenuarray = [nsmutablearray arraywitharray:dictionary[mjfeeddatakey]]; [mutablemenuarray removeobjectatindex:1]; [mutablemenuarray removeobjectatindex:1]; nsmutablearray *menuarray = [[nsmutablearray alloc] init]; [menuarray addobjectsfromarray:mutablemenuarray]; [menuarray addobject:@"check"]; mjmenuentities *menus = [mjmenuentities sharedinstance]; [menus setwitharray:menuarray]; self.modelarray = [nsmutablearray arraywitharray:menus.menuitems]; but once i've set menus menuarray comes error:
"terminating uncaught exception of type nsexception on nsarray".
but if menus set mutablemenuarray there no error.
nsarray immutable. seems modify first parameter of method:- setwitharray.
can paste details of method:- setwitharray.