MyDefHeader.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. //简单setFrame
  21. #define setxywh initWithFrame:CGRectMake(x, y, w, h)
  22. #define setDIYFrame CGRectMake(x, y, w, h)
  23. #define FontLarger 21
  24. #define FontTitle 18
  25. #define Font17 17
  26. #define NormalFont 15
  27. #define SmallFont 10
  28. #define RGB_COLOR(R, G, B) [UIColor colorWithRed:((R) / 255.0f) green:((G) / 255.0f) blue:((B) / 255.0f) alpha:1.0f]
  29. #ifdef RGB_COLOR//(R, G, B)
  30. #define COLOR_THEME RGB_COLOR(40, 152, 255)
  31. #define KBackGroundColor RGB_COLOR(247, 247, 247)
  32. #define CGCOLOR_LINE RGB_COLOR(136,136,136).CGColor
  33. #endif
  34. //版本判定
  35. #define iOS8 ([UIDevice currentDevice].systemVersion.floatValue >= 8.0f)
  36. #define iOS10 ([UIDevice currentDevice].systemVersion.floatValue >= 10.0f)
  37. #define iOS11 @available(iOS 11.0, *)
  38. #define kDevice_Is_iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125,2436), [[UIScreen mainScreen] currentMode].size) : NO)
  39. //
  40. #define HUD_MARGIN 20 //默认是20。mb内容到边的距离
  41. //
  42. #define unOpenMsg @"暂未开放,敬请期待"
  43. #define BAIDU_APPKEY @"oGh8jIMr5em4PGjEpGKPyNpyMGjVvGrg"
  44. typedef void (^BlockTypeVo)(void);
  45. typedef void (^MyBlockType)(id);
  46. #endif /* MyDefHeader_h */