Define constant based on device type

Viewed 3817

I have a Constants.h file which contains some global constants in fact. Since my application is built both for iPhone and iPad, i would like to define the same constants (ie with the same name) differently for the two device types.

For a complete explanation:

/******** pseudo code *********/

if (deviceIsIPad){
    #define kPageMargin 20
}
else {
    #define kPageMargin 10
}

How can I do this? Thanks.

L.

5 Answers
Related