123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- //
- // 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
|