Last active
August 29, 2015 14:08
-
-
Save Sunnyztj/8b23cd588add18fe00aa to your computer and use it in GitHub Desktop.
IOS config file
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 TimeZone [[NSTimeZone localTimeZone] name] | |
#define IS_IPHONE_6_PLUS ([[UIScreen mainScreen] respondsToSelector:@selector(nativeScale)] && [UIScreen mainScreen].nativeScale > 2.1) | |
#define IS_IPHONE_4 (fabs((double)[[UIScreen mainScreen]bounds].size.height - (double)480) < DBL_EPSILON) | |
#define IS_IPHONE_5 (fabs((double)[[UIScreen mainScreen]bounds].size.height - (double)568) < DBL_EPSILON) | |
#define IS_IPHONE_6 (fabs((double)[[UIScreen mainScreen]bounds].size.height - (double)667) < DBL_EPSILON) | |
#define IS_IPHONE5 (([[UIScreen mainScreen] bounds].size.height-568)?NO:YES) | |
#define IS_OS_5_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 5.0) | |
#define IS_OS_6_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0) | |
#define IS_OS_7_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) | |
#define IS_OS_8_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) | |
#define IS_IOS_6 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0 && [[[UIDevice currentDevice] systemVersion] floatValue] < 7.0) | |
#define IS_IOS_7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0 && [[[UIDevice currentDevice] systemVersion] floatValue] < 8.0) | |
#define IS_IOS_8 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0 && [[[UIDevice currentDevice] systemVersion] floatValue] < 9.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment