I'm figuring out how to determine iOS device types and came across this solution: https://stackoverflow.com/a/16319767/440646
The line of question:
#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
I read that #define is a preprocessor that get evaluated before compilation, so is the UI_USER_INTERFACE_IDIOM()
statement.
My question is how does the compiler knows which device to compile for, since we'll only get to know which device a user is using during runtime?