PrefixHeader.pch 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. //
  2. // PrefixHeader.pch
  3. // MusicGradeExam
  4. //
  5. // Created by Kyle on 2020/7/10.
  6. // Copyright © 2020 DayaMusic. All rights reserved.
  7. //
  8. #ifndef PrefixHeader_pch
  9. #define PrefixHeader_pch
  10. #import "Common.h"
  11. #import "NSString+Extension.h"
  12. #import "UIColor+Hex.h"
  13. #import "MBProgressHUD+NJ.h"
  14. #import "UIViewController+zhStatusBarStyle.h"
  15. #import "NSDictionary+Extension.h"
  16. #import "NSString+MD5.h"
  17. #import "UIView+Layout.h"
  18. #import "UIImageView+WebCache.h"
  19. #import "Masonry.h"
  20. #import "MJRefresh.h"
  21. #import "KSRequestManager.h"
  22. #import "IQKeyboardManager.h"
  23. #import "UserKeyHeader.h"
  24. #import <UIView+YYAdd.h>
  25. #import "UIView+ShowProgress.h"
  26. #import "CustomNavViewController.h"
  27. #import "UIControl+ButtonAction.h"
  28. #import "MBProgressHUD+KSShow.h"
  29. #import "Macro.h"
  30. // 加密使用 NSString+MD5
  31. #define DEFAULT_SALT (@"D5sIlPU2")
  32. #define APPSECRET (@"QuMCIKICAgIH0sCiAgICAicGxhdGZvcm0tZGV2IjogW10")
  33. #import "KSSafeObject.h"
  34. //颜色定义
  35. #define Color_Macro(x, y, z, a) [UIColor colorWithRed:x*1.0f/255.0 green:y*1.0f/255.0 blue:z*1.0f/255.0 alpha:a*1.0f]
  36. #define DEFAULT_HEIGHT (40)
  37. #define KObjNull (id)[NSNull null]
  38. #define UserDefault(_key_) [[NSUserDefaults standardUserDefaults] objectForKey:_key_]
  39. #define UserDefaultSet(_value_,_key_) ([[NSUserDefaults standardUserDefaults] setValue:_value_ forKey:_key_])
  40. /**宽度比例*/
  41. #define HBJ_ScaleWidth(__VA_ARGS__) ([UIScreen mainScreen].bounds.size.width/375)*(__VA_ARGS__)
  42. /**高度比例*/
  43. #define HBJ_ScaleHeight(__VA_ARGS__) ([UIScreen mainScreen].bounds.size.height/667)*(__VA_ARGS__)
  44. /**全局字体*/
  45. #define GlobelNormalFont(__VA_ARGS__) ([UIFont systemFontOfSize:HBJ_ScaleFont(__VA_ARGS__)])
  46. /**字体比例*/
  47. #define HBJ_ScaleFont(__VA_ARGS__) ([UIScreen mainScreen].bounds.size.width/375)*(__VA_ARGS__)
  48. #define HexRGB(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]
  49. #define HexRGBAlpha(rgbValue,a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:(a)]
  50. //设备屏幕尺寸
  51. #define kScreen_Height ([UIScreen mainScreen].bounds.size.height)
  52. #define kScreen_Width ([UIScreen mainScreen].bounds.size.width)
  53. #define kScreen_Frame (CGRectMake(0, 0 ,kScreen_Width,kScreen_Height))
  54. #define kScreen_CenterX kScreen_Width/2
  55. #define kScreen_CenterY kScreen_Height/2
  56. //应用尺寸(不包括状态栏,通话时状态栏高度不是20,所以需要知道具体尺寸)
  57. #define kContent_Height ([UIScreen mainScreen].applicationFrame.size.height)
  58. #define kContent_Width ([UIScreen mainScreen].applicationFrame.size.width)
  59. #define kContent_Frame (CGRectMake(0, 0 ,kContent_Width,kContent_Height))
  60. #define kContent_CenterX kContent_Width/2
  61. #define kContent_CenterY kContent_Height/2
  62. #define kWIDTH_RATE (375.0 / kScreen_Width)
  63. #define kHEIGHT_RATE (667.0 / kScreen_Height)
  64. // Include any system framework and library headers here that should be included in all compilation units.
  65. // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
  66. //#ifdef DEBUG
  67. #define hostURL (@"https://test.kj.colexiu.com")
  68. #define SEALCLASSHOST (@"https://test.kj.colexiu.com/api-im")
  69. #define WEBHOST (@"https://test.m.kj.colexiu.com")
  70. #define JSPUSH_ENVIRONMENT (NO)
  71. #define RCIM_KEY (@"mgb7ka1nme0yg")
  72. //#define hostURL (@"http://192.168.3.28:8000")
  73. //#define SEALCLASSHOST (@"http://192.168.3.28:8000/api-im")
  74. //#define WEBHOST (@"https://test.m.kj.colexiu.com")
  75. //#define JSPUSH_ENVIRONMENT (NO)
  76. //#define RCIM_KEY (@"mgb7ka1nme0yg")
  77. //#define hostURL (@"http://195s22s709.imwork.net")
  78. //#define SEALCLASSHOST (@"http://195s22s709.imwork.net/api-im")
  79. //#define WEBHOST (@"https://test.m.kj.colexiu.com")
  80. //#define JSPUSH_ENVIRONMENT (NO)
  81. //#define RCIM_KEY (@"mgb7ka1nme0yg")
  82. //#else // 线上
  83. //#define hostURL (@"https://kj.colexiu.com")
  84. //#define SEALCLASSHOST (@"https://kj.colexiu.com/api-im")
  85. //#define WEBHOST (@"https://m.kj.colexiu.com")
  86. //#define JSPUSH_ENVIRONMENT (YES)
  87. //#define RCIM_KEY (@"8w7jv4qb8zuyy")
  88. //#endif
  89. // Include any system framework and library headers here that should be included in all compilation units.
  90. // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
  91. #endif /* PrefixHeader_pch */