How to use define macros iOS
ios
Solution
`#ifdef` doesn't really do what you want here.
A good solution would be:
#define ROWCOUNT ((UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) ? 5 : 12)
Problem
I need to make a define but if I use iPad or iPhone I need different values in this case. So, as I think it should looks like this: ``` #ifdef UI_USER_INTERFACE_IDIOM == iPAD #define ROWCOUNT 12 #else #define ROWCOUNT 5 #endif ``` Is there some solution to get it?