mirror of
https://github.com/TencentCloud/TIMSDK.git
synced 2026-10-22 09:34:17 +08:00
40 lines
919 B
Objective-C
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
|