When working in Objective-C, when is it appropriate to use preprocessor directives like
#ifdef, #if, #ifndef, and #define instead of statements like if() and switch()?
When working in Objective-C, when is it appropriate to use preprocessor directives like #ifdef
Share
Preprocessor directives like
#ifdef, etc. are only valid at compile time. They are not able to make decisions or loops at runtime. They simply regulate what gets compiled and what not.They are totally useless at runtime. They serve a totally different purpose.