WBStatusCell.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. //
  2. // WBFeedCell.h
  3. // YYKitExample
  4. //
  5. // Created by ibireme on 15/9/5.
  6. // Copyright (c) 2015 ibireme. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "YYKit.h"
  10. #import "WBStatusLayout.h"
  11. #import "YYTableViewCell.h"
  12. #import "CommonStatusView.h"
  13. //#import "CommonLocationView.h"
  14. #import "CommonLevelView.h"
  15. #import "CommonSexView.h"
  16. //#import "clp"
  17. #import <CLPlayer/CLPlayerView.h>
  18. @class BogoDynamicAudioButton;
  19. @class WBStatusCell;
  20. @protocol WBStatusCellDelegate;
  21. @class SpectrumView;
  22. @interface WBStatusProfileView : UIView
  23. @property (nonatomic, strong) UIImageView *avatarView; ///< 头像
  24. @property (nonatomic, strong) UIImageView *avatarBadgeView; ///< 徽章
  25. @property (nonatomic, strong) YYLabel *nameLabel;
  26. @property (nonatomic, strong) YYLabel *sourceLabel;
  27. @property (nonatomic, strong) YYLabel *addressLabel;//地址信息
  28. @property (nonatomic, strong) YYLabel *timeLabel;
  29. @property (nonatomic, strong) UIImageView *backgroundImageView;
  30. @property (nonatomic, strong) UIButton *arrowButton;
  31. @property (nonatomic, strong) UIButton *followButton;
  32. @property (nonatomic, weak) WBStatusCell *cell;
  33. @property(nonatomic, strong) CommonSexView *sexView;
  34. //@property(nonatomic, strong) CommonLevelView *levelView;
  35. //@property(nonatomic, strong) CommonLocationView *locationView;
  36. @property(nonatomic, strong) CommonStatusView *statusView;
  37. @property(nonatomic, strong) UIButton *moreBtn;
  38. //@property (nonatomic, strong) UIButton *deleteBtn; // 删除按钮
  39. //置顶按钮
  40. @property (nonatomic, strong) UIButton *topBtn;
  41. @end
  42. @interface WBStatusTimeView : UIView
  43. @property (nonatomic, strong) YYLabel *timeLabel;
  44. @end
  45. @interface WBStatusCardView : UIView
  46. @property (nonatomic, strong) UIImageView *imageView;
  47. @property (nonatomic, strong) UIImageView *badgeImageView;
  48. @property (nonatomic, strong) YYLabel *label;
  49. @property (nonatomic, strong) UIButton *button;
  50. @property (nonatomic, weak) WBStatusCell *cell;
  51. @property (nonatomic, strong) CLPlayerView *playerView;
  52. @end
  53. @interface WBStatusLocationView : UIView
  54. @property (nonatomic, weak) WBStatusCell *cell;
  55. - (void)setWithLayout:(WBStatusLayout *)layout;
  56. @end
  57. @interface WBStatusCommentBtn : UIControl
  58. @end
  59. @interface WBStatusToolbarView : UIView
  60. @property(nonatomic, strong) NSMutableArray *likeSubviews;
  61. @property(nonatomic, strong) QMUIButton *praiseBtn;
  62. @property(nonatomic, strong) QMUIButton *commentBtn;
  63. @property (nonatomic, weak) WBStatusCell *cell;
  64. - (void)setWithLayout:(WBStatusLayout *)layout;
  65. // set both "liked" and "likeCount"
  66. - (void)setLiked:(BOOL)liked withAnimation:(BOOL)animation;
  67. @end
  68. @interface WBStatusView : UIView
  69. @property (nonatomic, strong) UIView *contentView; // 容器
  70. @property (nonatomic, strong) WBStatusProfileView *profileView; // 用户资料
  71. @property (nonatomic, strong) YYLabel *textLabel; // 文本
  72. @property (nonatomic, strong) NSArray<UIView *> *picViews; // 图片
  73. @property (nonatomic, strong) UIView *retweetBackgroundView; //转发容器
  74. @property (nonatomic, strong) YYLabel *retweetTextLabel; // 转发文本
  75. @property(nonatomic, strong) WBStatusLocationView *locationView;
  76. @property (nonatomic, strong) WBStatusCardView *cardView; // 卡片
  77. @property (nonatomic, strong) WBStatusTimeView *timeView; // 时间
  78. @property (nonatomic, strong) WBStatusToolbarView *toolbarView; // 工具栏
  79. @property(nonatomic, strong) WBStatusCommentBtn *commentBtn;//评论框
  80. @property (nonatomic, strong) UIImageView *vipBackgroundView; // VIP 自定义背景
  81. @property (nonatomic, strong) UIButton *menuButton; // 菜单按钮
  82. //@property (nonatomic, strong) UIButton *followButton; // 关注按钮
  83. @property (nonatomic, strong) UIButton *deleteBtn; // 删除按钮
  84. @property (nonatomic, strong) UIView *lineView; // 删除按钮
  85. @property (nonatomic, strong) WBStatusLayout *layout;
  86. @property (nonatomic, weak) WBStatusCell *cell;
  87. //@property(nonatomic, strong) BogoDynamicAudioButton *audioBtn;//音频按钮
  88. @property(nonatomic, strong) SpectrumView *trumView;
  89. @property(nonatomic, assign) BOOL isfollow;
  90. @end
  91. @protocol WBStatusCellDelegate;
  92. @interface WBStatusCell : YYTableViewCell
  93. @property (nonatomic, weak) id<WBStatusCellDelegate> delegate;
  94. @property (nonatomic, strong) WBStatusView *statusView;
  95. @property(nonatomic, assign) BOOL isShowMore;
  96. @property(nonatomic, strong) WBStatusLayout *layout;
  97. - (void)setLayout:(WBStatusLayout *)layout;
  98. @property(nonatomic, assign) BOOL isfollow;
  99. @property(nonatomic, assign) NSInteger indexRows;
  100. @end
  101. @protocol WBStatusCellDelegate <NSObject>
  102. @optional
  103. /// 点击了 Cell
  104. - (void)cellDidClick:(WBStatusCell *)cell;
  105. /// 点击了 Card
  106. - (void)cellDidClickCard:(WBStatusCell *)cell;
  107. /// 点击了转发内容
  108. - (void)cellDidClickRetweet:(WBStatusCell *)cell;
  109. /// 点击了Cell菜单
  110. - (void)cellDidClickMenu:(WBStatusCell *)cell;
  111. /// 点击了关注
  112. - (void)cellDidClickFollow:(WBStatusCell *)cell;
  113. /// 点击了转发
  114. - (void)cellDidClickRepost:(WBStatusCell *)cell;
  115. /// 点击了下方 Tag
  116. - (void)cellDidClickTag:(WBStatusCell *)cell;
  117. /// 点击了评论
  118. - (void)cellDidClickComment:(WBStatusCell *)cell;
  119. /// 点击了赞
  120. - (void)cellDidClickLike:(WBStatusCell *)cell;
  121. /// 点击了用户
  122. - (void)cell:(WBStatusCell *)cell didClickUser:(WBModel *)user;
  123. /// 点击了图片
  124. - (void)cell:(WBStatusCell *)cell didClickImageAtIndex:(NSUInteger)index;
  125. /// 点击了 Label 的链接
  126. - (void)cell:(WBStatusCell *)cell didClickInLabel:(YYLabel *)label textRange:(NSRange)textRange;
  127. /// 点击了视频
  128. - (void)cell:(WBStatusCell *)cell didClickVideo:(NSString *)url;
  129. //点击了话题
  130. - (void)cell:(WBStatusCell *)cell didClickTopic:(NSString *)topic;
  131. //点击了更多
  132. - (void)cell:(WBStatusCell *)cell didClickMore:(UIButton *)sender;
  133. //点击了删除
  134. - (void)cell:(WBStatusCell *)cell didClickDeleteBtn:(UIButton *)sender;
  135. //点击了音频
  136. - (void)cell:(WBStatusView *)cell didClickAudio:(UIButton *)sender;
  137. @end