YOUPAILZChatRoomEmojiCell.m 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // YOUPAILZChatRoomEmojiCell.m
  3. // VQU
  4. //
  5. // Created by CY on 2021/11/11.
  6. // Copyright © 2021 MS. All rights reserved.
  7. //
  8. #import "YOUPAILZChatRoomEmojiCell.h"
  9. @interface YOUPAILZChatRoomEmojiCell ()
  10. @property (nonatomic,weak)UIImageView *youpaipemojiImgV;
  11. @end
  12. @implementation YOUPAILZChatRoomEmojiCell
  13. - (instancetype)initWithFrame:(CGRect)frame{
  14. if (self = [super initWithFrame:frame]) {
  15. [self youpaifinitUI];
  16. }
  17. return self;
  18. }
  19. - (void)youpaifinitUI{
  20. UIImageView *youpaipemojiImgV = [[UIImageView alloc] init];
  21. youpaipemojiImgV.contentMode = UIViewContentModeScaleAspectFill;
  22. youpaipemojiImgV.layer.cornerRadius = 8.0f;
  23. youpaipemojiImgV.clipsToBounds = YES;
  24. [self.contentView addSubview:youpaipemojiImgV];
  25. self.youpaipemojiImgV = youpaipemojiImgV;
  26. [youpaipemojiImgV mas_makeConstraints:^(MASConstraintMaker *make) {
  27. make.center.equalTo(self.contentView);
  28. make.size.mas_offset(CGSizeMake(77.0f, 77.0f));
  29. }];
  30. }
  31. - (void)youpaifreloadWithModel:(YOUPAILZChatRoomEmojiModel *)model{
  32. [self.youpaipemojiImgV sd_setImageWithURL:[LCTools getImageUrlWithAddress:model.youpaipimg]];
  33. }
  34. @end