48 lines
1.3 KiB
Objective-C
Executable File
48 lines
1.3 KiB
Objective-C
Executable File
//
|
|
// TXGiftRecordCell.m
|
|
// romantic
|
|
//
|
|
// Created by bj_szd on 2022/9/6.
|
|
// Copyright © 2022 romantic. All rights reserved.
|
|
//
|
|
|
|
#import "TXGiftRecordCell.h"
|
|
#import "TUIGlobalization.h"
|
|
#import "TUIThemeManager.h"
|
|
|
|
@implementation TXGiftRecordCell
|
|
|
|
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
|
{
|
|
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
|
if (self) {
|
|
self.bgImgV = [ControlCreator createImageView:nil rect:CGRectZero imageName:@"" backguoundColor:HEXCOLOR(0x8e55f1)];
|
|
self.bgImgV.layer.cornerRadius = 5;
|
|
[self.container addSubview:self.bgImgV];
|
|
|
|
_myTextLabel = [[UILabel alloc] init];
|
|
_myTextLabel.numberOfLines = 0;
|
|
_myTextLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
|
_myTextLabel.textColor = [UIColor whiteColor];
|
|
[self.container addSubview:_myTextLabel];
|
|
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (void)fillWithData:(TXGiftRecordCellData *)data;
|
|
{
|
|
[super fillWithData:data];
|
|
self.customData = data;
|
|
self.myTextLabel.text = data.text;
|
|
}
|
|
|
|
- (void)layoutSubviews {
|
|
[super layoutSubviews];
|
|
|
|
self.bgImgV.frame = self.container.bounds;
|
|
self.myTextLabel.frame = CGRectMake(10, 10, self.container.bounds.size.width-10*2, self.container.bounds.size.height-10*2);
|
|
}
|
|
|
|
@end
|