2.0.0版本首页UI更改

This commit is contained in:
liyuhua
2023-09-01 15:52:10 +08:00
parent 79076f549f
commit 2ff47ed7b5
13 changed files with 176 additions and 10 deletions

View File

@@ -200,6 +200,8 @@
237B94BF2A984DA7007853E3 /* XPRoomTrumpetView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B94B82A984DA7007853E3 /* XPRoomTrumpetView.m */; }; 237B94BF2A984DA7007853E3 /* XPRoomTrumpetView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B94B82A984DA7007853E3 /* XPRoomTrumpetView.m */; };
237B94C02A984DA7007853E3 /* Api+RoomTrumpet.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B94BA2A984DA7007853E3 /* Api+RoomTrumpet.m */; }; 237B94C02A984DA7007853E3 /* Api+RoomTrumpet.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B94BA2A984DA7007853E3 /* Api+RoomTrumpet.m */; };
23942E912A86424500D0ECC2 /* XPLoginAuthCodeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 23942E902A86424500D0ECC2 /* XPLoginAuthCodeVC.m */; }; 23942E912A86424500D0ECC2 /* XPLoginAuthCodeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 23942E902A86424500D0ECC2 /* XPLoginAuthCodeVC.m */; };
23A439712AA1CBF3002E6039 /* XPNewHomeItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23A439702AA1CBF3002E6039 /* XPNewHomeItemView.m */; };
23A439742AA1CF7C002E6039 /* XPNewHomeHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23A439732AA1CF7C002E6039 /* XPNewHomeHeadView.m */; };
23B2AEC12A64E9C200543D17 /* LoginForgetEditView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23B2AEC02A64E9C200543D17 /* LoginForgetEditView.m */; }; 23B2AEC12A64E9C200543D17 /* LoginForgetEditView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23B2AEC02A64E9C200543D17 /* LoginForgetEditView.m */; };
23B2AEC42A6516C200543D17 /* LoginForgetPasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 23B2AEC22A6516C200543D17 /* LoginForgetPasswordViewController.m */; }; 23B2AEC42A6516C200543D17 /* LoginForgetPasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 23B2AEC22A6516C200543D17 /* LoginForgetPasswordViewController.m */; };
23BA165B2A5D2ACF0030C5A3 /* PIBaseAnimationViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 23BA165A2A5D2ACF0030C5A3 /* PIBaseAnimationViewModel.m */; }; 23BA165B2A5D2ACF0030C5A3 /* PIBaseAnimationViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 23BA165A2A5D2ACF0030C5A3 /* PIBaseAnimationViewModel.m */; };
@@ -1748,6 +1750,10 @@
237B94BB2A984DA7007853E3 /* Api+RoomTrumpet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Api+RoomTrumpet.h"; sourceTree = "<group>"; }; 237B94BB2A984DA7007853E3 /* Api+RoomTrumpet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Api+RoomTrumpet.h"; sourceTree = "<group>"; };
23942E8F2A86424500D0ECC2 /* XPLoginAuthCodeVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginAuthCodeVC.h; sourceTree = "<group>"; }; 23942E8F2A86424500D0ECC2 /* XPLoginAuthCodeVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginAuthCodeVC.h; sourceTree = "<group>"; };
23942E902A86424500D0ECC2 /* XPLoginAuthCodeVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginAuthCodeVC.m; sourceTree = "<group>"; }; 23942E902A86424500D0ECC2 /* XPLoginAuthCodeVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLoginAuthCodeVC.m; sourceTree = "<group>"; };
23A4396F2AA1CBF3002E6039 /* XPNewHomeItemView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNewHomeItemView.h; sourceTree = "<group>"; };
23A439702AA1CBF3002E6039 /* XPNewHomeItemView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNewHomeItemView.m; sourceTree = "<group>"; };
23A439722AA1CF7C002E6039 /* XPNewHomeHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNewHomeHeadView.h; sourceTree = "<group>"; };
23A439732AA1CF7C002E6039 /* XPNewHomeHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNewHomeHeadView.m; sourceTree = "<group>"; };
23B2AEBF2A64E9C200543D17 /* LoginForgetEditView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginForgetEditView.h; sourceTree = "<group>"; }; 23B2AEBF2A64E9C200543D17 /* LoginForgetEditView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginForgetEditView.h; sourceTree = "<group>"; };
23B2AEC02A64E9C200543D17 /* LoginForgetEditView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginForgetEditView.m; sourceTree = "<group>"; }; 23B2AEC02A64E9C200543D17 /* LoginForgetEditView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginForgetEditView.m; sourceTree = "<group>"; };
23B2AEC22A6516C200543D17 /* LoginForgetPasswordViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginForgetPasswordViewController.m; sourceTree = "<group>"; }; 23B2AEC22A6516C200543D17 /* LoginForgetPasswordViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginForgetPasswordViewController.m; sourceTree = "<group>"; };
@@ -8301,6 +8307,10 @@
E87DF4C12A42C900009C1185 /* XPNoteView.m */, E87DF4C12A42C900009C1185 /* XPNoteView.m */,
E87E62612A3F5689002F68C9 /* XPNewHomeNavView.h */, E87E62612A3F5689002F68C9 /* XPNewHomeNavView.h */,
E87E62602A3F5689002F68C9 /* XPNewHomeNavView.m */, E87E62602A3F5689002F68C9 /* XPNewHomeNavView.m */,
23A4396F2AA1CBF3002E6039 /* XPNewHomeItemView.h */,
23A439702AA1CBF3002E6039 /* XPNewHomeItemView.m */,
23A439722AA1CF7C002E6039 /* XPNewHomeHeadView.h */,
23A439732AA1CF7C002E6039 /* XPNewHomeHeadView.m */,
); );
path = CustomView; path = CustomView;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -10743,6 +10753,7 @@
E84150C527747E0900A7F548 /* FirstRechargeRewardModel.m in Sources */, E84150C527747E0900A7F548 /* FirstRechargeRewardModel.m in Sources */,
E8B9843328ABA2FF0022D026 /* MonentsPicResInfo.m in Sources */, E8B9843328ABA2FF0022D026 /* MonentsPicResInfo.m in Sources */,
9BE9F10227FEE5C200667200 /* XPAnchorFansTaskDetailModel.m in Sources */, 9BE9F10227FEE5C200667200 /* XPAnchorFansTaskDetailModel.m in Sources */,
23A439712AA1CBF3002E6039 /* XPNewHomeItemView.m in Sources */,
E8E0DAE6285C280E00566A2F /* XPSessionFindNewAlertView.m in Sources */, E8E0DAE6285C280E00566A2F /* XPSessionFindNewAlertView.m in Sources */,
E85E7B1A2A4EB0D200B6D00A /* XPMineGoldIncomeRecordVC.m in Sources */, E85E7B1A2A4EB0D200B6D00A /* XPMineGoldIncomeRecordVC.m in Sources */,
E86596542701A55500846EBD /* StatisticsServiceHelper.m in Sources */, E86596542701A55500846EBD /* StatisticsServiceHelper.m in Sources */,
@@ -11105,6 +11116,7 @@
E80B0734280D740600A79F63 /* MessageContentGuildView.m in Sources */, E80B0734280D740600A79F63 /* MessageContentGuildView.m in Sources */,
E8395334276A03C300CF2F24 /* XPMineDressUpPresenter.m in Sources */, E8395334276A03C300CF2F24 /* XPMineDressUpPresenter.m in Sources */,
E85E7B212A4EB0D300B6D00A /* XPNewMineGuildIncomeRecordViewController.m in Sources */, E85E7B212A4EB0D300B6D00A /* XPNewMineGuildIncomeRecordViewController.m in Sources */,
23A439742AA1CF7C002E6039 /* XPNewHomeHeadView.m in Sources */,
189DD75926E6003C00AB55B1 /* Api.m in Sources */, 189DD75926E6003C00AB55B1 /* Api.m in Sources */,
2331C1652A5EB71000E1D940 /* NobleRechargeModel.m in Sources */, 2331C1652A5EB71000E1D940 /* NobleRechargeModel.m in Sources */,
E87C0A9D27D9986700CB2241 /* XPRoomFaceCollectionFlowLayout.m in Sources */, E87C0A9D27D9986700CB2241 /* XPRoomFaceCollectionFlowLayout.m in Sources */,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 B

After

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 B

After

Width:  |  Height:  |  Size: 847 B

View File

@@ -0,0 +1,16 @@
//
// XPNewHomeHeadView.h
// YuMi
//
// Created by duoban on 2023/9/1.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPNewHomeHeadView : UIView
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,20 @@
//
// XPNewHomeHeadView.m
// YuMi
//
// Created by duoban on 2023/9/1.
//
#import "XPNewHomeHeadView.h"
#import "XPNewHomeItemView.h"
@implementation XPNewHomeHeadView
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end

View File

@@ -0,0 +1,19 @@
//
// XPNewHomeItemView.h
// YuMi
//
// Created by duoban on 2023/9/1.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPNewHomeItemView : UIView
@property(nonatomic,strong) UIImage *bgImage;
@property(nonatomic,copy) NSString *title;
@property(nonatomic,strong) NSString *subTitle;
-(instancetype)initWithFrame:(CGRect)frame type:(int)type;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,96 @@
//
// XPNewHomeItemView.m
// YuMi
//
// Created by duoban on 2023/9/1.
//
#import "XPNewHomeItemView.h"
@interface XPNewHomeItemView()
///
@property(nonatomic,strong) UIImageView *bgImageView;
//
@property(nonatomic,strong) UILabel *titleView;
///
@property(nonatomic,strong) UILabel *subTitleView;
@property(nonatomic,assign) int type;
@end
@implementation XPNewHomeItemView
-(instancetype)initWithFrame:(CGRect)frame type:(int)type{
self = [super initWithFrame:frame];
if(self){
[self installUI];
[self installConstraints];
}
return self;
}
-(void)installUI{
[self addSubview:self.bgImageView];
[self.bgImageView addSubview:self.titleView];
[self.bgImageView addSubview:self.subTitleView];
}
-(void)installConstraints{
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self);
}];
if(self.type == 0){
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(25));
make.leading.mas_equalTo(kGetScaleWidth(11));
make.height.mas_equalTo(kGetScaleWidth(18));
}];
[self.subTitleView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(49));
make.leading.mas_equalTo(kGetScaleWidth(11));
make.height.mas_equalTo(kGetScaleWidth(17));
}];
return;
}
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(22));
make.leading.mas_equalTo(kGetScaleWidth(11));
make.height.mas_equalTo(kGetScaleWidth(18));
}];
[self.subTitleView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(46));
make.leading.mas_equalTo(kGetScaleWidth(11));
make.height.mas_equalTo(kGetScaleWidth(17));
}];
}
#pragma mark -
- (void)setBgImage:(UIImage *)bgImage{
_bgImage = bgImage;
_bgImageView.image = bgImage;
}
- (void)setTitle:(NSString *)title{
_title = title;
_titleView.text = _title;
}
- (void)setSubTitle:(NSString *)subTitle{
_subTitle = subTitle;
_subTitleView.text = _subTitle;
}
#pragma mark -
- (UIImageView *)bgImageView{
if(!_bgImageView){
_bgImageView = [UIImageView new];
_bgImageView.userInteractionEnabled = YES;
}
return _bgImageView;
}
- (UILabel *)titleView{
if(!_titleView){
_titleView = [UILabel labelInitWithText:@"" font:kFontBold(18) textColor:[UIColor whiteColor]];
}
return _titleView;
}
- (UILabel *)subTitleView{
if(!_subTitleView){
_subTitleView = [UILabel labelInitWithText:@"" font:kFontRegular(12) textColor:[UIColor colorWithWhite:1 alpha:0.8]];
}
return _subTitleView;
}
@end

View File

@@ -49,31 +49,31 @@
make.left.mas_equalTo(self).offset(15); make.left.mas_equalTo(self).offset(15);
make.height.mas_equalTo(32); make.height.mas_equalTo(32);
make.top.mas_equalTo(self).offset(statusbarHeight + 6); make.top.mas_equalTo(self).offset(statusbarHeight + 6);
make.right.mas_equalTo(self.opeRoomButton.mas_left).offset(-36); make.right.mas_equalTo(self.rankButton.mas_left).offset(-15);
}]; }];
[self.searchImageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.searchImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(22); make.width.mas_equalTo(16);
make.height.mas_equalTo(22); make.height.mas_equalTo(16);
make.left.mas_equalTo(self.searchView).offset(13); make.left.mas_equalTo(self.searchView).offset(15);
make.centerY.mas_equalTo(self.searchView); make.centerY.mas_equalTo(self.searchView);
}]; }];
[self.searchLabel mas_makeConstraints:^(MASConstraintMaker *make) { [self.searchLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.searchImageView.mas_right).offset(2); make.left.mas_equalTo(self.searchImageView.mas_right).offset(7);
make.centerY.mas_equalTo(self.searchView); make.centerY.mas_equalTo(self.searchView);
}]; }];
[self.rankButton mas_makeConstraints:^(MASConstraintMaker *make) { [self.opeRoomButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(30); make.width.mas_equalTo(30);
make.height.mas_equalTo(30); make.height.mas_equalTo(32);
make.centerY.mas_equalTo(self.searchView); make.centerY.mas_equalTo(self.searchView);
make.right.mas_equalTo(self).offset(-15); make.right.mas_equalTo(self).offset(-15);
}]; }];
[self.opeRoomButton mas_makeConstraints:^(MASConstraintMaker *make) { [self.rankButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.centerY.mas_equalTo(self.rankButton); make.width.height.centerY.mas_equalTo(self.opeRoomButton);
make.right.mas_equalTo(self.rankButton.mas_left).offset(-12); make.right.mas_equalTo(self.opeRoomButton.mas_left).offset(-12);
}]; }];
} }

View File

@@ -30,6 +30,7 @@
#import "XPHomeRecommendViewController.h" #import "XPHomeRecommendViewController.h"
#import "XPNewHomeNavView.h" #import "XPNewHomeNavView.h"
#import "XPRoomViewController.h" #import "XPRoomViewController.h"
///P ///P
#import "XPHomeContainerPresenter.h" #import "XPHomeContainerPresenter.h"
#import "XPHomeContainerProtocol.h" #import "XPHomeContainerProtocol.h"
@@ -40,7 +41,9 @@ UIKIT_EXTERN NSString * kHomeMoreScrollPageKey;
UIKIT_EXTERN NSString * const kOpenRoomNotification; UIKIT_EXTERN NSString * const kOpenRoomNotification;
@interface XPNewHomeViewController ()<JXCategoryViewDelegate, JXCategoryListContainerViewDelegate, XPHomeContainerProtocol, XPNewHomeNavViewDelegate> @interface XPNewHomeViewController ()<JXCategoryViewDelegate, JXCategoryListContainerViewDelegate, XPHomeContainerProtocol, XPNewHomeNavViewDelegate>
///
@property (nonatomic,strong) UIImageView *backImageView; @property (nonatomic,strong) UIImageView *backImageView;
///
@property (nonatomic,strong) XPNewHomeNavView *navView; @property (nonatomic,strong) XPNewHomeNavView *navView;
/// ///
@property (nonatomic, strong) NSArray<NSString *> *titles; @property (nonatomic, strong) NSArray<NSString *> *titles;