I would like to assign NSInteger by using NSMutableArray is there any way to solve this?
It is not working on simulator and cut off when run the application.
NSInteger Section;
NSMutableArray dataSourceSection;
Section = (NSInteger)[dataSourceSection objectAtIndex:2];
Thank you.
A
NSMutableArrayonly stores objects.NSIntegeris not an object, but a primitive data type. There is a classNSNumber, however, that can be used instead to store numeric values inside objects. Here’s one example.To get the object back and retrieve the integer value use,