cdts/xdts-ios 3/TUICalling/Source/UI/Views/TUICalleeGroupCell.m

42 lines
1.1 KiB
Mathematica
Raw Permalink Normal View History

2023-07-27 09:20:00 +08:00
//
// TUICalleeGroupCell.m
// TUICalling
//
// Created by noah on 2021/9/23.
//
#import "TUICalleeGroupCell.h"
#import <Masonry/Masonry.h>
#import <SDWebImage/UIImageView+WebCache.h>
#import "UIColor+TUIHex.h"
#import "TUICommonUtil.h"
#import "TUICallingConstants.h"
@interface TUICalleeGroupCell ()
@property (nonatomic, strong) UIImageView *userIcon;
@end
@implementation TUICalleeGroupCell
- (void)setModel:(CallUserModel *)model {
_model = model;
[self.userIcon sd_setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:[TUICommonUtil getBundleImageWithName:@"userIcon"]];
}
- (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectZero];
imageView.contentMode = UIViewContentModeScaleAspectFill;
[self.contentView addSubview:imageView];
self.userIcon = imageView;
[imageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.contentView);
}];
}
return self;
}
@end