BUDMacros.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // BUDMacros.h
  3. // BUAdSDKDemo
  4. //
  5. // Created by bytedance_yuanhuan on 2018/10/11.
  6. // Copyright © 2018年 bytedance. All rights reserved.
  7. //
  8. #ifndef BUDMacros_h
  9. #define BUDMacros_h
  10. #import <BUFoundation/BUFoundation.h>
  11. #define mainColor BUD_RGB(0xff, 0x63, 0x5c)
  12. #define unValidColor BUD_RGB(0xd7, 0xd7, 0xd7)
  13. #define titleBGColor BUD_RGB(73, 15, 15)
  14. #define selectedColor [UIColor colorWithRed:(73/255.0) green:(15/255.0) blue:(15/255.0) alpha:0.8]
  15. #define BUD_RGB(r,g,b) [UIColor colorWithRed:(r/255.0) green:(g/255.0) blue:(b/255.0) alpha:1]
  16. /// iphone X、XR、XS、XS Max适配
  17. #ifndef BUDMINScreenSide
  18. #define BUDMINScreenSide MIN([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)
  19. #endif
  20. #ifndef BUDMAXScreenSide
  21. #define BUDMAXScreenSide MAX([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)
  22. #endif
  23. #define BUDiPhoneX BUIsNotchScreen
  24. #define NavigationBarHeight (BUDiPhoneX? 88: 64) // 导航条高度
  25. #define TopMargin (BUDiPhoneX? 24: 0)
  26. #define BottomMargin (BUDiPhoneX? 40: 0) // 状态栏高度
  27. #define BUD_Log(frmt, ...) \
  28. do { \
  29. NSLog(@"【BUAdDemo】%@", [NSString stringWithFormat:frmt,##__VA_ARGS__]); \
  30. } while(0)
  31. #ifndef BUDNativeAdTranslateKey
  32. #define BUDNativeAdTranslateKey @"bu_nativeAd"
  33. #endif
  34. #endif /* BUDMacros_h */