AICity.pch 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //
  2. // AICity.pch
  3. // AICity
  4. //
  5. // Created by wei.z on 2019/7/16.
  6. // Copyright © 2019 wei.z. All rights reserved.
  7. //
  8. #ifndef AICity_pch
  9. #define AICity_pch
  10. #define kScreenWidth [UIScreen mainScreen].bounds.size.width
  11. #define kScreenHeight [UIScreen mainScreen].bounds.size.height
  12. #define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
  13. #define kScreenBounds [UIScreen mainScreen].bounds
  14. #define UIColorWithRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
  15. #define UIColorWithRGBA(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
  16. #define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
  17. //#define iphoneX ([[UIScreen mainScreen] bounds].size.height>736.0f)
  18. /**
  19. *状态栏高度
  20. */
  21. #define STATE_BAR_NORMAL [[UIApplication sharedApplication] statusBarFrame].size.height
  22. /**
  23. *导航栏高度
  24. */
  25. #define NAV_HEIGHT (iphoneX ? 88 : 64)
  26. /**
  27. *tabbar高度
  28. */
  29. #define BAR_HEIGHT (iphoneX ? 83 : 49)
  30. #define safetop (iphoneX ? 44 : 0)
  31. #define safebottom (iphoneX ? 34 : 0)
  32. #define nkScreenWidthRatio (kScreenWidth / 375.0)
  33. #define nkScreenHeightRatio (iphoneX ? nkScreenWidthRatio : (kScreenHeight / 667.0))
  34. #define nAdaptedWidthValue(x) (ceilf((x) * nkScreenWidthRatio))
  35. #define nAdaptedHeightValue(x) (ceilf((x) * nkScreenHeightRatio))
  36. #define nAdaptedCommonValue(x) (ceilf((x) * nkScreenWidthRatio))
  37. #define nAdaptedSystemFontWithSize(R) [UIFont systemFontOfSize:(nAdaptedWidthValue(R))]
  38. #define nAdaptedBoldSystemFontWithSize(R) [UIFont boldSystemFontOfSize:(nAdaptedWidthValue(R))]
  39. #define COLOR(a,b,c,d) [UIColor colorWithRed:a/255.0 green:b/255.0 blue:c/255.0 alpha:d]
  40. #define rgba(a,b,c,d) [UIColor colorWithRed:a/255.0 green:b/255.0 blue:c/255.0 alpha:d]
  41. #define iphoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? ((NSInteger)(([[UIScreen mainScreen] currentMode].size.height/[[UIScreen mainScreen] currentMode].size.width)*100) == 216) : NO)
  42. #define ISIPHONE_X ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? ((NSInteger)(([[UIScreen mainScreen] currentMode].size.height/[[UIScreen mainScreen] currentMode].size.width)*100) == 216) : NO)
  43. /// 导航栏高度
  44. #define KNavBarHeight ISIPHONE_X ? 88 : 64
  45. #define kAPPDelegate ((ZFAppDelegate*)[[UIApplication sharedApplication] delegate])
  46. /// 播放器view的tag,列表中UI控件唯一tag值
  47. #define kPlayerViewTag 100
  48. #ifndef BASE_API_URL
  49. #define BASE_API_URL @"http://192.168.110.66:8888/"
  50. #endif
  51. #import <Masonry/Masonry.h>
  52. #import "UINavigationController+FDFullscreenPopGesture.h"
  53. #import "RequestTool.h"
  54. #import "UserModel.h"
  55. #import <SDWebImage/SDWebImage.h>
  56. #import <MBProgressHUD.h>
  57. #import "MBProgressHUD+MJ.h"
  58. #import "GDNavigationController.h"
  59. #import "MJExtension.h"
  60. #endif /* AICity_pch */