Predefine.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // Predefine.h
  3. // WFChat UIKit
  4. //
  5. // Created by WF Chat on 2017/10/29.
  6. // Copyright © 2017年 WildFireChat. All rights reserved.
  7. //
  8. #ifndef Predefine_h
  9. #define Predefine_h
  10. #define IOS_SYSTEM_VERSION_LESS_THAN(v) \
  11. ([[[UIDevice currentDevice] systemVersion] \
  12. compare:v \
  13. options:NSNumericSearch] == NSOrderedAscending)
  14. #define RGBCOLOR(r, g, b) [UIColor colorWithRed:(r) / 255.0f green:(g) / 255.0f blue:(b) / 255.0f alpha:1]
  15. #define RGBACOLOR(r, g, b, a) [UIColor colorWithRed:(r) / 255.0f green:(g) / 255.0f blue:(b) / 255.0f alpha:(a)]
  16. #define HEXCOLOR(rgbValue) \
  17. [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 \
  18. green:((float)((rgbValue & 0xFF00) >> 8)) / 255.0 \
  19. blue:((float)(rgbValue & 0xFF)) / 255.0 \
  20. alpha:1.0]
  21. #define SDColor(r, g, b, a) [UIColor colorWithRed:(r / 255.0) green:(g / 255.0) blue:(b / 255.0) alpha:a]
  22. #define Global_tintColor [UIColor colorWithRed:0 green:(190 / 255.0) blue:(12 / 255.0) alpha:1]
  23. #define Global_mainBackgroundColor SDColor(248, 248, 248, 1)
  24. #define TimeLineCellHighlightedColor [UIColor colorWithRed:92/255.0 green:140/255.0 blue:193/255.0 alpha:1.0]
  25. #define DAY @"day"
  26. #define NIGHT @"night"
  27. //是否iPhoneX YES:iPhoneX屏幕 NO:传统屏幕
  28. #define kIs_iPhoneX ([UIScreen mainScreen].bounds.size.height == 812.0f ||[UIScreen mainScreen].bounds.size.height == 896.0f )
  29. #define kStatusBarAndNavigationBarHeight (kIs_iPhoneX ? 88.f : 64.f)
  30. #define kTabbarSafeBottomMargin (kIs_iPhoneX ? 34.f : 0.f)
  31. #define kMessageListChanged @"kMessageListChanged"
  32. #endif /* Predefine_h */