贵族中心入口调整,贵族特权点亮颜色修改

This commit is contained in:
chenguilong
2022-01-06 17:50:59 +08:00
committed by fengshuo
parent a8b9ceeed1
commit 1085ed2d0c
13 changed files with 182 additions and 10 deletions

View File

@@ -146,6 +146,7 @@
9BB549622782EA1D0090CD26 /* NobleInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BB549612782EA1D0090CD26 /* NobleInfo.m */; };
9BB54966278303EB0090CD26 /* XPNobleCenterNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BB54965278303EB0090CD26 /* XPNobleCenterNavView.m */; };
9BBC02872786D75C0007C24B /* XPNobleUpgradeLevelView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BBC02862786D75C0007C24B /* XPNobleUpgradeLevelView.m */; };
9BBC028B2786E05A0007C24B /* XPNobleCenterEntranceView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BBC028A2786E05A0007C24B /* XPNobleCenterEntranceView.m */; };
9BC5C8E9277AB6AE007C8719 /* XPFacePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C8E8277AB6AE007C8719 /* XPFacePresenter.m */; };
9BC5C8ED277AFF63007C8719 /* XPNobleCenterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C8EC277AFF63007C8719 /* XPNobleCenterViewController.m */; };
9BC5C8F6277B0263007C8719 /* XPNobleCenterListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C8F5277B0263007C8719 /* XPNobleCenterListViewController.m */; };
@@ -774,6 +775,8 @@
9BE29A6C27D210A500446AB5 /* anchor_room_bg.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = anchor_room_bg.svga; sourceTree = "<group>"; };
9BBC02852786D75C0007C24B /* XPNobleUpgradeLevelView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleUpgradeLevelView.h; sourceTree = "<group>"; };
9BBC02862786D75C0007C24B /* XPNobleUpgradeLevelView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleUpgradeLevelView.m; sourceTree = "<group>"; };
9BBC02892786E05A0007C24B /* XPNobleCenterEntranceView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterEntranceView.h; sourceTree = "<group>"; };
9BBC028A2786E05A0007C24B /* XPNobleCenterEntranceView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterEntranceView.m; sourceTree = "<group>"; };
9BC5C8E7277AB6AE007C8719 /* XPFacePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPFacePresenter.h; sourceTree = "<group>"; };
9BC5C8E8277AB6AE007C8719 /* XPFacePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPFacePresenter.m; sourceTree = "<group>"; };
9BC5C8EB277AFF63007C8719 /* XPNobleCenterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterViewController.h; sourceTree = "<group>"; };
@@ -2269,6 +2272,15 @@
path = SubViews;
sourceTree = "<group>";
};
9BBC02882786E0060007C24B /* NobleCenter */ = {
isa = PBXGroup;
children = (
9BBC02892786E05A0007C24B /* XPNobleCenterEntranceView.h */,
9BBC028A2786E05A0007C24B /* XPNobleCenterEntranceView.m */,
);
path = NobleCenter;
sourceTree = "<group>";
};
9BC5C8E6277AAD8B007C8719 /* Presenter */ = {
isa = PBXGroup;
children = (
@@ -4013,6 +4025,7 @@
E8E70D7F26F2F39000F03460 /* SubViews */ = {
isa = PBXGroup;
children = (
9BBC02882786E0060007C24B /* NobleCenter */,
E8B846CC26FDD93D00A777FE /* Recharge */,
E88B5CC226FB429C00DA9178 /* MineInfo */,
E88B5CAA26FB168200DA9178 /* Teenager */,
@@ -4513,6 +4526,7 @@
E80DE40D2775ABA500BE5BCB /* XPFirstRechargeFlowLayout.m in Sources */,
E896EFA22771AE9400AD2CC1 /* XPMineFriendViewController.m in Sources */,
186A534A26FC6ED900D67B2C /* TTActionSheetConfig.m in Sources */,
9BBC028B2786E05A0007C24B /* XPNobleCenterEntranceView.m in Sources */,
E81C279326EB394D0031E639 /* LoginForgetPasswordViewController.m in Sources */,
E81C278D26EAFAF60031E639 /* DESEncrypt.m in Sources */,
9BC5C8E9277AB6AE007C8719 /* XPFacePresenter.m in Sources */,

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "mine_noble_entrance@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "mine_noble_entrance@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -80,15 +80,9 @@
realNameItem.itmeName = @"实名认证";
realNameItem.itmeImageName = @"mine_normal_real_name_authentic";
realNameItem.type = XPMineItemType_Real_Name_Authentic;
realNameItem.cornerType = UIRectCornerBottomLeft | UIRectCornerBottomRight;
XPMineItemModel * nobleCenterItem = [[XPMineItemModel alloc] init];
nobleCenterItem.itmeName = @"贵族中心";
#warning todo --
nobleCenterItem.itmeImageName = @"mine_normal_real_name_authentic";
nobleCenterItem.type = XPMineItemType_Noble_Center;
nobleCenterItem.cornerType = UIRectCornerBottomLeft | UIRectCornerBottomRight;
NSArray * array = @[myRoomItem,teenagerItem, myDressUp, realNameItem, nobleCenterItem];
NSArray * array = @[myRoomItem,teenagerItem, myDressUp, realNameItem];
[[self getView] onGetNormalItemsSuccess:array];
}

View File

@@ -77,6 +77,13 @@
self.privilegeLabel.text = vipInfo.authName;
self.descLabel.text = vipInfo.authDesc;
self.alphaView.hidden = self.isOwn;
if (self.isOwn) {
self.privilegeLabel.textColor = [ThemeColor hightNobleLightTextColor];
self.descLabel.textColor = [ThemeColor normalNobleTextColor];
} else {
self.privilegeLabel.textColor = [ThemeColor noContainTitleTextColor];
self.descLabel.textColor = [ThemeColor noContainDescTextColor];
}
}
- (NetImageView *)iconImageView {

View File

@@ -17,6 +17,12 @@ NS_ASSUME_NONNULL_BEGIN
///高亮文字颜色0xFFE3AF
+ (UIColor *)hightNobleLightTextColor;
///贵族特权未点亮标题颜色0x9F8052
+ (UIColor *)noContainTitleTextColor;
///贵族特权未点亮短描述颜色0x8B7245
+ (UIColor *)noContainDescTextColor;
@end
NS_ASSUME_NONNULL_END

View File

@@ -19,4 +19,14 @@
return UIColorFromRGB(0xFFE3AF);
}
///0x9F8052
+ (UIColor *)noContainTitleTextColor {
return UIColorFromRGB(0x9F8052);
}
///0x8B7245
+ (UIColor *)noContainDescTextColor {
return UIColorFromRGB(0x8B7245);
}
@end

View File

@@ -0,0 +1,16 @@
//
// XPNobleCenterEntranceView.h
// xplan-ios
//
// Created by GreenLand on 2022/1/6.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPNobleCenterEntranceView : UIView
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,68 @@
//
// XPNobleCenterEntranceView.m
// xplan-ios
//
// Created by GreenLand on 2022/1/6.
//
#import "XPNobleCenterEntranceView.h"
#import <Masonry/Masonry.h>
#import "ThemeColor.h"
@interface XPNobleCenterEntranceView ()
@property (nonatomic, strong) UIImageView *bgImageView;
@property (nonatomic, strong) UILabel *titleLabel;
@end
@implementation XPNobleCenterEntranceView
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
[self addSubview:self.bgImageView];
[self.bgImageView addSubview:self.titleLabel];
}
- (void)initSubViewConstraints {
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self).inset(15);
make.bottom.top.mas_equalTo(0);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.bgImageView);
make.right.mas_equalTo(self.bgImageView).mas_offset(-8);
}];
}
#pragma mark - Getters And Setters
- (UIImageView *)bgImageView {
if (!_bgImageView) {
_bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_noble_entrance"]];
_bgImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _bgImageView;
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
_titleLabel.textColor = UIColorFromRGB(0xffffff);
_titleLabel.text = @"开通贵族立享各项特权>>";
}
return _titleLabel;
}
@end

View File

@@ -20,6 +20,9 @@ NS_ASSUME_NONNULL_BEGIN
- (void)xpMineHeadViewClickAttention;
///点击了粉丝
- (void)xpMineHeadViewClickFans;
///点击了贵族中心
- (void)xPMineHeadViewCliekNobleCenter;
@end
@interface XPMineHeadView : UIView
///用户信息

View File

@@ -18,6 +18,7 @@
#import "NetImageView.h"
#import "UIImage+Utils.h"
#import "XPMineFriendNumberView.h"
#import "XPNobleCenterEntranceView.h"
///Model
#import "UserInfoModel.h"
@@ -46,6 +47,9 @@
@property (nonatomic,strong) XPMineFriendNumberView *attentionView;
///
@property (nonatomic,strong) XPMineFriendNumberView *fansView;
///
@property (nonatomic, strong) XPNobleCenterEntranceView *nobleEntranceView;
@end
@implementation XPMineHeadView
@@ -91,6 +95,12 @@
}
}
- (void)tapNobleCenterrecognizer {
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineHeadViewCliekNobleCenter)]) {
[self.delegate xPMineHeadViewCliekNobleCenter];
}
}
#pragma mark - Private Method
- (void)initSubViews {
self.backgroundColor = [UIColor clearColor];
@@ -102,6 +112,7 @@
[self addSubview:self.attentionView];
[self addSubview:self.fansView];
[self addSubview:self.accountView];
[self addSubview:self.nobleEntranceView];
[self.nameStackView addArrangedSubview:self.nameLabel];
[self.nameStackView addArrangedSubview:self.editButton];
@@ -162,6 +173,13 @@
make.height.mas_equalTo(60);
make.top.mas_equalTo(self.avatarImageView.mas_bottom).offset(30 + 20);
}];
CGFloat nobleH = (KScreenWidth - 30.0)/ 345.0 * 44;
[self.nobleEntranceView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self);
make.height.mas_equalTo(nobleH);
make.top.mas_equalTo(self.accountView.mas_bottom).offset(12);
}];
}
#pragma mark - NSMutableAttributedString
@@ -472,5 +490,13 @@
return _fansView;
}
- (XPNobleCenterEntranceView *)nobleEntranceView {
if (!_nobleEntranceView) {
_nobleEntranceView = [[XPNobleCenterEntranceView alloc] init];
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapNobleCenterrecognizer)];
[_nobleEntranceView addGestureRecognizer:tap];
}
return _nobleEntranceView;
}
@end

View File

@@ -272,6 +272,11 @@
- (void)xpMineHeadViewClickAttention {
[self pushViewControllerWithType:XPMineItemType_Attention_List];
}
- (void)xPMineHeadViewCliekNobleCenter {
[self pushViewControllerWithType:XPMineItemType_Noble_Center];
}
#pragma mark - XPMineProtocol
- (void)onGetNormalItemsSuccess:(NSArray<XPMineItemModel *> *)normalItems {
self.datasource = normalItems;
@@ -308,7 +313,8 @@
- (XPMineHeadView *)headView {
if (!_headView) {
_headView = [[XPMineHeadView alloc] initWithFrame:CGRectMake(0, 0,KScreenWidth , 203 + kSafeAreaTopHeight)];
CGFloat nobleH = (KScreenWidth - 30.0)/ 345.0 * 44;
_headView = [[XPMineHeadView alloc] initWithFrame:CGRectMake(0, 0,KScreenWidth , 203 + nobleH + kSafeAreaTopHeight)];
_headView.delegate = self;
}
return _headView;