2.0.0版本首页UI更改
@@ -200,6 +200,8 @@
|
||||
237B94BF2A984DA7007853E3 /* XPRoomTrumpetView.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B94B82A984DA7007853E3 /* XPRoomTrumpetView.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 */; };
|
||||
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 */; };
|
||||
23B2AEC42A6516C200543D17 /* LoginForgetPasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 23B2AEC22A6516C200543D17 /* LoginForgetPasswordViewController.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>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
@@ -8301,6 +8307,10 @@
|
||||
E87DF4C12A42C900009C1185 /* XPNoteView.m */,
|
||||
E87E62612A3F5689002F68C9 /* XPNewHomeNavView.h */,
|
||||
E87E62602A3F5689002F68C9 /* XPNewHomeNavView.m */,
|
||||
23A4396F2AA1CBF3002E6039 /* XPNewHomeItemView.h */,
|
||||
23A439702AA1CBF3002E6039 /* XPNewHomeItemView.m */,
|
||||
23A439722AA1CF7C002E6039 /* XPNewHomeHeadView.h */,
|
||||
23A439732AA1CF7C002E6039 /* XPNewHomeHeadView.m */,
|
||||
);
|
||||
path = CustomView;
|
||||
sourceTree = "<group>";
|
||||
@@ -10743,6 +10753,7 @@
|
||||
E84150C527747E0900A7F548 /* FirstRechargeRewardModel.m in Sources */,
|
||||
E8B9843328ABA2FF0022D026 /* MonentsPicResInfo.m in Sources */,
|
||||
9BE9F10227FEE5C200667200 /* XPAnchorFansTaskDetailModel.m in Sources */,
|
||||
23A439712AA1CBF3002E6039 /* XPNewHomeItemView.m in Sources */,
|
||||
E8E0DAE6285C280E00566A2F /* XPSessionFindNewAlertView.m in Sources */,
|
||||
E85E7B1A2A4EB0D200B6D00A /* XPMineGoldIncomeRecordVC.m in Sources */,
|
||||
E86596542701A55500846EBD /* StatisticsServiceHelper.m in Sources */,
|
||||
@@ -11105,6 +11116,7 @@
|
||||
E80B0734280D740600A79F63 /* MessageContentGuildView.m in Sources */,
|
||||
E8395334276A03C300CF2F24 /* XPMineDressUpPresenter.m in Sources */,
|
||||
E85E7B212A4EB0D300B6D00A /* XPNewMineGuildIncomeRecordViewController.m in Sources */,
|
||||
23A439742AA1CF7C002E6039 /* XPNewHomeHeadView.m in Sources */,
|
||||
189DD75926E6003C00AB55B1 /* Api.m in Sources */,
|
||||
2331C1652A5EB71000E1D940 /* NobleRechargeModel.m in Sources */,
|
||||
E87C0A9D27D9986700CB2241 /* XPRoomFaceCollectionFlowLayout.m in Sources */,
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 579 B After Width: | Height: | Size: 530 B |
Before Width: | Height: | Size: 875 B After Width: | Height: | Size: 847 B |
16
YuMi/Modules/YMNewHome/View/CustomView/XPNewHomeHeadView.h
Normal 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
|
20
YuMi/Modules/YMNewHome/View/CustomView/XPNewHomeHeadView.m
Normal 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
|
19
YuMi/Modules/YMNewHome/View/CustomView/XPNewHomeItemView.h
Normal 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
|
96
YuMi/Modules/YMNewHome/View/CustomView/XPNewHomeItemView.m
Normal 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
|
@@ -49,31 +49,31 @@
|
||||
make.left.mas_equalTo(self).offset(15);
|
||||
make.height.mas_equalTo(32);
|
||||
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) {
|
||||
make.width.mas_equalTo(22);
|
||||
make.height.mas_equalTo(22);
|
||||
make.left.mas_equalTo(self.searchView).offset(13);
|
||||
make.width.mas_equalTo(16);
|
||||
make.height.mas_equalTo(16);
|
||||
make.left.mas_equalTo(self.searchView).offset(15);
|
||||
make.centerY.mas_equalTo(self.searchView);
|
||||
}];
|
||||
|
||||
[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);
|
||||
}];
|
||||
|
||||
[self.rankButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.opeRoomButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(30);
|
||||
make.height.mas_equalTo(30);
|
||||
make.height.mas_equalTo(32);
|
||||
make.centerY.mas_equalTo(self.searchView);
|
||||
make.right.mas_equalTo(self).offset(-15);
|
||||
}];
|
||||
|
||||
[self.opeRoomButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.centerY.mas_equalTo(self.rankButton);
|
||||
make.right.mas_equalTo(self.rankButton.mas_left).offset(-12);
|
||||
[self.rankButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.centerY.mas_equalTo(self.opeRoomButton);
|
||||
make.right.mas_equalTo(self.opeRoomButton.mas_left).offset(-12);
|
||||
}];
|
||||
}
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#import "XPHomeRecommendViewController.h"
|
||||
#import "XPNewHomeNavView.h"
|
||||
#import "XPRoomViewController.h"
|
||||
|
||||
///P
|
||||
#import "XPHomeContainerPresenter.h"
|
||||
#import "XPHomeContainerProtocol.h"
|
||||
@@ -40,7 +41,9 @@ UIKIT_EXTERN NSString * kHomeMoreScrollPageKey;
|
||||
UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
|
||||
@interface XPNewHomeViewController ()<JXCategoryViewDelegate, JXCategoryListContainerViewDelegate, XPHomeContainerProtocol, XPNewHomeNavViewDelegate>
|
||||
///背景
|
||||
@property (nonatomic,strong) UIImageView *backImageView;
|
||||
///导航
|
||||
@property (nonatomic,strong) XPNewHomeNavView *navView;
|
||||
///分页标题
|
||||
@property (nonatomic, strong) NSArray<NSString *> *titles;
|
||||
|