WclAppConfig.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // WclAppConfig.h
  3. // smartRhino
  4. //
  5. // Created by armin on 2019/11/2.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #ifndef WclAppConfig_h
  9. #define WclAppConfig_h
  10. //wcl add
  11. #define kNavigationHeight (44+kStatusBarHeight)
  12. #define kiphoneXBootomHeight (kBooliPhoneX==YES?34:0)
  13. #define kBooliPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? ((NSInteger)(([[UIScreen mainScreen] currentMode].size.height/[[UIScreen mainScreen] currentMode].size.width)*100) == 216) : NO)
  14. #define kTabBarHeight (kBooliPhoneX==YES?83:49)
  15. #define kStatusBarHeight (kBooliPhoneX==YES?44:20)
  16. #define SafeAreaBottomHeight ((kScreenHeight >= 812.0) && [[UIDevice currentDevice].model isEqualToString:@"iPhone"] ? 30 : 0)
  17. #define SafeBottom (([[UIScreen mainScreen] bounds].size.height<812) ? 0 : 43)
  18. #define RGB(R,G,B) [UIColor colorWithRed:R/255.0f green:G/255.0f blue:B/255.0f alpha:1.0f]
  19. #define RGBA(R,G,B,A) [UIColor colorWithRed:R/255.0f green:G/255.0f blue:B/255.0f alpha:A]
  20. #define kColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
  21. #define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
  22. #define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height
  23. #define Kfont(size) [UIFont systemFontOfSize:size]
  24. #define kColorFromRGBAlpha(rgbValue,al) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:al]
  25. #define IOS11_OR_LATER ([[UIDevice currentDevice].systemVersion floatValue] >= 11.0f)
  26. #define IOS10_OR_LATER ([[UIDevice currentDevice].systemVersion floatValue] >= 10.0f)
  27. #define IOS9_OR_LATER ([[UIDevice currentDevice].systemVersion floatValue] >= 9.0f)
  28. #define IOS8_OR_LATER ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0f)
  29. #define IOS7_OR_LATER ([[UIDevice currentDevice].systemVersion floatValue] >= 7.0f)
  30. #define IOS6_OR_LATER ([[UIDevice currentDevice].systemVersion floatValue] >= 6.0f)
  31. #define IOS5_OR_LATER ([[UIDevice currentDevice].systemVersion floatValue] >= 5.0f)
  32. #endif /* WclAppConfig_h */