I need an array of strings in constant. is it a good idea to use #define?
For instance:
#define rows [NSArray arrayWithObjects: @"NameRowA",@"NameRowB",@"NameRowC", nil]
#define KEY_ROWA [columnas objectAtIndex:0]
#define KEY_ROWB [columnas objectAtIndex:1]
#define KEY_ROWC [columnas objectAtIndex:2]
I need to access an array of strings and the elements of this array.
I read (I donβt know if this is true) this way a new NSArray is created when it is used, I assume that the array is then released, so I think it's good because you only use this part of the memory when you need it necessary.
xarly source
share