feat: 更新 VIP 页面内容 | 更新一级页面 UI

This commit is contained in:
eggmanQQQ
2024-09-03 20:22:54 +08:00
parent 966aedcc7d
commit 4dbc7422ec
121 changed files with 475 additions and 753 deletions

View File

@@ -35,6 +35,8 @@
///
@property (nonatomic,strong) UIButton *attentionButton;
@property (nonatomic, strong) UIView *container;
@end
@@ -51,24 +53,44 @@
- (void)initSubViews {
self.backgroundColor = [UIColor clearColor];
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.avatarImageView];
[self.contentView addSubview:self.stackView];
[self.contentView addSubview:self.signLabel];
[self.contentView addSubview:self.attentionButton];
UIView *bottomSpace = [[UIView alloc] init];
[self.contentView addSubview:bottomSpace];
[bottomSpace mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.bottom.mas_equalTo(self.contentView);
make.height.mas_equalTo(12);
}];
UIView *container = [[UIView alloc] init];
container.backgroundColor = [UIColor whiteColor];
container.layer.cornerRadius = 10;
[self.contentView addSubview:container];
[container mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.contentView);
make.bottom.mas_equalTo(bottomSpace.mas_top);
make.leading.mas_equalTo(16);
make.trailing.mas_equalTo(-16);
}];
[container addSubview:self.avatarImageView];
[container addSubview:self.stackView];
[container addSubview:self.signLabel];
[container addSubview:self.attentionButton];
[self.stackView addArrangedSubview:self.nobleImageView];
[self.stackView addArrangedSubview:self.nickLabel];
[self.stackView addArrangedSubview:self.sexImageView];
[self.stackView addArrangedSubview:self.experImageView];
[self.stackView addArrangedSubview:self.charmImageView];
_container = container;
}
- (void)initSubViewConstraints {
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake((50), (50)));
make.centerY.mas_equalTo(self.contentView);
make.leading.mas_equalTo(self.contentView).offset((15));
make.centerY.mas_equalTo(self.container);
make.leading.mas_equalTo(self.container).offset((15));
}];
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -81,9 +103,7 @@
make.width.mas_equalTo(28);
make.height.mas_equalTo(14);
}];
// [self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
// make.width.mas_lessThanOrEqualTo((100));
// }];
[self.signLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(self.stackView);
make.top.equalTo(self.stackView.mas_bottom).mas_offset((7));
@@ -93,8 +113,8 @@
[self.attentionButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo((68));
make.height.mas_equalTo((30));
make.centerY.mas_equalTo(self.contentView);
make.trailing.mas_equalTo(self.contentView).offset(-(15));
make.centerY.mas_equalTo(self.container);
make.trailing.mas_equalTo(self.container).offset(-(15));
}];
CGFloat width = 28 * 20 / 14;
@@ -120,9 +140,9 @@
_fansInfo = fansInfo;
if (_fansInfo) {
self.avatarImageView.imageUrl = _fansInfo.avatar;
if(_fansInfo.nick.length > 5){
_fansInfo.nick = [NSString stringWithFormat:@"%@...",[_fansInfo.nick substringToIndex:5]];
}
// if(_fansInfo.nick.length > 5){
// _fansInfo.nick = [NSString stringWithFormat:@"%@...",[_fansInfo.nick substringToIndex:5]];
// }
self.nickLabel.text = _fansInfo.nick;
self.signLabel.text = _fansInfo.userDesc && _fansInfo.userDesc.length > 0? _fansInfo.userDesc : YMLocalizedString(@"XPMineFansTableViewCell0");
if (_fansInfo.useingType != ContactUseingType_In_Room && _fansInfo.useingType != ContactUseingType_Share) {
@@ -165,7 +185,7 @@
if (fansInfo.userVipInfoVO && fansInfo.userVipInfoVO.friendNickColour) {
self.nickLabel.textColor = [self colorWithHexString:fansInfo.userVipInfoVO.friendNickColour];
} else {
self.nickLabel.textColor = [DJDKMIMOMColor mainTextColor];
self.nickLabel.textColor = UIColorFromRGB(0x333333);
}
} else {
self.experImageView.hidden = YES;
@@ -173,7 +193,7 @@
self.nobleImageView.hidden = YES;
self.sexImageView.hidden = YES;
self.attentionButton.hidden = YES;
self.nickLabel.textColor = [DJDKMIMOMColor mainTextColor];
self.nickLabel.textColor = UIColorFromRGB(0x333333);
}
}
}
@@ -222,8 +242,8 @@
- (UILabel *)nickLabel {
if (!_nickLabel) {
_nickLabel = [[UILabel alloc] init];
_nickLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
_nickLabel.textColor = [DJDKMIMOMColor inputTextColor];
_nickLabel.font = kFontSemibold(14);
_nickLabel.textColor = UIColorFromRGB(0x333333);
}
return _nickLabel;
}
@@ -270,8 +290,8 @@
- (UILabel *)signLabel{
if (!_signLabel) {
_signLabel = [[UILabel alloc] init];
_signLabel.textColor = [DJDKMIMOMColor disableButtonTextColor];
_signLabel.font = [UIFont systemFontOfSize:12];
_signLabel.textColor = UIColorFromRGB(0x7b7b7d);
_signLabel.font = kFontRegular(13);
}
return _signLabel;
}