| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- //
- // ContributionLsitBottomView.m
- // BuguLive
- //
- // Created by 宋晨光 on 2021/3/24.
- // Copyright © 2021 xfg. All rights reserved.
- //
- #import "ContributionLsitBottomView.h"
- @implementation ContributionLsitBottomView
- - (instancetype)initWithFrame:(CGRect)frame
- {
- self = [super initWithFrame:frame];
- if (self) {
- self.backgroundColor = [UIColor colorWithHexString:@"#2D2140"];
- [self setUpView];
- }
- return self;
- }
- -(void)setUpView{
-
- self.titleL = [[UILabel alloc]initWithFrame:CGRectMake(0, 38, 50, 20)];
- self.titleL.font = [UIFont systemFontOfSize:14];
- self.titleL.textColor = UIColor.whiteColor;
- self.titleL.textAlignment = NSTextAlignmentCenter;
- [self addSubview:self.titleL];
-
- _headImageView = [[UIImageView alloc] initWithFrame:CGRectMake(50, 0, 46, 46)];
- self.headImageView.centerY = self.titleL.centerY;
- self.headImageView.layer.cornerRadius = 23;
- self.headImageView.layer.masksToBounds = YES;
- [self addSubview:self.headImageView];
-
- _nicknameLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.headImageView.right + 10, self.headImageView.top, self.width - self.headImageView.right - 100, 20)];
- self.nicknameLabel.font = [UIFont systemFontOfSize:14];
- self.nicknameLabel.textColor = UIColor.whiteColor;
- [self addSubview:self.nicknameLabel];
-
- _rankImgV = [[UIImageView alloc] initWithFrame:CGRectMake(self.nicknameLabel.left, self.nicknameLabel.bottom + 5, 26, 13)];
- [self addSubview:self.rankImgV];
-
- _valueLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.rankImgV.right + 10, 0, self.width - self.rankImgV.right - 120, 20)];
- self.valueLabel.centerY = self.rankImgV.centerY;
- self.valueLabel.textColor = [UIColor.whiteColor colorWithAlphaComponent:0.4];
- self.valueLabel.font = [UIFont systemFontOfSize:12];
- [self addSubview:self.valueLabel];
-
- self.contentL = [[UILabel alloc]initWithFrame:CGRectMake(self.width - 15 - 100, 0, 100, 30)];
- self.contentL.text = ASLocalizedString( @"未上榜");
- self.contentL.font = [UIFont systemFontOfSize:14];
- self.contentL.textColor = UIColor.whiteColor;
- self.contentL.textAlignment = NSTextAlignmentRight;
-
- self.contentL.centerY = self.titleL.centerY;
- [self addSubview:self.contentL];
- }
- @end
|