Really beginner question here.
I have an NSArray of images which in its last line has an error in Xcode saying that the "initializer element is not constant".
any help please?
Really beginner question here.
I have an NSArray of images which in its last line has an error in Xcode saying that the "initializer element is not constant".
any help please?
You're initializing your NSArray outside of a valid scope (ie, not inside a function or method).
For example, the following will produce your error:
NSArray * foo = [NSArray array];
int main(int argc, char * argv[]) {
return 0;
}
To fix it, you'd do something like:
NSArray * foo = nil;
int main(int argc, char * argv[]) {
foo = [NSArray array];
return 0;
}