T1StatusCell.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. //
  2. // T1StatusCell.h
  3. // YYKitExample
  4. //
  5. // Created by ibireme on 15/10/9.
  6. // Copyright (C) 2015 ibireme. All rights reserved.
  7. //
  8. #import "YYTableViewCell.h"
  9. #import "YYKit.h"
  10. #import "T1StatusLayout.h"
  11. #import "YYControl.h"
  12. @class T1StatusCell;
  13. @interface T1StatusMediaView : YYControl
  14. @property (nonatomic, strong) NSArray<UIImageView *> *imageViews;
  15. @property (nonatomic, weak) T1StatusCell *cell;
  16. @end
  17. @interface T1StatusQuoteView : YYControl
  18. @property (nonatomic, strong) YYLabel *nameLabel;
  19. @property (nonatomic, strong) YYLabel *textLabel;
  20. @property (nonatomic, weak) T1StatusCell *cell;
  21. @end
  22. @interface T1StatusInlineActionsView : UIView
  23. @property (nonatomic, strong) UIButton *replyButton;
  24. @property (nonatomic, strong) UIButton *retweetButton;
  25. @property (nonatomic, strong) UIImageView *retweetImageView;
  26. @property (nonatomic, strong) YYLabel *retweetLabel;
  27. @property (nonatomic, strong) UIButton *favoriteButton;
  28. @property (nonatomic, strong) YYAnimatedImageView *favoriteImageView;
  29. @property (nonatomic, strong) YYLabel *favoriteLabel;
  30. @property (nonatomic, strong) UIButton *followButton;
  31. @property (nonatomic, weak) T1StatusCell *cell;
  32. - (void)updateRetweetWithAnimation;
  33. - (void)updateFavouriteWithAnimation;
  34. - (void)updateFollowWithAnimation;
  35. @end
  36. @interface T1StatusView : YYControl
  37. @property (nonatomic, strong) UIView *topLine;
  38. @property (nonatomic, strong) UIImageView *socialIconView;
  39. @property (nonatomic, strong) YYLabel *socialLabel;
  40. @property (nonatomic, strong) YYControl *avatarView;
  41. @property (nonatomic, strong) UIView *conversationTopJoin;
  42. @property (nonatomic, strong) UIView *conversationBottomJoin;
  43. @property (nonatomic, strong) YYLabel *nameLabel;
  44. @property (nonatomic, strong) YYLabel *dateLabel;
  45. @property (nonatomic, strong) YYLabel *textLabel;
  46. @property (nonatomic, strong) T1StatusMediaView *mediaView;
  47. @property (nonatomic, strong) T1StatusQuoteView *quoteView;
  48. @property (nonatomic, strong) T1StatusInlineActionsView *inlineActionsView;
  49. @property (nonatomic, weak) T1StatusCell *cell;
  50. @end
  51. @protocol T1StatusCellDelegate <NSObject>
  52. @optional
  53. - (void)cell:(T1StatusCell *)cell didClickInLabel:(YYLabel *)label textRange:(NSRange)textRange;
  54. - (void)cell:(T1StatusCell *)cell didClickImageAtIndex:(NSUInteger)index withLongPress:(BOOL)longPress;
  55. - (void)cell:(T1StatusCell *)cell didClickQuoteWithLongPress:(BOOL)longPress;
  56. - (void)cell:(T1StatusCell *)cell didClickAvatarWithLongPress:(BOOL)longPress;
  57. - (void)cell:(T1StatusCell *)cell didClickContentWithLongPress:(BOOL)longPress;
  58. - (void)cellDidClickReply:(T1StatusCell *)cell;
  59. - (void)cellDidClickRetweet:(T1StatusCell *)cell;
  60. - (void)cellDidClickFavorite:(T1StatusCell *)cell;
  61. - (void)cellDidClickFollow:(T1StatusCell *)cell;
  62. @end
  63. @interface T1StatusCell : YYTableViewCell
  64. @property (nonatomic, strong) T1StatusView *statusView;
  65. @property (nonatomic, strong) T1StatusLayout *layout;
  66. @property (nonatomic, weak) id<T1StatusCellDelegate> delegate;
  67. @end