调整个人资料页样式
This commit is contained in:
@@ -456,10 +456,10 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
_titleView = [[JXCategoryTitleView alloc] init];
|
||||
_titleView.delegate = self;
|
||||
_titleView.backgroundColor = [UIColor clearColor];
|
||||
_titleView.titleColor = UIColorFromRGB(0x6D6B89);
|
||||
_titleView.titleSelectedColor = UIColorFromRGB(0x1F1A4E);
|
||||
_titleView.titleFont = [UIFont fontWithName:@"PingFang-SC-Medium" size:14];
|
||||
_titleView.titleSelectedFont = [UIFont boldSystemFontOfSize:18];
|
||||
_titleView.titleColor = UIColorFromRGB(0x191919);
|
||||
_titleView.titleSelectedColor = UIColorRGBAlpha(0x191919, 0.5);
|
||||
_titleView.titleFont = [UIFont systemFontOfSize:18 weight:UIFontWeightBold];
|
||||
_titleView.titleSelectedFont = [UIFont systemFontOfSize:18 weight:UIFontWeightBold];
|
||||
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
|
||||
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
|
||||
_titleView.defaultSelectedIndex = 0;
|
||||
@@ -495,7 +495,10 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
|
||||
|
||||
- (NSArray<NSString *> *)titles {
|
||||
if (!_titles) {
|
||||
_titles = @[YMLocalizedString(@"XPMineUserInfoViewController11"),YMLocalizedString(@"XPMineUserInfoViewController13")];
|
||||
_titles = @[YMLocalizedString(@"XPMineUserInfoViewController11"),
|
||||
@"动态"
|
||||
// YMLocalizedString(@"XPMineUserInfoViewController13")
|
||||
];
|
||||
}
|
||||
return _titles;
|
||||
}
|
||||
|
@@ -75,8 +75,6 @@ return view;\
|
||||
///id
|
||||
@property (nonatomic,strong) UILabel *idLabel;
|
||||
|
||||
///粉丝数
|
||||
@property (nonatomic,strong) UILabel *fansNumLabel;
|
||||
///魅力等级 等级 铭牌
|
||||
@property (nonatomic,strong) UIStackView *tagStackView;
|
||||
///魅力等级
|
||||
@@ -145,6 +143,20 @@ return view;\
|
||||
make.height.mas_equalTo(kGetScaleWidth(256));
|
||||
}];
|
||||
|
||||
[self addSubview:self.onlineButton];
|
||||
[self.onlineButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self);
|
||||
make.top.mas_equalTo(self).offset(64);
|
||||
make.size.mas_equalTo(CGSizeMake(63, 23));
|
||||
}];
|
||||
|
||||
[self addSubview:self.pageButton];
|
||||
[self.pageButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self);
|
||||
make.top.mas_equalTo(self).offset(84);
|
||||
make.size.mas_equalTo(CGSizeMake(63, 23));
|
||||
}];
|
||||
|
||||
[self addSubview:self.userInfoView];
|
||||
[self.userInfoView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.mas_equalTo(self);
|
||||
@@ -329,30 +341,27 @@ return view;\
|
||||
make.top.mas_equalTo(self.relationshipView).offset(10);
|
||||
make.left.mas_equalTo(line.mas_right).offset(60);
|
||||
}];
|
||||
|
||||
[self.relationshipView addSubview:self.followersNum];
|
||||
[self.followersNum mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(followerTitle);
|
||||
make.top.mas_equalTo(followerTitle.mas_bottom).offset(4);
|
||||
}];
|
||||
|
||||
[self.relationshipView addSubview:self.fansNum];
|
||||
[self.fansNum mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(fansTitle);
|
||||
make.top.mas_equalTo(fansTitle.mas_bottom).offset(4);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)initSubViews {
|
||||
|
||||
[self addSubview:self.reviewIcon];
|
||||
|
||||
[self addSubview:self.pageButton];
|
||||
|
||||
[self.avatarView addSubview:self.onlineView];
|
||||
|
||||
[self.onlineView addSubview:self.onlineIconView];
|
||||
[self.onlineView addSubview:self.onlineTitleView];
|
||||
[self.onlineView addSubview:self.onlineButton];
|
||||
|
||||
|
||||
|
||||
// [self.userInfoView addSubview:self.lineView];
|
||||
|
||||
// [self.userShadowImageView addSubview:self.nickStackView];
|
||||
// [self.userShadowImageView addSubview:self.idStackView];
|
||||
// [self.userShadowImageView addSubview:self.tagStackView];
|
||||
|
||||
|
||||
[self.idStackView addArrangedSubview:self.fansNumLabel];
|
||||
|
||||
[self.singStackView addArrangedSubview:self.tagView];
|
||||
[self.singStackView addArrangedSubview:self.signBackView];
|
||||
@@ -533,7 +542,8 @@ return view;\
|
||||
|
||||
|
||||
self.signLabel.text = _userInfo.userDesc.length > 0 ? _userInfo.userDesc : YMLocalizedString(@"XPTreasureFairyFriendCell0");
|
||||
self.fansNumLabel.text =[NSString stringWithFormat:YMLocalizedString(@"XPMineUserInfoHeaderView2"), _userInfo.fansNum];
|
||||
self.fansNum.text = [@(_userInfo.fansNum) stringValue];
|
||||
self.followersNum.text = [@(_userInfo.followNum) stringValue];;
|
||||
[self.sexImageView setTitle:[NSString getAgeWithBirth:_userInfo.birth] forState:UIControlStateNormal];
|
||||
self.sexImageView.backgroundColor = _userInfo.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
|
||||
self.sexImageView.titleEdgeInsets = _userInfo.gender != GenderType_Male ? UIEdgeInsetsMake(0, 2, 0, 0):UIEdgeInsetsMake(0, -1, 0, 0);
|
||||
@@ -727,15 +737,6 @@ return view;\
|
||||
return _beautifulImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)fansNumLabel {
|
||||
if (!_fansNumLabel) {
|
||||
_fansNumLabel = [[UILabel alloc] init];
|
||||
_fansNumLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightRegular];
|
||||
_fansNumLabel.textColor = UIColorFromRGB(0x6D6B89);
|
||||
}
|
||||
return _fansNumLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)idLabel {
|
||||
if (!_idLabel) {
|
||||
_idLabel = [[UILabel alloc] init];
|
||||
@@ -747,6 +748,7 @@ return view;\
|
||||
}
|
||||
return _idLabel;
|
||||
}
|
||||
|
||||
-(UIImageView *)onlineView{
|
||||
if (!_onlineView){
|
||||
_onlineView = [UIImageView new];
|
||||
@@ -776,10 +778,17 @@ return view;\
|
||||
}
|
||||
return _onlineTitleView;
|
||||
}
|
||||
|
||||
- (UIButton *)onlineButton {
|
||||
if (!_onlineButton) {
|
||||
_onlineButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_onlineButton addTarget:self action:@selector(onlineButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_onlineButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[UIColorFromRGB(0x41EABA), UIColorFromRGB(0x26cc9c)]
|
||||
gradientType:GradientTypeTopToBottom
|
||||
imgSize:CGSizeMake(63, 23)]
|
||||
forState:UIControlStateNormal];
|
||||
[_onlineButton addTarget:self
|
||||
action:@selector(onlineButtonAction:)
|
||||
forControlEvents:UIControlEventTouchUpInside];
|
||||
[_onlineButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
|
||||
}
|
||||
return _onlineButton;
|
||||
@@ -860,8 +869,6 @@ return view;\
|
||||
return _charmImageView;
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (UIView *)namePlateView {
|
||||
if (!_namePlateView) {
|
||||
_namePlateView = [[UIView alloc] init];
|
||||
@@ -1052,5 +1059,23 @@ return view;\
|
||||
return [UIView new];
|
||||
}
|
||||
|
||||
- (UILabel *)fansNum {
|
||||
if (!_fansNum) {
|
||||
_fansNum = [[UILabel alloc] init];
|
||||
_fansNum.font = [UIFont systemFontOfSize:18 weight:UIFontWeightBold];
|
||||
_fansNum.textColor = [UIColor whiteColor];
|
||||
}
|
||||
return _fansNum;
|
||||
}
|
||||
|
||||
- (UILabel *)followersNum {
|
||||
if (!_followersNum) {
|
||||
_followersNum = [[UILabel alloc] init];
|
||||
_followersNum.font = [UIFont systemFontOfSize:18 weight:UIFontWeightBold];
|
||||
_followersNum.textColor = [UIColor whiteColor];
|
||||
}
|
||||
return _followersNum;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
Reference in New Issue
Block a user