// // YOUPAILZHomeTagLabelCell.m // VQU // // Created by 肖浩然的mac on 2021/8/16. // Copyright © 2021 leo. All rights reserved. // #import "YOUPAILZHomeTagLabelCell.h" @interface YOUPAILZHomeTagLabelCell () @property (nonatomic,weak) UIButton *youpaiptitleBtn; @end @implementation YOUPAILZHomeTagLabelCell - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { [self youpaifinitUI]; } return self; } - (void)youpaifinitUI{ self.contentView.layer.cornerRadius = self.contentView.size.height/2.0; self.contentView.layer.masksToBounds = YES; UIButton *titleBtn = [UIButton buttonWithType:UIButtonTypeCustom]; [titleBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; titleBtn.titleLabel.font = [UIFont systemFontOfSize:10]; titleBtn.backgroundColor = HexColorFromRGB(0x4F4B5B); titleBtn.userInteractionEnabled = NO; [self.contentView addSubview:titleBtn]; self.youpaiptitleBtn = titleBtn; [titleBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.left.top.bottom.right.offset(0.0f); }]; } - (void)youpaifreloadWithModel:(YOUPAILZlaber_listModel *)model{ [self.youpaiptitleBtn setTitle:[NSString stringWithFormat:@"%@%ld",model.youpaipname,model.youpaipnum] forState:UIControlStateNormal]; } @end