PrefixHeader.pch 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. //
  2. // PrefixHeader.pch
  3. // Starbuds
  4. //
  5. // Created by 翟玉磊 on 2019/12/4.
  6. // Copyright © 2019 翟玉磊. All rights reserved.
  7. //
  8. #ifndef PrefixHeader_pch
  9. #define PrefixHeader_pch
  10. /// 系统框架
  11. #import <UIKit/UIKit.h>
  12. #import <Foundation/Foundation.h>
  13. #import "AppConstEnumHeader.h" /// 枚举、结构体
  14. /// 数据操作
  15. #import "CoreDataManager.h"
  16. #import "DataBase.h"
  17. #import "User+CoreDataClass.h"
  18. #import "Notification+CoreDataClass.h"
  19. #import "Music+CoreDataClass.h"
  20. #import "Medal+CoreDataClass.h"
  21. /// 常用的类
  22. #import "XYAppConfigModel.h" //app配置信息
  23. #import "AppDelegate.h"
  24. #import "AppDelegate+XYShanYan.h"
  25. #import "AppDelegate+XYPush.h" //推送相关
  26. #import "XYUserModel.h" //用户model
  27. #import "XYChannelInfoManager.h"// 渠道信息
  28. #import "XYIMBaseManager.h" //im封装基础类
  29. #import "MessageManagerHeader.h"// 消息管理类
  30. #import "CommonClassHeader.h" // 常用的自定义类
  31. #import "XYLiveManger.h"
  32. #import "XYRichText.h"
  33. #import "NSString+KCExtend.h"
  34. #import "UILabel+ChangeDefaultFont.h"
  35. #import "UIButton+SSEdgeInsets.h"
  36. #import "XYImageTextSelectCommonInfo.h"
  37. #import "StatisticsManager.h"
  38. #pragma mark - 第三方库
  39. /// YYKit
  40. #import "YYCategories.h"
  41. //#import "YYText.h"
  42. #import "YYModel.h"
  43. //#import "YYWebImage.h"
  44. //#import "YYImage.h"
  45. //#import "YYCache.h"
  46. #import <Masonry/Masonry.h> //屏幕适配
  47. #import <UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell.h> //缓存tableViewCell的高度
  48. #import <FDFullscreenPopGesture/UINavigationController+FDFullscreenPopGesture.h> //侧滑手势
  49. //#import <MJExtension/MJExtension.h> // 字典转模型 该项目使用YYModel
  50. #import <MJRefresh/MJRefresh.h> /// 上下拉刷新控件
  51. #import <Colours.h> // 颜色分类
  52. #import <UIImage+ImageWithColor/UIImage+ImageWithColor.h> //根据颜色 生成一张图片
  53. #import <MBProgressHUD/MBProgressHUD.h> //提示view
  54. #import <SVProgressHUD.h> //提示view
  55. //#import <FMDB.h> /// sqlist数据库
  56. /// 消息链
  57. #import <ReactiveObjC/ReactiveObjC.h>
  58. #import <AFNetworking.h> /// 网络请求
  59. #import "UIImageView+WebCache.h" /// 图片请求缓存管理
  60. #import <GPUImage/GPUImage.h> //模糊效果
  61. //#import <TYAttributedLabel/NSMutableAttributedString+TY.h> ///富文本操作
  62. #import <UICollectionViewLeftAlignedLayout.h> /// UICollectionView左对齐布局
  63. #import <Lottie/LOTAnimationView.h> // json动画处理库 (AE动画)
  64. #import <IQKeyboardManager/IQKeyboardManager.h> /// 键盘管理
  65. #import <CHTCollectionViewWaterfallLayout/CHTCollectionViewWaterfallLayout.h> /// 瀑布流
  66. #import "TZImagePickerController.h"
  67. /// 图片浏览器
  68. #import <YBImageBrowser/YBImageBrowser.h>
  69. #import "SDCycleScrollView.h" /// 轮播图
  70. /// header
  71. #import "AppConfigHeader.h" /// APP配置
  72. #import "SizeMacroHeader.h" /// APP尺寸
  73. #import "AppFontHeader.h" /// 文字
  74. #import "AppColorHeader.h" /// 颜色
  75. #import "BaseHeader.h" /// 基础类
  76. #import "VoiceRoomHeader.h" /// 语音房相关配置
  77. #pragma mark - 常用宏
  78. #define ApplicationDelegate ((AppDelegate *)[UIApplication sharedApplication].delegate)
  79. /// IOS系统版本
  80. #define IOS_Version [[[UIDevice currentDevice] systemVersion] floatValue]
  81. /// 判断系统版本是否大于等于x
  82. #define IS_IOS_(x) ((IOS_Version >= x) ? YES : NO)
  83. /// 防止block循环引用
  84. #define WeakSelf __weak __typeof(self)weakSelf = self;
  85. /// 销毁打印
  86. #define ClassDealloc NSLog(@"\n =========+++ %@ 销毁了 +++======== \n",[self class])
  87. // 是否为空对象
  88. #define ObjectIsNil(__object) ((nil == __object) || [__object isKindOfClass:[NSNull class]])
  89. /// 字符串为空
  90. #define StringIsEmpty(__string) ((__string.length == 0) || ObjectIsNil(__string))
  91. // 字符串不为空
  92. #define StringIsNotEmpty(__string) (!StringIsEmpty(__string))
  93. // 数组为空
  94. #define ArrayIsEmpty(__array) ((ObjectIsNil(__array)) || (__array.count==0))
  95. /// AppCaches 文件夹路径
  96. #define CachesDirectory [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject]
  97. /// App DocumentDirectory 文件夹路径
  98. #define DocumentDirectory [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES) lastObject]
  99. /// 设置图片
  100. #define ImageNamed(__imageName) [UIImage imageNamed:__imageName]
  101. /// 字符串转URL
  102. #define UrlForString(__urlString) [NSURL URLWithString:__urlString]
  103. /// 通知中心
  104. #define NotificationCenter [NSNotificationCenter defaultCenter]
  105. /// 本地保存NSUserDefaults
  106. #define UserDefaults [NSUserDefaults standardUserDefaults]
  107. #define kLocalizedString(string) [NSString kcLocalizedString:string]
  108. #define kXYLanguageSet @"XYLanguageSet"
  109. #pragma mark - Log宏
  110. /// 输出日志 (格式: [时间] [哪个方法] [哪行] [输出内容])
  111. #ifdef DEBUG
  112. #define NSLog(format, ...) printf("\n[%s] %s [第%d行] 💕 %s\n", __TIME__, __FUNCTION__, __LINE__, [[NSString stringWithFormat:format, ##__VA_ARGS__] UTF8String]);
  113. #else
  114. #define NSLog(format, ...)
  115. #endif
  116. /// 打印方法
  117. #define LogFunc NSLog(@"%s", __func__)
  118. /// 适配iPhone X + iOS 11
  119. #define AdjustsScrollViewInsets_Never(__scrollView)\
  120. do {\
  121. _Pragma("clang diagnostic push")\
  122. _Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"")\
  123. if ([__scrollView respondsToSelector:NSSelectorFromString(@"setContentInsetAdjustmentBehavior:")]) {\
  124. NSMethodSignature *signature = [UIScrollView instanceMethodSignatureForSelector:@selector(setContentInsetAdjustmentBehavior:)];\
  125. NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];\
  126. NSInteger argument = 2;\
  127. invocation.target = __scrollView;\
  128. invocation.selector = @selector(setContentInsetAdjustmentBehavior:);\
  129. [invocation setArgument:&argument atIndex:2];\
  130. [invocation retainArguments];\
  131. [invocation invoke];\
  132. }\
  133. _Pragma("clang diagnostic pop")\
  134. } while (0)
  135. #endif /* PrefixHeader_pch */