How do I build up a global like integer array?
I tried variations of the following:
@interface
int *iArray; //this space will vary depending upon need in the implementation
@implementation
...
int iArrayInit[4] = {1,2,3,4};
iArray = iArrayInit;
-bottom line: I need to keep index values in array that I can access easily, and use of [NSArray intValue] maybe to slow.
thanks
If it needs to be static you can declare an
NSMutableArrayas static in the implementation file and expose static methods to access it. When using anNSArraythe values need to be of typeidwhichNSNumbercan do. Here is an example which currently is not thread safe.