Created
September 11, 2013 06:56
-
-
Save avdyushin/6520137 to your computer and use it in GitHub Desktop.
Detect which device is running app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define is_iPad ( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ) | |
#define is_iPhone ( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone ) | |
#define is_iPhone5 ( is_iPhone && [[UIScreen mainScreen] bounds].size.height == 568.0f ) | |
#define is_Retina ( [[UIScreen mainScreen] scale] == 2.0f ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment