Files
peko-ios/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleCell.m
2024-04-03 17:18:44 +08:00

56 lines
1.3 KiB
Objective-C

//
// PINobleCenterTitleCell.m
// YuMi
//
// Created by duoban on 2024/3/27.
//
#import "ThemeColor+NobleCenter.h"
#import "PINobleCenterTitleCell.h"
@interface PINobleCenterTitleCell()
@property(nonatomic,strong) UIImageView *bgImageView;
@end
@implementation PINobleCenterTitleCell
-(instancetype)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if(self){
[self installUI];
[self installConstraints];
}
return self;
}
-(void)installUI{
[self.contentView addSubview:self.bgImageView];
}
- (void)reloadData:(JXCategoryBaseCellModel *)cellModel {
[super reloadData:cellModel];
}
- (void)setInfo:(NobleInfo *)info{
_info = info;
_bgImageView.hidden = !self.info.isReturnProfit;
}
-(void)installConstraints{
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(kGetScaleWidth(41));
make.height.mas_equalTo(kGetScaleWidth(16));
make.top.mas_equalTo(0);
make.trailing.mas_equalTo(10);
}];
}
#pragma mark - 懒加载
- (UIImageView *)bgImageView{
if(!_bgImageView){
_bgImageView = [UIImageView new];
_bgImageView.image = kImage(@"mine_noble_center_tag_title_bg");
_bgImageView.hidden = YES;
}
return _bgImageView;
}
@end