// // YOUPAIHRGuildCenterBtn.m // VQU // // Created by xiaohaoran on 2021/11/4. // Copyright © 2021 MS. All rights reserved. // #import "YOUPAIHRGuildCenterBtn.h" @implementation YOUPAIHRGuildCenterBtn -(instancetype)initWithFrame:(CGRect)frame{ if (self = [super initWithFrame:frame]) { [self youpaifsetSubView]; } return self; } -(void)youpaifsetSubView{ //title UILabel *youpaipcountL = [[UILabel alloc] init]; youpaipcountL.font = LCFont(16.0f); youpaipcountL.textColor = [UIColor whiteColor]; [self addSubview:youpaipcountL]; self.youpaipcountL = youpaipcountL; [youpaipcountL mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.equalTo(self); make.top.offset(0.0f); }]; //str UILabel *youpaiptitleL = [[UILabel alloc] init]; youpaiptitleL.font = LCFont(12.0f); youpaiptitleL.textColor = [UIColor whiteColor]; youpaiptitleL.textAlignment = NSTextAlignmentCenter; [self addSubview:youpaiptitleL]; self.youpaiptitleL = youpaiptitleL; [youpaiptitleL mas_makeConstraints:^(MASConstraintMaker *make) { make.bottom.left.right.offset(0.0f); }]; youpaiptitleL.textColor = HexColorFromRGB(0x9F9DA5); } - (void)setYoupaiptitleStr:(NSString *)youpaiptitleStr{ _youpaiptitleStr = youpaiptitleStr; self.youpaiptitleL.text = youpaiptitleStr; } - (void)setYoupaipcount:(NSString*)youpaipcount{ _youpaipcount = youpaipcount; self.youpaipcountL.text = [NSString stringWithFormat:@"%@",youpaipcount]; } @end