This commit is contained in:
启星
2025-10-20 20:05:55 +08:00
parent fdeed970d4
commit 0e20842c69
714 changed files with 5210 additions and 78 deletions

View File

@@ -25,6 +25,7 @@
#import "QXRechargePermissionModel.h"
#import "QXNiceGiftPopView.h" //
#import "QXFirstRechargeView.h" //
#import "QXHomeTopView.h"
@interface QXHomeViewController ()<JXPagerViewDelegate,JXCategoryViewDelegate,GKCycleScrollViewDataSource,GKCycleScrollViewDelegate,QXGiftScrollViewDelegate,SDCycleScrollViewDelegate>
@property (nonatomic, strong) JXPagerView *pagingView;
@@ -32,7 +33,8 @@
@property (nonatomic,strong)NSMutableArray <UIViewController*>*listVCArray;
@property (nonatomic,strong)NSMutableArray *titles;
@property (nonatomic,strong)NSArray *titleModelArray;
@property (nonatomic,strong)GKCycleScrollView *cycleScrollView;
//@property (nonatomic,strong)GKCycleScrollView *cycleScrollView;
@property (nonatomic,strong)QXHomeTopView *topView;
@property (nonatomic,strong)JXCategoryIndicatorImageView *indicatorView;
@property (nonatomic,strong)UIButton *rankRightBtn;
@property (nonatomic,strong)UIButton *searchRightBtn;
@@ -84,28 +86,28 @@
make.height.mas_equalTo(32);
}];
[self.view addSubview:self.rankRightBtn];
// [self.view addSubview:self.rankRightBtn];
[self.view addSubview:self.searchRightBtn];
[self.view addSubview:self.roomBtn];
[self.roomBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(54);
make.height.mas_equalTo(26);
// [self.view addSubview:self.roomBtn];
//
// [self.roomBtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.width.mas_equalTo(54);
// make.height.mas_equalTo(26);
// make.centerY.equalTo(logoImageView);
// make.right.equalTo(self.view).offset(-10);
// }];
//
// [self.rankRightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.right.equalTo(self.roomBtn.mas_left).offset(-10);
// make.centerY.equalTo(self.roomBtn);
// make.width.height.mas_equalTo(32);
// }];
//
[self.searchRightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(32);
make.centerY.equalTo(logoImageView);
make.right.equalTo(self.view).offset(-10);
}];
[self.rankRightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.roomBtn.mas_left).offset(-10);
make.centerY.equalTo(self.roomBtn);
make.width.height.mas_equalTo(32);
}];
[self.searchRightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.rankRightBtn.mas_left).offset(-10);
make.centerY.equalTo(self.roomBtn);
make.width.height.mas_equalTo(30);
}];
self.listVCArray = [NSMutableArray array];
@@ -399,7 +401,7 @@
self.appStoreView.hidden = YES;
}
// weakSelf.appStoreView.dataArray = list;
[self.cycleScrollView reloadData];
[self.topView reloadData];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
}];
@@ -568,15 +570,15 @@
}
-(UIView *)headerView{
if (!_headerView) {
_headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, self.cycleScrollView.height+self.bannerScrollView.height+10)];
[_headerView addSubview:self.cycleScrollView];
_headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, self.topView.height+self.bannerScrollView.height+10)];
[_headerView addSubview:self.topView];
[_headerView addSubview:self.bannerScrollView];
}
return _headerView;
}
-(SDCycleScrollView *)bannerScrollView{
if (!_bannerScrollView) {
_bannerScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(16, self.cycleScrollView.bottom+10, SCREEN_WIDTH-32, ScaleWidth(95)) delegate:self placeholderImage:nil];
_bannerScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(16, self.topView.bottom+10, SCREEN_WIDTH-32, ScaleWidth(95)) delegate:self placeholderImage:nil];
_bannerScrollView.backgroundColor = [UIColor clearColor];
_bannerScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
[_bannerScrollView addRoundedCornersWithRadius:8] ;
@@ -584,22 +586,28 @@
}
return _bannerScrollView;
}
-(GKCycleScrollView *)cycleScrollView{
if (!_cycleScrollView) {
_cycleScrollView = [[GKCycleScrollView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 155)];
_cycleScrollView.dataSource = self;
_cycleScrollView.delegate = self;
_cycleScrollView.minimumCellAlpha = 0.0;
_cycleScrollView.leftRightMargin = 16.0f;
_cycleScrollView.topBottomMargin = 15.0f;
_cycleScrollView.isInfiniteLoop = YES;
_cycleScrollView.isAutoScroll = YES;
//-(GKCycleScrollView *)cycleScrollView{
// if (!_cycleScrollView) {
// _cycleScrollView = [[GKCycleScrollView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 155)];
// _cycleScrollView.dataSource = self;
// _cycleScrollView.delegate = self;
// _cycleScrollView.minimumCellAlpha = 0.0;
// _cycleScrollView.leftRightMargin = 16.0f;
// _cycleScrollView.topBottomMargin = 15.0f;
// _cycleScrollView.isInfiniteLoop = YES;
// _cycleScrollView.isAutoScroll = YES;
// }
// return _cycleScrollView;
//}
-(QXHomeTopView *)topView{
if (!_topView) {
_topView = [[QXHomeTopView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, ScaleWidth(184))];
}
return _cycleScrollView;
return _topView;
}
-(QXGiftScrollView *)giftScrollView{
if (!_giftScrollView) {
_giftScrollView = [[QXGiftScrollView alloc] initWithFrame:CGRectMake(16, self.cycleScrollView.bottom, SCREEN_WIDTH-32, 36)];
_giftScrollView = [[QXGiftScrollView alloc] initWithFrame:CGRectMake(16, self.topView.bottom+12, SCREEN_WIDTH-32, 36)];
_giftScrollView.delegate = self;
}
return _giftScrollView;
@@ -616,21 +624,7 @@
}
return _bannerArry;
}
//-(UIButton *)firstRechargeBtn{
// if (!_firstRechargeBtn) {
// _firstRechargeBtn = [[UIButton alloc] init];
// [_firstRechargeBtn setBackgroundImage:[UIImage imageNamed:@"first_recharge_icon"] forState:(UIControlStateNormal)];
// [_firstRechargeBtn addTarget:self action:@selector(firstAction) forControlEvents:(UIControlEventTouchUpInside)];
// }
// return _firstRechargeBtn;
//}
//-(UIButton *)skyDownBtn{
// if (!_skyDownBtn) {
// _skyDownBtn = [[UIButton alloc] init];
// [_skyDownBtn setBackgroundImage:[UIImage imageNamed:@"sky_down_gift_icon"] forState:(UIControlStateNormal)];
// }
// return _skyDownBtn;
//}
-(QXNewPeoplePopView *)nPeopleRechargeView{
if (!_nPeopleRechargeView) {
_nPeopleRechargeView = [[QXNewPeoplePopView alloc] init];