I have implemented this code for defining my constants:

```
#ifdef UI_USER_INTERFACE_IDIOM
#define IS_IPAD() (UI_USER_INTERFACE_IDIOM == UIUserInterfaceIdiomPad)
#else
#define IS_IPAD() (false)
#endif

#if (IS_IPAD)
CGFloat const scrollSizeWidth = 768.0f;
CGFloat const scrollSizeHeight = 1004.0f;
#else
CGFloat const scrollSizeWidth = 320.0f;
CGFloat const scrollSizeHeight = 460.0f;
#endif

```

But it always display **320.0f** and **460.0f** for my variables.

**UPDATE:**
As k3a user found UI\_USER\_INTERFACE\_IDIOM does not work for iOS 8.3, because it's not longer a define it's a static inline.

Check this answer as well:
[link](https://stackoverflow.com/questions/29608613/how-can-i-detect-if-device-is-an-ipad-in-ios-8-2-3-xcode-6-3)