覆盖羽声
This commit is contained in:
@@ -17,9 +17,14 @@
|
||||
#import "QXHomePageNetwork.h"
|
||||
#import "QXMyRoomViewController.h"
|
||||
#import "QXUserHomePageViewController.h"
|
||||
#import "QXFirstRechargePopView.h"
|
||||
#import "QXNewPeoplePopView.h"
|
||||
#import "QXRechargeView.h"
|
||||
#import "QXAppstoreHomeView.h"
|
||||
#import "QXConfig.h"
|
||||
#import "QXSkyPraizeView.h"
|
||||
#import "QXRechargePermissionModel.h"
|
||||
#import "QXNiceGiftPopView.h" // 天降好礼
|
||||
#import "QXFirstRechargeView.h" // 首充好礼
|
||||
|
||||
@interface QXHomeViewController ()<JXPagerViewDelegate,JXCategoryViewDelegate,GKCycleScrollViewDataSource,GKCycleScrollViewDelegate,QXGiftScrollViewDelegate,SDCycleScrollViewDelegate>
|
||||
@property (nonatomic, strong) JXPagerView *pagingView;
|
||||
@@ -40,11 +45,15 @@
|
||||
@property (nonatomic,strong)UIView *headerView;
|
||||
@property (nonatomic,strong)UIView *sectionView;
|
||||
|
||||
@property (nonatomic,strong)UIButton *firstRechargeBtn;
|
||||
//@property (nonatomic,strong)UIButton *firstRechargeBtn;
|
||||
@property (nonatomic,strong)UIButton *skyDownBtn;
|
||||
@property (nonatomic,strong)QXFirstRechargePopView *firstRechargeView;
|
||||
@property (nonatomic,strong)QXNewPeoplePopView *nPeopleRechargeView;
|
||||
|
||||
@property (nonatomic,strong)QXAppstoreHomeView *appStoreView;
|
||||
@property (nonatomic,strong)SDCycleScrollView *rechargePermissionView;
|
||||
@property (nonatomic,strong)NSMutableArray *rechargePermissionArray;
|
||||
|
||||
@property (nonatomic,strong)QXRechargePermissionModel *permissionModel;
|
||||
@end
|
||||
|
||||
@implementation QXHomeViewController
|
||||
@@ -53,6 +62,7 @@
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginSuccess) name:noticeUserLogin object:nil];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(rechargeSuccess) name:noticeAlipayResult object:nil];
|
||||
}
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
@@ -60,32 +70,43 @@
|
||||
}
|
||||
|
||||
- (void)initSubViews{
|
||||
UILabel *tLabel = [[UILabel alloc] init];
|
||||
tLabel.text = QXText(@"羽声");
|
||||
tLabel.font = [UIFont boldSystemFontOfSize:20];
|
||||
[self.view addSubview:tLabel];
|
||||
[tLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
if ([QXConfig.backgroundImage hasPrefix:@"http"] || [QXConfig.backgroundImage hasPrefix:@"https"]) {
|
||||
[self updateBgImage:QXConfig.backgroundImage];
|
||||
}else{
|
||||
[self updateBgImage:@"app_home_bg"];
|
||||
}
|
||||
UIImageView *logoImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mi_di"]];
|
||||
[self.view addSubview:logoImageView];
|
||||
[logoImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
make.top.mas_equalTo(kSafeAreaTop +10);
|
||||
make.top.mas_equalTo(kSafeAreaTop +8);
|
||||
make.width.mas_equalTo(66);
|
||||
make.height.mas_equalTo(32);
|
||||
}];
|
||||
|
||||
[self.view addSubview:self.rankRightBtn];
|
||||
[self.view addSubview:self.searchRightBtn];
|
||||
[self.view addSubview:self.roomBtn];
|
||||
|
||||
[self.roomBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(30);
|
||||
make.centerY.equalTo(tLabel);
|
||||
make.width.mas_equalTo(54);
|
||||
make.height.mas_equalTo(26);
|
||||
make.centerY.equalTo(logoImageView);
|
||||
make.right.equalTo(self.view).offset(-10);
|
||||
}];
|
||||
[self.searchRightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.equalTo(self.roomBtn.mas_left).offset(-10);
|
||||
make.centerY.width.height.equalTo(self.roomBtn);
|
||||
}];
|
||||
|
||||
[self.rankRightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.equalTo(self.searchRightBtn.mas_left).offset(-10);
|
||||
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];
|
||||
[self requestSlideToolData];
|
||||
@@ -98,24 +119,32 @@
|
||||
self.categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagingView.listContainerView;
|
||||
self.pagingView.listContainerView.listCellBackgroundColor = [UIColor clearColor];
|
||||
// [self performSelector:@selector(giftScrollViewShow) afterDelay:5];
|
||||
MJWeakSelf
|
||||
// MJWeakSelf
|
||||
@weakify(self)
|
||||
self.pagingView.mainTableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
[weakSelf requestSlideToolData];
|
||||
[weakSelf getTopRoomList];
|
||||
[weakSelf getBanner];
|
||||
@strongify(self)
|
||||
[self requestSlideToolData];
|
||||
[self getTopRoomList];
|
||||
[self getBanner];
|
||||
}];
|
||||
|
||||
self.firstRechargeBtn.hidden = YES;
|
||||
[self.view addSubview:self.firstRechargeBtn];
|
||||
[self.firstRechargeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(-(TabbarContentHeight+5));
|
||||
make.right.equalTo(self.view).offset(-17);
|
||||
make.width.height.mas_equalTo(ScaleWidth(57));
|
||||
}];
|
||||
// self.firstRechargeBtn.hidden = YES;
|
||||
// [self.view addSubview:self.firstRechargeBtn];
|
||||
// [self.firstRechargeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.bottom.mas_equalTo(-(TabbarContentHeight+5));
|
||||
// make.right.equalTo(self.view).offset(-17);
|
||||
// make.width.height.mas_equalTo(ScaleWidth(57));
|
||||
// }];
|
||||
[self getBanner];
|
||||
[self getFirstRechargePermission];
|
||||
[self getRechargePermission];
|
||||
self.appStoreView.hidden = YES;
|
||||
[self.view addSubview:self.appStoreView];
|
||||
|
||||
self.rechargePermissionView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(SCREEN_WIDTH-80-17, SCREEN_HEIGHT-(TabbarContentHeight+90+80), 80, 80) delegate:self placeholderImage:nil];
|
||||
self.rechargePermissionView.pageControlBottomOffset = -15;
|
||||
self.rechargePermissionView.backgroundColor = [UIColor clearColor];
|
||||
self.rechargePermissionView.hidden = YES;
|
||||
[self.view addSubview:self.rechargePermissionView];
|
||||
}
|
||||
- (void)viewDidLayoutSubviews {
|
||||
[super viewDidLayoutSubviews];
|
||||
@@ -127,46 +156,91 @@
|
||||
[self getTopRoomList];
|
||||
[self getBanner];
|
||||
}
|
||||
-(void)rechargeSuccess{
|
||||
[self getRechargePermission];
|
||||
}
|
||||
- (void)requestSlideToolData {
|
||||
__weak typeof(self) weakSelf = self;
|
||||
@weakify(self)
|
||||
[QXHomePageNetwork homeRoomLabelListsuccessBlock:^(NSArray<QXMyRoomType *> * _Nonnull list) {
|
||||
[weakSelf.titles removeAllObjects];
|
||||
@strongify(self)
|
||||
[self.titles removeAllObjects];
|
||||
NSMutableArray *arr = [NSMutableArray array];
|
||||
[weakSelf.titles addObjectsFromArray:list];
|
||||
[self.titles addObjectsFromArray:list];
|
||||
for (QXMyRoomType *md in list) {
|
||||
[arr addObject:md.label_name];
|
||||
}
|
||||
weakSelf.categoryView.titles = arr;
|
||||
[weakSelf.categoryView reloadData];
|
||||
[weakSelf.pagingView.mainTableView.mj_header endRefreshing];
|
||||
self.categoryView.titles = arr;
|
||||
[self.categoryView reloadData];
|
||||
[self.pagingView.mainTableView.mj_header endRefreshing];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
[weakSelf.pagingView.mainTableView.mj_header endRefreshing];
|
||||
[self.pagingView.mainTableView.mj_header endRefreshing];
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)getFirstRechargePermission{
|
||||
MJWeakSelf
|
||||
[QXHomePageNetwork getFirstRechargePermissionSuccessBlock:^(BOOL isShow) {
|
||||
weakSelf.firstRechargeBtn.hidden = !isShow;
|
||||
//-(void)getFirstRechargePermission{
|
||||
// @weakify(self)
|
||||
// [QXHomePageNetwork getFirstRechargePermissionSuccessBlock:^(BOOL isShow) {
|
||||
// @strongify(self)
|
||||
// self.firstRechargeBtn.hidden = !isShow;
|
||||
// } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
//
|
||||
// }];
|
||||
//}
|
||||
-(void)getRechargePermission{
|
||||
// sky_drop_gift_icon ,new_people_recharge_icon ,first_recharge_icon
|
||||
@weakify(self)
|
||||
[QXHomePageNetwork getRechargePermissionSuccessBlock:^(QXRechargePermissionModel * _Nonnull model) {
|
||||
@strongify(self)
|
||||
self.permissionModel = model;
|
||||
[self.rechargePermissionArray removeAllObjects];
|
||||
NSMutableArray *imgs = [NSMutableArray array];
|
||||
if (model.day_drop_permission.intValue == 1) {
|
||||
[imgs addObject:@"sky_drop_gift_icon"];
|
||||
QXRechargeTypeModel *md = [[QXRechargeTypeModel alloc] init];
|
||||
md.icon = @"sky_drop_gift_icon";
|
||||
md.type = 2;
|
||||
[self.rechargePermissionArray addObject:md];
|
||||
}
|
||||
if (model.first_charge_permission.intValue == 1) {
|
||||
[imgs addObject:@"first_recharge_icon"];
|
||||
QXRechargeTypeModel *md = [[QXRechargeTypeModel alloc] init];
|
||||
md.icon = @"first_recharge_icon";
|
||||
md.type = 3;
|
||||
[self.rechargePermissionArray addObject:md];
|
||||
}
|
||||
if (model.n_people_permission.intValue == 1) {
|
||||
[imgs addObject:@"new_people_recharge_icon"];
|
||||
QXRechargeTypeModel *md = [[QXRechargeTypeModel alloc] init];
|
||||
md.icon = @"new_people_recharge_icon";
|
||||
md.type = 1;
|
||||
[self.rechargePermissionArray addObject:md];
|
||||
}
|
||||
if (imgs.count==0) {
|
||||
return;
|
||||
}
|
||||
self.rechargePermissionView.hidden = NO;
|
||||
self.rechargePermissionView.imageURLStringsGroup = imgs;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
-(void)firstAction{
|
||||
[self popFirstRechargeView];
|
||||
}
|
||||
-(void)popFirstRechargeView{
|
||||
MJWeakSelf
|
||||
//-(void)firstAction{
|
||||
// [self popnPeopleRechargeView];
|
||||
//// QXSkyPraizeView *v = [[QXSkyPraizeView alloc] init];
|
||||
//// [v showInView:self.view];
|
||||
//}
|
||||
-(void)popnPeopleRechargeView{
|
||||
// MJWeakSelf
|
||||
// view.giftArray = @[@"",@"",@"",@"",@"",@""];
|
||||
self.firstRechargeView.closeActionBlock = ^{
|
||||
self.nPeopleRechargeView.closeActionBlock = ^{
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
|
||||
}];
|
||||
};
|
||||
self.firstRechargeView.rechargeActionBlock = ^(NSString * _Nonnull money) {
|
||||
self.nPeopleRechargeView.rechargeActionBlock = ^(NSString * _Nonnull money, NSString * _Nonnull gift_bag_id) {
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
QXRechargeView *recharge = [[QXRechargeView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
|
||||
@@ -174,15 +248,87 @@
|
||||
model.money = money;
|
||||
recharge.selectedModel = model;
|
||||
recharge.isPop = YES;
|
||||
recharge.gift_bag_id = gift_bag_id;
|
||||
recharge.isOnlyDisplayPayType = YES;
|
||||
[recharge showInView:KEYWINDOW];
|
||||
}];
|
||||
};
|
||||
[self.firstRechargeView reloadData];
|
||||
[[QXGlobal shareGlobal] showView:self.firstRechargeView popType:(PopViewTypeTopToCenter) tapDismiss:NO finishBlock:^{
|
||||
[self.nPeopleRechargeView reloadData];
|
||||
[[QXGlobal shareGlobal] showView:self.nPeopleRechargeView popType:(PopViewTypeTopToCenter) tapDismiss:NO finishBlock:^{
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)popNiceGiftView{
|
||||
MJWeakSelf
|
||||
QXNiceGiftPopView *view = [[QXNiceGiftPopView alloc] init];
|
||||
view.closeActionBlock = ^{
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
|
||||
}];
|
||||
};
|
||||
view.rechargeActionBlock = ^(NSString * _Nonnull money, NSString * _Nonnull gift_bag_id) {
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
QXRechargeView *recharge = [[QXRechargeView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
|
||||
QXRechargeListModel *model = [[QXRechargeListModel alloc] init];
|
||||
model.money = money;
|
||||
recharge.selectedModel = model;
|
||||
recharge.isPop = YES;
|
||||
recharge.gift_bag_id = gift_bag_id;
|
||||
recharge.isOnlyDisplayPayType = YES;
|
||||
[recharge showInView:KEYWINDOW];
|
||||
}];
|
||||
};
|
||||
|
||||
view.refreshBlcock = ^{
|
||||
[weakSelf getRechargePermission];
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
}];
|
||||
};
|
||||
[[QXGlobal shareGlobal] showView:view popType:(PopViewTypeTopToCenter) tapDismiss:NO finishBlock:^{
|
||||
|
||||
}];
|
||||
}
|
||||
-(void)popFirstRechargeView{
|
||||
if (self.permissionModel.first_charge_permission.intValue != 1) {
|
||||
return;
|
||||
}
|
||||
MJWeakSelf
|
||||
QXFirstRechargeView *view = [[QXFirstRechargeView alloc] init];
|
||||
view.closeActionBlock = ^{
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
|
||||
}];
|
||||
};
|
||||
view.rechargeActionBlock = ^(NSString * _Nonnull money, NSString * _Nonnull gift_bag_id) {
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
QXRechargeView *recharge = [[QXRechargeView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
|
||||
QXRechargeListModel *model = [[QXRechargeListModel alloc] init];
|
||||
model.money = money;
|
||||
recharge.selectedModel = model;
|
||||
recharge.isPop = YES;
|
||||
recharge.gift_bag_id = gift_bag_id;
|
||||
recharge.isOnlyDisplayPayType = YES;
|
||||
[recharge showInView:KEYWINDOW];
|
||||
}];
|
||||
};
|
||||
|
||||
view.refreshBlcock = ^{
|
||||
[weakSelf getRechargePermission];
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
}];
|
||||
};
|
||||
[[QXGlobal shareGlobal] showView:view popType:(PopViewTypeTopToCenter) tapDismiss:NO finishBlock:^{
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - JXPagingViewDelegate
|
||||
|
||||
- (UIView *)tableHeaderViewInPagerView:(JXPagerView *)pagerView {
|
||||
@@ -227,37 +373,50 @@
|
||||
self.giftScrollView.model = model;
|
||||
self.isShowGiftScrollView = YES;
|
||||
}
|
||||
-(void)giftScrollViewShowWithModelList:(NSArray<QXGiftScrollModel*>*)list{
|
||||
if (self.isShowGiftScrollView == NO) {
|
||||
self.bannerScrollView.top = self.giftScrollView.bottom+12;
|
||||
self.headerView.height += 12+self.giftScrollView.height;
|
||||
[self.headerView addSubview:self.giftScrollView];
|
||||
[self.pagingView resizeTableHeaderViewHeightWithAnimatable:YES duration:0.1 curve:UIViewAnimationCurveLinear];
|
||||
}
|
||||
++self.page;
|
||||
self.giftScrollView.list = list;
|
||||
self.isShowGiftScrollView = YES;
|
||||
}
|
||||
-(void)didClickGiftScrollView:(QXGiftScrollView *)giftScrollView index:(NSInteger)index model:(QXGiftScrollModel *)model{
|
||||
[[QXGlobal shareGlobal] joinRoomWithRoomId:model.roomId isRejoin:NO navagationController:self.navigationController];
|
||||
}
|
||||
- (void)getTopRoomList {
|
||||
__weak typeof(self)weakSelf = self;
|
||||
@weakify(self)
|
||||
[QXHomePageNetwork homeRoomListWithPage:0 is_top:YES label_id:@"" successBlock:^(NSArray<QXRoomListModel *> * _Nonnull list, BOOL isAppStore) {
|
||||
[weakSelf.dataArray removeAllObjects];
|
||||
[weakSelf.dataArray addObjectsFromArray:list];
|
||||
@strongify(self)
|
||||
[self.dataArray removeAllObjects];
|
||||
[self.dataArray addObjectsFromArray:list];
|
||||
if (isAppStore) {
|
||||
self.appStoreView.hidden = NO;
|
||||
}else{
|
||||
self.appStoreView.hidden = YES;
|
||||
}
|
||||
// weakSelf.appStoreView.dataArray = list;
|
||||
[weakSelf.cycleScrollView reloadData];
|
||||
[self.cycleScrollView reloadData];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
-(void)getBanner{
|
||||
MJWeakSelf
|
||||
@weakify(self)
|
||||
[QXHomePageNetwork homeBannerSuccessBlock:^(NSArray<QXBanner *> * _Nonnull list) {
|
||||
@strongify(self)
|
||||
NSMutableArray *arr = [NSMutableArray array];
|
||||
for (QXBanner *banner in list) {
|
||||
[arr addObject:banner.image];
|
||||
}
|
||||
[weakSelf.bannerArry removeAllObjects];
|
||||
[weakSelf.bannerArry addObjectsFromArray:list];
|
||||
weakSelf.appStoreView.bannerArray = list;
|
||||
weakSelf.bannerScrollView.imageURLStringsGroup = arr;
|
||||
[self.bannerArry removeAllObjects];
|
||||
[self.bannerArry addObjectsFromArray:list];
|
||||
self.appStoreView.bannerArray = list;
|
||||
self.bannerScrollView.imageURLStringsGroup = arr;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
@@ -277,7 +436,7 @@
|
||||
}
|
||||
|
||||
- (CGSize)sizeForCellInCycleScrollView:(GKCycleScrollView *)cycleScrollView {
|
||||
return CGSizeMake((SCREEN_WIDTH)/3, 113);
|
||||
return CGSizeMake(180, 155);
|
||||
}
|
||||
|
||||
- (void)cycleScrollView:(GKCycleScrollView *)cycleScrollView didSelectCellAtIndex:(NSInteger)index {
|
||||
@@ -292,6 +451,23 @@
|
||||
[[QXGlobal shareGlobal] logOut];
|
||||
return;
|
||||
}
|
||||
if (cycleScrollView == self.rechargePermissionView) {
|
||||
QXRechargeTypeModel *md = self.rechargePermissionArray[index];
|
||||
if (md.type == 1) {
|
||||
[self popnPeopleRechargeView];
|
||||
return;
|
||||
}
|
||||
if (md.type == 2) {
|
||||
[self popNiceGiftView];
|
||||
return;
|
||||
}
|
||||
if (md.type == 3) {
|
||||
[self popFirstRechargeView];
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
QXBanner *banner = self.bannerArry[index];
|
||||
if ([banner.type isEqualToString:@"2"]) {
|
||||
QXBaseWebViewController *webVc = [[QXBaseWebViewController alloc] init];
|
||||
@@ -371,28 +547,28 @@
|
||||
_categoryView = [[JXCategoryTitleView alloc] init];
|
||||
_categoryView.frame = CGRectMake(15, 0, SCREEN_WIDTH-30, 44);
|
||||
_categoryView.delegate = self;
|
||||
_categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#333333"];
|
||||
_categoryView.titleColor = [UIColor colorWithHexString:@"#666666"];
|
||||
_categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#FFFFFF"];
|
||||
_categoryView.titleColor = RGB16A(0xF1ECFF, 0.45);
|
||||
_categoryView.cellWidth = JXCategoryViewAutomaticDimension;
|
||||
_categoryView.contentEdgeInsetLeft = 3;
|
||||
_categoryView.cellSpacing = 16;
|
||||
_categoryView.titleLabelZoomEnabled = YES;
|
||||
_categoryView.titleFont = [UIFont boldSystemFontOfSize:13];
|
||||
_categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:18];
|
||||
_categoryView.titleFont = [UIFont boldSystemFontOfSize:16];
|
||||
_categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:20];
|
||||
_categoryView.averageCellSpacingEnabled = NO;
|
||||
JXCategoryIndicatorImageView *indicatorView = [[JXCategoryIndicatorImageView alloc] init];
|
||||
indicatorView.indicatorWidth = JXCategoryViewAutomaticDimension;
|
||||
indicatorView.indicatorImageView.image = [UIImage imageNamed:@"home_slider"];
|
||||
indicatorView.indicatorImageViewSize = CGSizeMake(29, 8);
|
||||
indicatorView.indicatorImageViewSize = CGSizeMake(50, 28);
|
||||
self.indicatorView = indicatorView;
|
||||
indicatorView.verticalMargin = 11;
|
||||
indicatorView.verticalMargin = 5;
|
||||
_categoryView.indicators = @[indicatorView];
|
||||
}
|
||||
return _categoryView;
|
||||
}
|
||||
-(UIView *)headerView{
|
||||
if (!_headerView) {
|
||||
_headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, self.cycleScrollView.height+self.bannerScrollView.height)];
|
||||
_headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, self.cycleScrollView.height+self.bannerScrollView.height+10)];
|
||||
[_headerView addSubview:self.cycleScrollView];
|
||||
[_headerView addSubview:self.bannerScrollView];
|
||||
}
|
||||
@@ -400,7 +576,7 @@
|
||||
}
|
||||
-(SDCycleScrollView *)bannerScrollView{
|
||||
if (!_bannerScrollView) {
|
||||
_bannerScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(16, self.cycleScrollView.bottom, SCREEN_WIDTH-32, ScaleWidth(95)) delegate:self placeholderImage:nil];
|
||||
_bannerScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(16, self.cycleScrollView.bottom+10, SCREEN_WIDTH-32, ScaleWidth(95)) delegate:self placeholderImage:nil];
|
||||
_bannerScrollView.backgroundColor = [UIColor clearColor];
|
||||
_bannerScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||
[_bannerScrollView addRoundedCornersWithRadius:8] ;
|
||||
@@ -410,18 +586,20 @@
|
||||
}
|
||||
-(GKCycleScrollView *)cycleScrollView{
|
||||
if (!_cycleScrollView) {
|
||||
_cycleScrollView = [[GKCycleScrollView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, ScaleWidth(113))];
|
||||
_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 = 10.0f;
|
||||
_cycleScrollView.topBottomMargin = 15.0f;
|
||||
_cycleScrollView.isInfiniteLoop = YES;
|
||||
_cycleScrollView.isAutoScroll = YES;
|
||||
}
|
||||
return _cycleScrollView;
|
||||
}
|
||||
-(QXGiftScrollView *)giftScrollView{
|
||||
if (!_giftScrollView) {
|
||||
_giftScrollView = [[QXGiftScrollView alloc] initWithFrame:CGRectMake(16, self.cycleScrollView.bottom, SCREEN_WIDTH-32, 31)];
|
||||
_giftScrollView = [[QXGiftScrollView alloc] initWithFrame:CGRectMake(16, self.cycleScrollView.bottom, SCREEN_WIDTH-32, 36)];
|
||||
_giftScrollView.delegate = self;
|
||||
}
|
||||
return _giftScrollView;
|
||||
@@ -438,28 +616,33 @@
|
||||
}
|
||||
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)];
|
||||
//-(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];
|
||||
}
|
||||
return _firstRechargeBtn;
|
||||
return _nPeopleRechargeView;
|
||||
}
|
||||
-(UIButton *)skyDownBtn{
|
||||
if (!_skyDownBtn) {
|
||||
_skyDownBtn = [[UIButton alloc] init];
|
||||
[_skyDownBtn setBackgroundImage:[UIImage imageNamed:@"sky_down_gift_icon"] forState:(UIControlStateNormal)];
|
||||
-(NSMutableArray *)rechargePermissionArray{
|
||||
if (!_rechargePermissionArray) {
|
||||
_rechargePermissionArray = [NSMutableArray array];
|
||||
}
|
||||
return _skyDownBtn;
|
||||
return _rechargePermissionArray;
|
||||
}
|
||||
-(QXFirstRechargePopView *)firstRechargeView{
|
||||
if (!_firstRechargeView) {
|
||||
_firstRechargeView = [[QXFirstRechargePopView alloc] init];
|
||||
}
|
||||
return _firstRechargeView;
|
||||
}
|
||||
|
||||
|
||||
-(QXAppstoreHomeView *)appStoreView{
|
||||
if (!_appStoreView) {
|
||||
@@ -467,4 +650,7 @@
|
||||
}
|
||||
return _appStoreView;
|
||||
}
|
||||
-(void)dealloc{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user