Be Careful: If your app is targeting iPhone device only, iPad running with iphone compatible mode will return false for below statement:
#define IPAD UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad
The right way to detect physical iPad device is:
#define IS_IPAD_DEVICE ([(NSString *)[UIDevice currentDevice].model hasPrefix:@"iPad"])