CYGroupSendHelperCell.m 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // CYGroupSendHelperCell.m
  3. // shiku_im
  4. //
  5. // Created by JayLuo on 2019/12/13.
  6. // Copyright © 2019 Reese. All rights reserved.
  7. //
  8. #import "CYGroupSendHelperCell.h"
  9. @interface CYGroupSendHelperCell()
  10. @property (weak, nonatomic) IBOutlet UILabel *tagLabel;
  11. @property (weak, nonatomic) IBOutlet UILabel *groupLabel;
  12. @property (weak, nonatomic) IBOutlet UILabel *contentLabel;
  13. @property (weak, nonatomic) IBOutlet UIView *containerView;
  14. @end
  15. @implementation CYGroupSendHelperCell
  16. - (void)awakeFromNib {
  17. [super awakeFromNib];
  18. // Initialization code
  19. _containerView.layer.cornerRadius = 10;
  20. _containerView.layer.masksToBounds = YES;
  21. }
  22. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  23. [super setSelected:selected animated:animated];
  24. // Configure the view for the selected state
  25. }
  26. - (void)setResendClickCallback:(void (^)(JXLabelObject *model))resendClickCallback {
  27. _resendClickCallback = resendClickCallback;
  28. }
  29. - (IBAction)resendClick:(UIButton *)sender {
  30. if (_resendClickCallback) {
  31. _resendClickCallback(_model);
  32. }
  33. }
  34. - (void)setModel:(JXLabelObject *)model {
  35. _model = model;
  36. if ([model.text1 isEqualToString:@""]) {
  37. _tagLabel.text = @"标签: 未选择标签";
  38. } else {
  39. _tagLabel.text = model.text1;
  40. }
  41. if ([model.text2 isEqualToString:@""]) {
  42. _groupLabel.text = @"群组: 未选择群组";
  43. } else {
  44. _groupLabel.text = model.text2;
  45. }
  46. _contentLabel.text = [NSString stringWithFormat:@"%@", model.message];;
  47. }
  48. @end