Does Objective-C support #elifdef?
c-preprocessor, objective-c
Solution
You can simply write:
#elif defined X
Which should be compatible with all ANSI-C compatible compilers.
Problem
I can't seem to get `#elifdef` to work in my iOS project. If I do this: ``` #ifdef X const Foo bar[] = { ... }; #else const Foo bar[] = { ,,, }; #endif ``` Then the top one (under X) gets highlighted and the bottom one doesn't. If I do this: ``` #ifdef W const Foo bar[] = { ;;; }; #elifdef X const Foo bar[] = { ... }; #else const Foo bar[] = { ,,, }; #endif ``` Then the bottom one (under else) gets highlighted and the top two don't. Why? Is there another way I should be doing this? I have three targets and they all use the same m file. However, the constants are a bit different for each target so I separate them this way.