I have this code (small piece from a larger portion - just the troublesome part shown here):
#define kSizeLarge @"large"
-(void)determineBestFileSizeWithLimit:(int)limit
{
static NSString *largeName = kSizeLarge;
static NSArray *nameArray = @[kSizeLarge];
...
}
The compiler loves the first static variable and hates the second one, saying
Initializer element is not a compile-time constant
Removing the static from the second line makes the compiler happy.
What am/was I doing wrong or not getting correctly?