贵族中心权限内容、升级弹窗

This commit is contained in:
chenguilong
2022-01-06 16:10:36 +08:00
committed by fengshuo
parent 4ff7d7dc42
commit a8b9ceeed1
12 changed files with 374 additions and 0 deletions

View File

@@ -145,6 +145,7 @@
9BB5495F2782E9DB0090CD26 /* NobleAuthInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BB5495E2782E9DB0090CD26 /* NobleAuthInfo.m */; };
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 */; };
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 */; };
@@ -159,6 +160,7 @@
9BEE3D0E27853BD000C83219 /* ThemeColor+NobleCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BEE3D0D27853BD000C83219 /* ThemeColor+NobleCenter.m */; };
9BEE3D11278584FE00C83219 /* XPNobleCenterEmptyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BEE3D10278584FE00C83219 /* XPNobleCenterEmptyView.m */; };
9BEE3D142785884A00C83219 /* XPNobleCenterResidueView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BEE3D132785884A00C83219 /* XPNobleCenterResidueView.m */; };
9BEE3D1727858E5700C83219 /* XPNobleAuthorityDescView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BEE3D1627858E5700C83219 /* XPNobleAuthorityDescView.m */; };
E80487652717DDD9008595F2 /* XPRoomMenuItem.m in Sources */ = {isa = PBXBuildFile; fileRef = E80487642717DDD9008595F2 /* XPRoomMenuItem.m */; };
E80CBDE627D0C1CF001E1EC2 /* HomeMenuSourceModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E80CBDE527D0C1CF001E1EC2 /* HomeMenuSourceModel.m */; };
E80CBDEA27D0C53F001E1EC2 /* XPWeakTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = E80CBDE927D0C53F001E1EC2 /* XPWeakTimer.m */; };
@@ -770,6 +772,8 @@
9BB865B4272076140029CDE0 /* RtcImplDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RtcImplDelegate.h; sourceTree = "<group>"; };
9BE29A6927D1BFF700446AB5 /* anchor_room_speak.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = anchor_room_speak.svga; sourceTree = "<group>"; };
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>"; };
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>"; };
@@ -800,6 +804,8 @@
9BEE3D10278584FE00C83219 /* XPNobleCenterEmptyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterEmptyView.m; sourceTree = "<group>"; };
9BEE3D122785884A00C83219 /* XPNobleCenterResidueView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterResidueView.h; sourceTree = "<group>"; };
9BEE3D132785884A00C83219 /* XPNobleCenterResidueView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterResidueView.m; sourceTree = "<group>"; };
9BEE3D1527858E5700C83219 /* XPNobleAuthorityDescView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleAuthorityDescView.h; sourceTree = "<group>"; };
9BEE3D1627858E5700C83219 /* XPNobleAuthorityDescView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleAuthorityDescView.m; sourceTree = "<group>"; };
B66633E061B1B34177CD011C /* Pods-xplan-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-xplan-ios.release.xcconfig"; path = "Target Support Files/Pods-xplan-ios/Pods-xplan-ios.release.xcconfig"; sourceTree = "<group>"; };
CACF623970097D653132D69A /* Pods_xplan_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_xplan_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E80487632717DDD9008595F2 /* XPRoomMenuItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMenuItem.h; sourceTree = "<group>"; };
@@ -2255,6 +2261,10 @@
9BEE3D10278584FE00C83219 /* XPNobleCenterEmptyView.m */,
9BEE3D122785884A00C83219 /* XPNobleCenterResidueView.h */,
9BEE3D132785884A00C83219 /* XPNobleCenterResidueView.m */,
9BEE3D1527858E5700C83219 /* XPNobleAuthorityDescView.h */,
9BEE3D1627858E5700C83219 /* XPNobleAuthorityDescView.m */,
9BBC02852786D75C0007C24B /* XPNobleUpgradeLevelView.h */,
9BBC02862786D75C0007C24B /* XPNobleUpgradeLevelView.m */,
);
path = SubViews;
sourceTree = "<group>";
@@ -4284,6 +4294,7 @@
E81C279826EB3AC40031E639 /* LoginForgetPasswordProtocol.h in Sources */,
E8C6FFD42754AA87004DC9F0 /* XPNoteView.m in Sources */,
E84150BB27747BAF00A7F548 /* XPFirstRechargePresenter.m in Sources */,
9BEE3D1727858E5700C83219 /* XPNobleAuthorityDescView.m in Sources */,
E82325F9274E2E42003A3332 /* Api+UserCard.m in Sources */,
E82109B026F1D83500FC3319 /* LoginBindPhonePresent.m in Sources */,
E81C1B1F27705F7A0020D1E4 /* XPArrangeMicViewController.m in Sources */,
@@ -4472,6 +4483,7 @@
E8B825CD26EA18C8009E8E9F /* ThemeColor.m in Sources */,
E8A6C29F27CF5FE500AC7442 /* HomeLiveRoomModel.m in Sources */,
E84150B827747B8B00A7F548 /* XPFirstRechargeViewController.m in Sources */,
9BBC02872786D75C0007C24B /* XPNobleUpgradeLevelView.m in Sources */,
E88B5CBD26FB3BDF00DA9178 /* XPTeenagerAlertView.m in Sources */,
E82D5C70276AE60000858D6D /* HeadwearModel.m in Sources */,
E8A03DEC276301EF0098D9EA /* XPCandyTreeRankView.m in Sources */,

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,19 @@
//
// XPNobleAuthorityDescView.h
// xplan-ios
//
// Created by GreenLand on 2022/1/5.
// 贵族权限说明弹窗
#import <UIKit/UIKit.h>
#import "NobleAuthInfo.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPNobleAuthorityDescView : UIView
@property (nonatomic, strong) NobleAuthInfo *vipInfo;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,122 @@
//
// XPNobleAuthorityDescView.m
// xplan-ios
//
// Created by GreenLand on 2022/1/5.
//
#import "XPNobleAuthorityDescView.h"
///tool
#import "ThemeColor+NobleCenter.h"
///third
#import <Masonry/Masonry.h>
#import "TTPopup.h"
#import "NetImageView.h"
@interface XPNobleAuthorityDescView ()
///
@property (nonatomic, strong) UIImageView *bgImageView;
///icon
@property (nonatomic, strong) UIImageView *iconBgImageView;
///icon
@property (nonatomic, strong) NetImageView *iconImageView;
///
@property (nonatomic, strong) UILabel *titleLabel;
///
@property (nonatomic, strong) UITextView *descView;
///
@property (nonatomic, strong) UIButton *closeButton;
@end
@implementation XPNobleAuthorityDescView
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self initViews];
[self initConstraints];
}
return self;
}
#pragma mark - layout
- (void)initViews {
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"noble_time_popBg"]];
[self addSubview:self.bgImageView];
self.iconBgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"noble_privilege_icon_bg"]];
[self addSubview:self.iconBgImageView];
self.iconImageView = [[NetImageView alloc] init];
self.iconImageView.contentMode = UIViewContentModeScaleAspectFit;
[self.iconBgImageView addSubview:self.iconImageView];
self.titleLabel = [[UILabel alloc] init];
self.titleLabel.text = @"";
self.titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
self.titleLabel.textColor = [ThemeColor hightNobleLightTextColor];
[self addSubview:self.titleLabel];
self.descView = [[UITextView alloc] init];
self.descView.editable = NO;
self.descView.backgroundColor = [UIColor clearColor];
self.descView.text = @"";
self.descView.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
self.descView.textColor = [ThemeColor hightNobleLightTextColor];
[self addSubview:self.descView];
self.closeButton = [[UIButton alloc] init];
[self.closeButton setBackgroundImage:[UIImage imageNamed:@"noble_time_close"] forState:UIControlStateNormal];
[self addSubview:self.closeButton];
[self.closeButton addTarget:self action:@selector(onCloseButtonClick:) forControlEvents:UIControlEventTouchUpInside];
}
- (void)initConstraints {
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(0);
}];
[self.iconBgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(41);
make.left.right.mas_equalTo(self.bgImageView).inset(24);
make.height.mas_equalTo(115);
}];
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.centerY.mas_equalTo(self.iconBgImageView);
make.width.mas_equalTo(138);
make.height.mas_equalTo(52);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.iconBgImageView.mas_bottom).mas_offset(19);
make.centerX.mas_equalTo(0);
make.height.mas_equalTo(18);
}];
[self.descView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.titleLabel.mas_bottom).mas_offset(8);
make.centerX.mas_equalTo(0);
make.bottom.mas_equalTo(-24);
make.left.right.mas_equalTo(self.bgImageView).inset(12);
}];
[self.closeButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(8);
make.right.mas_equalTo(-8);
make.width.height.mas_equalTo(22);
}];
}
#pragma mark - events
- (void)onCloseButtonClick:(UIButton *)button {
[TTPopup dismiss];
}
- (void)setVipInfo:(NobleAuthInfo *)vipInfo {
self.titleLabel.text = vipInfo.authName;
self.descView.text = vipInfo.authIntro;
self.iconImageView.imageUrl = vipInfo.descPic;
}
@end

View File

@@ -8,12 +8,14 @@
#import "XPNoblePrivilegeContentCell.h"
///Third
#import <Masonry/Masonry.h>
#import "TTPopup.h"
///Tool
#import "ThemeColor.h"
#import "XPMacro.h"
#import "NSArray+Lookin.h"
///View
#import "XPNoblePrivilegeCell.h"
#import "XPNobleAuthorityDescView.h"
@interface XPNoblePrivilegeContentCell()<UICollectionViewDelegateFlowLayout, UICollectionViewDataSource, UICollectionViewDelegate>
@@ -77,6 +79,16 @@
return cell;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
NobleAuthInfo *info = [self.vipAuthInfos lookin_safeObjectAtIndex:indexPath.row];
XPNobleAuthorityDescView *alertView = [[XPNobleAuthorityDescView alloc] initWithFrame:CGRectMake(0, 0, 300, 286)];
alertView.vipInfo = info;
TTPopupService * config = [[TTPopupService alloc] init];
config.shouldDismissOnBackgroundTouch = NO;
config.contentView = alertView;
[TTPopup popupWithConfig:config];
}
#pragma mark - Getters And Setters
- (void)setVipAuthInfos:(NSMutableArray *)vipAuthInfos {
_vipAuthInfos = [NSMutableArray arrayWithArray:vipAuthInfos];

View File

@@ -0,0 +1,16 @@
//
// XPNobleUpgradeLevelView.h
// xplan-ios
//
// Created by GreenLand on 2022/1/6.
// 贵族等级提升view
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPNobleUpgradeLevelView : UIView
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,149 @@
//
// XPNobleUpgradeLevelView.m
// xplan-ios
//
// Created by GreenLand on 2022/1/6.
//
#import "XPNobleUpgradeLevelView.h"
///tool
#import "ThemeColor+NobleCenter.h"
///third
#import <Masonry/Masonry.h>
#import "TTPopup.h"
#import "NetImageView.h"
@interface XPNobleUpgradeLevelView ()
///
@property (nonatomic, strong) UIImageView *bgImageView;
///icon
@property (nonatomic, strong) NetImageView *iconImageView;
///
@property (nonatomic, strong) UILabel *titleLabel;
///
@property (nonatomic, strong) UILabel *subTitleLabel;
///
@property (nonatomic, strong) UILabel *descLabel;
///
@property (nonatomic, strong) UIButton *closeButton;
///
@property (nonatomic, strong) UIButton *jumpButton;
@end
@implementation XPNobleUpgradeLevelView
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self initViews];
[self initConstraints];
}
return self;
}
#pragma mark - layout
- (void)initViews {
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"noble_time_popBg"]];
[self addSubview:self.bgImageView];
self.titleLabel = [[UILabel alloc] init];
self.titleLabel.text = @"升级啦!";
self.titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
self.titleLabel.textColor = [ThemeColor hightNobleLightTextColor];
[self addSubview:self.titleLabel];
self.iconImageView = [[NetImageView alloc] init];
self.iconImageView.contentMode = UIViewContentModeScaleAspectFit;
[self addSubview:self.iconImageView];
self.titleLabel = [[UILabel alloc] init];
self.titleLabel.text = @"升级啦!";
self.titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
self.titleLabel.textColor = [ThemeColor hightNobleLightTextColor];
[self addSubview:self.titleLabel];
self.subTitleLabel = [[UILabel alloc] init];
self.subTitleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
self.subTitleLabel.textColor = [ThemeColor hightNobleLightTextColor];
[self addSubview:self.subTitleLabel];
self.descLabel = [[UILabel alloc] init];
self.descLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
self.descLabel.text = @"快去看看获得的专属权限吧!";
self.descLabel.textColor = [ThemeColor normalNobleTextColor];
[self addSubview:self.descLabel];
self.closeButton = [[UIButton alloc] init];
[self.closeButton setBackgroundImage:[UIImage imageNamed:@"noble_time_close"] forState:UIControlStateNormal];
[self addSubview:self.closeButton];
[self.closeButton addTarget:self action:@selector(onCloseButtonClick:) forControlEvents:UIControlEventTouchUpInside];
self.jumpButton = [[UIButton alloc] init];
[self.jumpButton setBackgroundImage:[UIImage imageNamed:@"noble_upgrade_jumpBtn"] forState:UIControlStateNormal];
[self.jumpButton setTitle:@"前往贵族中心" forState:UIControlStateNormal];
self.jumpButton.titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
self.jumpButton.titleLabel.textColor = [ThemeColor mainTextColor];
[self.jumpButton addTarget:self action:@selector(onJumpButtonClick:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:self.jumpButton];
}
- (void)initConstraints {
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(0);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(23);
make.centerX.mas_equalTo(0);
make.height.mas_equalTo(18);
}];
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.bgImageView);
make.width.mas_equalTo(94);
make.height.mas_equalTo(85);
}];
[self.subTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.iconImageView.mas_bottom).mas_offset(16);
make.centerX.mas_equalTo(self.bgImageView);
make.height.mas_equalTo(22);
}];
[self.descLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.subTitleLabel.mas_bottom).mas_offset(4);
make.centerX.mas_equalTo(self.bgImageView);
make.height.mas_equalTo(14);
}];
[self.jumpButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.descLabel.mas_bottom).mas_offset(20);
make.centerX.mas_equalTo(0);
make.width.mas_equalTo(204);
make.height.mas_equalTo(44);
}];
[self.closeButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(8);
make.right.mas_equalTo(-8);
make.width.height.mas_equalTo(22);
}];
}
#pragma mark - events
- (void)onCloseButtonClick:(UIButton *)button {
[TTPopup dismiss];
}
- (void)onJumpButtonClick:(UIButton *)button {
}
//- (void)setVipInfo:(NobleAuthInfo *)vipInfo {
// self.titleLabel.text = vipInfo.authName;
// self.descView.text = vipInfo.authIntro;
// self.iconImageView.imageUrl = vipInfo.descPic;
//}
@end