I’m struggling to create an array of ints in objective c.
the way I’d do this is javascript would be:
arr = new Array ( 1, 2, 3, 4, 3, 2, 2 );
I need to use an NSMutableArray, as the values need to be updated (it’s a tile map for a game).
How can I do this?
Does the array need to change length?
If not, why not use a normal array of ints:
Note that an NSArray (or subclass thereof) doesn’t hold
inttypes natively, you have to create an NSNumber object.If you really need an Objective-C style array, then use this: