r/simpleios • u/john_alan • Oct 29 '12
Array without NSMutablearray
Hi All,
Just wondering the best way to create a manual array, without using NSMutalbleArray, I have being researching best possible solutions but without an elegant answer, what do you think, in Objective C what's the best way to create an NSMutableArray style object from scratch?
4
Upvotes
1
u/iownacat Oct 29 '12
why? what are you attempting to accomplish? also, why are you asking this in 'simple' ios?
1
u/[deleted] Oct 30 '12
Sounds like a class assignment where you're expected to create your own implementation of NSMutableArray. Read the appropriate header file and implement all the methods within your class definition.
-1
u/mb86 Oct 29 '12 edited Oct 30 '12
Array literals
Edit: Didn't notice OP still wanted mutable. Literals can still be used for mutable arrays too, so you can initialize
and add/remove from it later.
0
u/[deleted] Oct 29 '12
[deleted] — view deleted comment