MyDefHeader.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // MyDefHeader.h
  3. // LNManager
  4. //
  5. // Created by EchoShacolee on 2017/4/6.
  6. // Copyright © 2017年 lee. All rights reserved.
  7. //
  8. #ifndef MyDefHeader_h
  9. #define MyDefHeader_h
  10. //
  11. #define KWINDOW [UIApplication sharedApplication].keyWindow
  12. #define MYAPPDELEGATE ((AppDelegate* )[[UIApplication sharedApplication]delegate])
  13. //
  14. #define kSize [[UIScreen mainScreen]bounds].size
  15. #define kFrame [[UIScreen mainScreen]bounds]
  16. #define kStatusHeight (kSize.height == 812.0 ? 44 : 20)
  17. #define kTabBarHeight (kSize.height == 812.0 ? 83 : 49)
  18. #define kNavOffSet (kSize.height == 812.0 ? 88 : 64)
  19. #define SafeAreaBottomHeight (kSize.height == 812.0 ? 34 : 0)
  20. //版本判定
  21. #define iOS8 ([UIDevice currentDevice].systemVersion.floatValue >= 8.0f)
  22. #define iOS10 ([UIDevice currentDevice].systemVersion.floatValue >= 10.0f)
  23. #define iOS11 @available(iOS 11.0, *)
  24. //简单setFrame
  25. #define KSetxywh initWithFrame:CGRectMake(x, y, w, h)
  26. #define setDIYFrame CGRectMake(x, y, w, h)
  27. #define FontLarger 21
  28. #define FontTitle 18
  29. #define Font17 17
  30. #define NormalFont 15
  31. #define SmallFont 10
  32. //
  33. //#define KBackGroundColor [UIColor colorWithRed:247/255.0 green:247/255.0 blue:247/255.0 alpha:1]
  34. //#define CGCOLOR_LINE [UIColor colorWithRed:136/255.0f green:136/255.0f blue:136/255.0f alpha:1].CGColor
  35. #define RGB_COLOR(R, G, B) [UIColor colorWithRed:((R) / 255.0f) green:((G) / 255.0f) blue:((B) / 255.0f) alpha:1.0f]
  36. #ifdef RGB_COLOR//(R, G, B)
  37. #define COLOR_THEME RGB_COLOR(40, 152, 255)
  38. #define KBackGroundColor RGB_COLOR(247, 247, 247)
  39. #define CGCOLOR_LINE RGB_COLOR(136,136,136).CGColor
  40. #endif
  41. //
  42. #define HUD_MARGIN 20 //默认是20。mb内容到边的距离
  43. //
  44. #define unOpenMsg @"暂未开放,敬请期待"
  45. typedef void (^BlockTypeVo)(void);
  46. typedef void (^MyBlockType)(id);
  47. #endif /* MyDefHeader_h */