macro.h 857 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // macro.h
  3. // UU_Ent
  4. //
  5. // Created by liujl on 2019/4/30.
  6. // Copyright © 2019 UAS. All rights reserved.
  7. //
  8. #ifndef macro_h
  9. #define macro_h
  10. //日志输出
  11. #ifdef DEBUG
  12. #define DLog(...) NSLog(__VA_ARGS__)
  13. #else
  14. #define DLog(...)
  15. #endif
  16. //当前控制器的宽高度
  17. #define self_width self.view.frame.size.width
  18. #define self_height self.view.frame.size.height
  19. //颜色
  20. #define HexColor(h) [UIColor colorWithHexString:(h)]
  21. #define RGB(r, g, b) [UIColor colorWithRed:((r) / 255.0) green:((g) / 255.0) blue:((b) / 255.0) alpha:1.0]
  22. //屏幕的宽高度
  23. #define kWidth [UIScreen mainScreen].bounds.size.width
  24. #define kHeight [UIScreen mainScreen].bounds.size.height
  25. //系统版本
  26. #define iOS11Early [[[UIDevice currentDevice] systemVersion] floatValue] < 11.0
  27. //字体
  28. #define FONT_SIZE(size) [UIFont systemFontOfSize:size]
  29. #endif /* macro_h */