I am creating UniversalApp programmatically. in my app i have 2 constant class's and on the basis of device i want to import my constant class. but it always open "Constants_iPad" class. even condition is true or false.
#ifndef iPad
#define iPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#endif
#ifndef iPhone
#define iPhone (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad)
#endif
#ifdef iPad ------> always excute this condition either True of False.
#import "Constants_iPad.h" // if device is iPad
#else
#import "Constants_iPhone.h" // if device is iPhone
#endif
When i print on consol using
#ifdef iPad
NSLog(@"iPad = %d",iPad);
#endif
then it print "0" if condition is wrong and if condition is true it print 1