MHConstant.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. //
  2. // MHConstant.h
  3. // MHDevelopExample
  4. //
  5. // Created by CoderMikeHe on 17/2/7.
  6. // Copyright © 2017年 CoderMikeHe. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. /**
  11. * 通知中心
  12. */
  13. #define MHNotificationCenter [NSNotificationCenter defaultCenter]
  14. /**
  15. * 设置颜色
  16. */
  17. #define MHColorFromHexString(__hexString__) [UIColor colorFromHexString:__hexString__]
  18. /**
  19. * 全局灰色色字体颜色 + placeHolder字体颜色
  20. */
  21. #define MHGlobalGrayTextColor [UIColor colorFromHexString:@"#999999"]
  22. /**
  23. * 全局白色字体
  24. */
  25. #define MHGlobalWhiteTextColor [UIColor colorFromHexString:@"#ffffff"]
  26. /**
  27. * 全局黑色字体
  28. */
  29. #define MHGlobalBlackTextColor [UIColor colorFromHexString:@"#323232"]
  30. /**
  31. * 全局浅黑色字体
  32. */
  33. #define MHGlobalShadowBlackTextColor [UIColor colorFromHexString:@"#646464"]
  34. /**
  35. * 全局灰色 背景
  36. */
  37. #define MHGlobalGrayBackgroundColor [UIColor colorFromHexString:@"#f8f8f8"]
  38. /**
  39. * 全局细下滑线颜色 以及分割线颜色
  40. */
  41. #define MHGlobalBottomLineColor [UIColor colorFromHexString:@"#d6d7dc"]
  42. /**
  43. * 全局橙色
  44. */
  45. #define MHGlobalOrangeTextColor [UIColor colorFromHexString:@"#FF9500"]
  46. /**
  47. * 全局细线高度 .75f
  48. */
  49. UIKIT_EXTERN CGFloat const MHGlobalBottomLineHeight;
  50. /**
  51. * UIView 动画时长
  52. */
  53. UIKIT_EXTERN NSTimeInterval const MHAnimateDuration ;
  54. /**
  55. * 全局控制器顶部间距 10
  56. */
  57. UIKIT_EXTERN CGFloat const MHGlobalViewTopInset;
  58. /**
  59. * 全局控制器左边间距 12
  60. */
  61. UIKIT_EXTERN CGFloat const MHGlobalViewLeftInset;
  62. /**
  63. * 全局控制器中间间距 10
  64. */
  65. UIKIT_EXTERN CGFloat const MHGlobalViewInterInset;
  66. /**
  67. * 全局默认头像
  68. */
  69. #define MHGlobalUserDefaultAvatar [UIImage imageNamed:@"mh_defaultAvatar"]
  70. //// 字体
  71. /// 苹方常规字体 12
  72. #define MHRegularFont_12 MHRegularFont(12.0f)
  73. /// 苹方常规字体 13
  74. #define MHRegularFont_13 MHRegularFont(13.0f)
  75. /** 苹方常规字体 14 */
  76. #define MHRegularFont_14 MHRegularFont(14.0f)
  77. /// 苹方常规字体 15
  78. #define MHRegularFont_15 MHRegularFont(15.0f)
  79. /// 苹方常规字体 16
  80. #define MHRegularFont_16 MHRegularFont(16.0f)
  81. /// 苹方常规字体 17
  82. #define MHRegularFont_17 MHRegularFont(17.0f)
  83. /// 苹方常规字体 18
  84. #define MHRegularFont_18 MHRegularFont(18.0f)
  85. // 父子控制器
  86. /** 百思不得姐 -顶部标题的高度 */
  87. UIKIT_EXTERN CGFloat const MHTitilesViewH;
  88. /** 百思不得姐-顶部标题的Y */
  89. UIKIT_EXTERN CGFloat const MHTitilesViewY;
  90. /** 网易新闻-颜色 R、G、B、A*/
  91. UIKIT_EXTERN CGFloat const MHTopicLabelRed;
  92. UIKIT_EXTERN CGFloat const MHTopicLabelGreen;
  93. UIKIT_EXTERN CGFloat const MHTopicLabelBlue;
  94. UIKIT_EXTERN CGFloat const MHTopicLabelAlpha;
  95. // 仿微信朋友圈评论和回复
  96. // 段头+cell+表头
  97. /** 话题头像宽高 */
  98. UIKIT_EXTERN CGFloat const MHTopicAvatarWH ;
  99. /** 话题水平方向间隙 */
  100. UIKIT_EXTERN CGFloat const MHTopicHorizontalSpace;
  101. /** 话题垂直方向间隙 */
  102. UIKIT_EXTERN CGFloat const MHTopicVerticalSpace ;
  103. /** 话题更多按钮宽 */
  104. UIKIT_EXTERN CGFloat const MHTopicMoreButtonW ;
  105. /** 话题内容字体大小 */
  106. #define MHTopicTextFont MHMediumFont(12.0f)
  107. /** 话题昵称字体大小 */
  108. #define MHTopicNicknameFont MHMediumFont(10.0f)
  109. /** 话题点赞字体大小 */
  110. #define MHTopicThumbFont MHMediumFont(10.0f)
  111. /** 话题时间字体大小 */
  112. #define MHTopicCreateTimeFont MHMediumFont(10.0f)
  113. /** 评论水平方向间隙 */
  114. UIKIT_EXTERN CGFloat const MHCommentHorizontalSpace ;
  115. /** 评论垂直方向间隙 */
  116. UIKIT_EXTERN CGFloat const MHCommentVerticalSpace;
  117. /** 评论内容字体大小 */
  118. #define MHCommentTextFont MHMediumFont(12.0f)
  119. /** 文本行高 */
  120. UIKIT_EXTERN CGFloat const MHCommentContentLineSpacing;
  121. /** 评论假数据 */
  122. UIKIT_EXTERN NSString * const MHAllCommentsId ;
  123. /** 评论用户的key */
  124. UIKIT_EXTERN NSString * const MHCommentUserKey ;
  125. /** 评论高度 */
  126. UIKIT_EXTERN CGFloat const MHCommentHeaderViewHeight;
  127. /** 评论工具高度 */
  128. UIKIT_EXTERN CGFloat const MHCommentToolBarHeight ;
  129. /** 最大字数 */
  130. UIKIT_EXTERN NSInteger const MHCommentMaxWords ;
  131. /** 每页数据 */
  132. UIKIT_EXTERN NSUInteger const MHCommentMaxCount ;
  133. /** 弹出评论框View最小距离 */
  134. UIKIT_EXTERN CGFloat const MHTopicCommentToolBarMinHeight ;
  135. /** 弹出评论框View的除了编辑框的高度 */
  136. UIKIT_EXTERN CGFloat const MHTopicCommentToolBarWithNoTextViewHeight ;
  137. /** 视频评论成功的通知 */
  138. UIKIT_EXTERN NSString * const MHCommentSuccessNotification ;
  139. /** 视频评论成功Key */
  140. UIKIT_EXTERN NSString * const MHCommentSuccessKey ;
  141. /** 视频点赞成功的通知 */
  142. UIKIT_EXTERN NSString * const MHThumbSuccessNotification ;
  143. /** 视频评论回复成功的通知 */
  144. UIKIT_EXTERN NSString * const MHCommentReplySuccessNotification ;
  145. /** 视频评论回复成功Key */
  146. UIKIT_EXTERN NSString * const MHCommentReplySuccessKey ;
  147. /** 视频评论获取成功的事件 */
  148. UIKIT_EXTERN NSString * const MHCommentRequestDataSuccessNotification ;
  149. /** 视频评论获取成功的事件 */
  150. UIKIT_EXTERN NSString * const MHCommentRequestDataSuccessKey ;
  151. /** 弹出评论框View距离顶部的最小高度 */
  152. #define MHTopicCommentToolBarMinTopInset (MHMainScreenWidth * 9.0f/16.0f + 20)
  153. /** titleView高度 */
  154. UIKIT_EXTERN CGFloat const MHRecommendTitleViewHeight;
  155. /** 选集view高度 */
  156. UIKIT_EXTERN CGFloat const MHRecommendAnthologyViewHeight;
  157. /** 选集纯文本HeaderView高度 */
  158. UIKIT_EXTERN CGFloat const MHRecommendAnthologyHeaderViewHeight;
  159. /** 评论高度 */
  160. UIKIT_EXTERN CGFloat const MHRecommendCommentHeaderViewHeight;