Files
TIMSDK/iOS/TUIKit/TUIChat/Cell/CellUI/Chat/TUIFaceMessageCell.m
T
2021-10-14 14:22:00 +08:00

40 lines
919 B
Objective-C

//
// FaceMessageCell.m
// UIKit
//
// Created by annidyfeng on 2019/5/30.
//
#import "TUIFaceMessageCell.h"
#import "TUIDefine.h"
@interface TUIFaceMessageCell ()
@end
@implementation TUIFaceMessageCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
_face = [[UIImageView alloc] init];
_face.contentMode = UIViewContentModeScaleAspectFit;
[self.container addSubview:_face];
_face.mm_fill();
_face.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
}
return self;
}
- (void)fillWithData:(TUIFaceMessageCellData *)data
{
//set data
[super fillWithData:data];
self.faceData = data;
_face.image = [[TUIImageCache sharedInstance] getFaceFromCache:data.path];;
}
@end