What's the best way to define the following ternary operator?
[[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone ? x : y I considered using the macro
#define phonePad(x, y) ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone ? x : y) But this article mentions that it may not be the best idea. Is there a way to do the equivalent using a C function or is this the best way of implementing it?