2.0.0版本首页UI更改
@@ -200,6 +200,7 @@
|
||||
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 */; };
|
||||
239BEEDB2AA1E058005CDA94 /* PIHoemCategoryTitleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 239BEEDA2AA1E058005CDA94 /* PIHoemCategoryTitleView.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 */; };
|
||||
@@ -1750,6 +1751,8 @@
|
||||
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>"; };
|
||||
239BEED92AA1E058005CDA94 /* PIHoemCategoryTitleView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PIHoemCategoryTitleView.h; sourceTree = "<group>"; };
|
||||
239BEEDA2AA1E058005CDA94 /* PIHoemCategoryTitleView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PIHoemCategoryTitleView.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>"; };
|
||||
@@ -8264,6 +8267,8 @@
|
||||
E87E62582A3F560A002F68C9 /* XPHomeRecommendViewController.m */,
|
||||
E87E625B2A3F5622002F68C9 /* XPNewHomeViewController.h */,
|
||||
E87E625C2A3F5622002F68C9 /* XPNewHomeViewController.m */,
|
||||
239BEED92AA1E058005CDA94 /* PIHoemCategoryTitleView.h */,
|
||||
239BEEDA2AA1E058005CDA94 /* PIHoemCategoryTitleView.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@@ -10536,6 +10541,7 @@
|
||||
E836456B2A40A33300E0DBE4 /* MineSkillCardListInfoModel.m in Sources */,
|
||||
236B2E482AA07D06003967A8 /* XPLittleGameMiniStageView.m in Sources */,
|
||||
E85E7B1C2A4EB0D200B6D00A /* XPMineHallAnchorIncomeStatisViewController.m in Sources */,
|
||||
239BEEDB2AA1E058005CDA94 /* PIHoemCategoryTitleView.m in Sources */,
|
||||
E81060FD2987CC9100B772F0 /* MessageLevelUpgradeModel.m in Sources */,
|
||||
E84BF7DD277C765400EF8877 /* XPRoomRoleEmptyTableViewCell.m in Sources */,
|
||||
E8F6135C291E26BD00E12650 /* NSMutableDictionary+Saft.m in Sources */,
|
||||
|
22
YuMi/Assets.xcassets/low/newhome/home_head_friend_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_head_friend_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_head_friend_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/low/newhome/home_head_friend_bg.imageset/home_head_friend_bg@2x.png
vendored
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
YuMi/Assets.xcassets/low/newhome/home_head_friend_bg.imageset/home_head_friend_bg@3x.png
vendored
Normal file
After Width: | Height: | Size: 19 KiB |
22
YuMi/Assets.xcassets/low/newhome/home_head_love_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_head_love_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_head_love_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/low/newhome/home_head_love_bg.imageset/home_head_love_bg@2x.png
vendored
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
YuMi/Assets.xcassets/low/newhome/home_head_love_bg.imageset/home_head_love_bg@3x.png
vendored
Normal file
After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 482 B |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 930 B |
@@ -10,7 +10,8 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPHomeContainerPresenter : BaseMvpPresenter
|
||||
|
||||
///得到首页轮播图
|
||||
- (void)getHomeTopBannerList;
|
||||
/// 获取所有的房间的tag
|
||||
- (void)getHomeTagList;
|
||||
|
||||
|
@@ -11,8 +11,18 @@
|
||||
#import "HomeTagModel.h"
|
||||
#import "XPHomeContainerProtocol.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "HomeBannerInfoModel.h"
|
||||
@implementation XPHomeContainerPresenter
|
||||
|
||||
///得到首页轮播图
|
||||
- (void)getHomeTopBannerList{
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[Api homeBannerList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray * array = [HomeBannerInfoModel modelsWithArray:data.data];
|
||||
[[self getView]getHomeTopBannerListSuccess:array];
|
||||
}fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
|
||||
} errorToast:NO] uid:uid type:@"1"];
|
||||
}
|
||||
/// 获取所有的房间的tag
|
||||
- (void)getHomeTagList {
|
||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
|
@@ -13,6 +13,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
///获取所有的tag成功
|
||||
- (void)getHomeTagListSuccess:(NSArray<HomeTagModel *> *)array;
|
||||
///获取首页轮播图列表成功
|
||||
- (void)getHomeTopBannerListSuccess:(NSArray*)list;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -6,11 +6,11 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "HomeBannerInfoModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNewHomeHeadView : UIView
|
||||
|
||||
@property (nonatomic,strong) NSArray<HomeBannerInfoModel *> *bannerList;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -7,14 +7,111 @@
|
||||
|
||||
#import "XPNewHomeHeadView.h"
|
||||
#import "XPNewHomeItemView.h"
|
||||
#import <SDCycleScrollView/SDCycleScrollView.h>
|
||||
@interface XPNewHomeHeadView ()<SDCycleScrollViewDelegate>
|
||||
///心动恋爱
|
||||
@property(nonatomic,strong) XPNewHomeItemView *loveView;
|
||||
///陪伴交友
|
||||
@property(nonatomic,strong) XPNewHomeItemView *friendView;
|
||||
///轮播图
|
||||
@property (nonatomic, strong) SDCycleScrollView *pi_BannerView;
|
||||
@end
|
||||
@implementation XPNewHomeHeadView
|
||||
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
// Drawing code
|
||||
-(instancetype)initWithFrame:(CGRect)frame{
|
||||
self = [super initWithFrame:frame];
|
||||
if(self){
|
||||
[self installUI];
|
||||
[self installConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)installUI{
|
||||
[self addSubview:self.loveView];
|
||||
[self addSubview:self.friendView];
|
||||
[self addSubview:self.pi_BannerView];
|
||||
}
|
||||
-(void)installConstraints{
|
||||
[self.loveView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(kGetScaleWidth(14));
|
||||
make.top.mas_equalTo(kGetScaleWidth(0));
|
||||
make.height.mas_equalTo(kGetScaleWidth(89));
|
||||
make.width.mas_equalTo(kGetScaleWidth(174));
|
||||
}];
|
||||
[self.friendView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(kGetScaleWidth(3));
|
||||
make.leading.equalTo(self.loveView.mas_trailing).mas_offset(kGetScaleWidth(3));
|
||||
make.height.mas_equalTo(kGetScaleWidth(84));
|
||||
make.width.mas_equalTo(kGetScaleWidth(171));
|
||||
}];
|
||||
[self.pi_BannerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.loveView.mas_bottom).mas_offset(kGetScaleWidth(5));
|
||||
make.leading.trailing.equalTo(self).inset(kGetScaleWidth(14));
|
||||
make.height.mas_equalTo(kGetScaleWidth(80));
|
||||
}];
|
||||
|
||||
}
|
||||
#pragma mark - SDCycleScrollViewDelegate
|
||||
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index {
|
||||
HomeBannerInfoModel * bannerInfo = [self.bannerList safeObjectAtIndex1:index];
|
||||
// if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeBannerTableViewCell:didClickBanner:)]) {
|
||||
// [self.delegate xPHomeBannerTableViewCell:self didClickBanner:bannerInfo];
|
||||
// }
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setBannerList:(NSArray<HomeBannerInfoModel *> *)bannerList {
|
||||
_bannerList = bannerList;
|
||||
if (_bannerList.count > 0) {
|
||||
NSMutableArray * array = [NSMutableArray array];
|
||||
[_bannerList enumerateObjectsUsingBlock:^(HomeBannerInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (obj.bannerPic.length > 0) {
|
||||
[array addObject:obj.bannerPic];
|
||||
}
|
||||
}];
|
||||
if (array.count > 0) {
|
||||
self.pi_BannerView.imageURLStringsGroup = array;
|
||||
[self.pi_BannerView autoScroll];
|
||||
}
|
||||
_pi_BannerView.hidden = NO;
|
||||
}else{
|
||||
_pi_BannerView.hidden = YES;
|
||||
}
|
||||
}
|
||||
#pragma mark - 懒加载
|
||||
- (XPNewHomeItemView *)loveView{
|
||||
if(!_loveView){
|
||||
_loveView = [[XPNewHomeItemView alloc]initWithFrame:CGRectZero type:0];
|
||||
_loveView.title = YMLocalizedString(@"XPNewHomeHeadView0");
|
||||
_loveView.subTitle = YMLocalizedString(@"XPNewHomeHeadView1");
|
||||
_loveView.bgImage = kImage(@"home_head_love_bg");
|
||||
}
|
||||
return _loveView;
|
||||
}
|
||||
- (XPNewHomeItemView *)friendView{
|
||||
if(!_friendView){
|
||||
_friendView = [[XPNewHomeItemView alloc]initWithFrame:CGRectZero type:1];
|
||||
_friendView.title = YMLocalizedString(@"XPNewHomeHeadView2");
|
||||
_friendView.subTitle = YMLocalizedString(@"XPNewHomeHeadView3");
|
||||
_friendView.bgImage = kImage(@"home_head_friend_bg");
|
||||
}
|
||||
return _friendView;
|
||||
}
|
||||
- (SDCycleScrollView *)pi_BannerView {
|
||||
if (!_pi_BannerView) {
|
||||
_pi_BannerView = [[SDCycleScrollView alloc] init];
|
||||
_pi_BannerView.backgroundColor = [UIColor clearColor];
|
||||
_pi_BannerView.layer.cornerRadius = 10;
|
||||
_pi_BannerView.layer.masksToBounds = YES;
|
||||
_pi_BannerView.delegate = self;
|
||||
_pi_BannerView.showPageControl = NO;
|
||||
_pi_BannerView.autoScrollTimeInterval = 5.0;
|
||||
_pi_BannerView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||
_pi_BannerView.placeholderImage = [UIImageConstant defalutBannerPlaceholder];
|
||||
_pi_BannerView.tag = 9000001;
|
||||
_pi_BannerView.hidden = YES;
|
||||
}
|
||||
return _pi_BannerView;
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
|
19
YuMi/Modules/YMNewHome/View/PIHoemCategoryTitleView.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// PIHoemCategoryTitleView.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by duoban on 2023/9/1.
|
||||
//
|
||||
|
||||
#import <JXCategoryView/JXCategoryView.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
|
||||
|
||||
@interface PIHoemCategoryTitleView : JXCategoryTitleView
|
||||
@property(nonatomic,assign) int index;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
149
YuMi/Modules/YMNewHome/View/PIHoemCategoryTitleView.m
Normal file
@@ -0,0 +1,149 @@
|
||||
//
|
||||
// PIHoemCategoryTitleView.m
|
||||
// YuMi
|
||||
//
|
||||
// Created by duoban on 2023/9/1.
|
||||
//
|
||||
|
||||
#import "PIHoemCategoryTitleView.h"
|
||||
@interface PIHoemCategoryTitleView()
|
||||
@property(nonatomic,strong) UIButton *fristBnt;
|
||||
@property(nonatomic,strong) UIButton *secondBnt;
|
||||
@property(nonatomic,strong) UIImageView *lineImage;
|
||||
@end
|
||||
@implementation PIHoemCategoryTitleView
|
||||
-(instancetype)initWithFrame:(CGRect)frame{
|
||||
self = [super initWithFrame:frame];
|
||||
if(self){
|
||||
[self installUI];
|
||||
[self installConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)installUI{
|
||||
UIButton *b = [UIButton new];
|
||||
[self addSubview:b];
|
||||
[b mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self);
|
||||
}];
|
||||
[self addSubview:self.lineImage];
|
||||
[self addSubview:self.fristBnt];
|
||||
[self addSubview:self.secondBnt];
|
||||
|
||||
}
|
||||
-(void)installConstraints{
|
||||
|
||||
[self.fristBnt mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(kGetScaleWidth(15));
|
||||
make.centerY.equalTo(self);
|
||||
make.height.mas_equalTo(kGetScaleWidth(22));
|
||||
}];
|
||||
[self.secondBnt mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.equalTo(self.fristBnt.mas_trailing).mas_offset(kGetScaleWidth(24));
|
||||
make.centerY.equalTo(self);
|
||||
make.height.mas_equalTo(kGetScaleWidth(22));
|
||||
}];
|
||||
[self.lineImage mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(36));
|
||||
make.height.mas_equalTo(kGetScaleWidth(8));
|
||||
make.bottom.equalTo(self.fristBnt.mas_bottom).mas_offset(-kGetScaleWidth(4));
|
||||
make.trailing.equalTo(self.fristBnt.mas_trailing);
|
||||
}];
|
||||
}
|
||||
-(void)chooseItem:(UIButton *)sender{
|
||||
self.fristBnt.titleLabel.font = sender == self.fristBnt ? kFontSemibold(16):kFontRegular(14);
|
||||
self.secondBnt.titleLabel.font = sender != self.fristBnt ? kFontSemibold(16):kFontRegular(14);
|
||||
self.fristBnt.selected = sender == self.fristBnt;
|
||||
self.secondBnt.selected = sender != self.fristBnt;
|
||||
if(self.fristBnt == sender){
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(didClickSelectedItemAtIndex:)]){
|
||||
[self.delegate categoryView:self didClickSelectedItemAtIndex:0];
|
||||
}
|
||||
[self.lineImage mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(36));
|
||||
make.height.mas_equalTo(kGetScaleWidth(8));
|
||||
make.bottom.equalTo(self.fristBnt.mas_bottom).mas_offset(-kGetScaleWidth(4));
|
||||
make.trailing.equalTo(self.fristBnt.mas_trailing);
|
||||
}];
|
||||
return;
|
||||
}
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(didClickSelectedItemAtIndex:)]){
|
||||
[self.delegate categoryView:self didClickSelectedItemAtIndex:1];
|
||||
}
|
||||
[self.lineImage mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(36));
|
||||
make.height.mas_equalTo(kGetScaleWidth(8));
|
||||
make.bottom.equalTo(self.secondBnt.mas_bottom).mas_offset(-kGetScaleWidth(4));
|
||||
make.trailing.equalTo(self.secondBnt.mas_trailing);
|
||||
|
||||
}];
|
||||
}
|
||||
- (void)setIndex:(int)index{
|
||||
_index = index;
|
||||
self.fristBnt.titleLabel.font = _index == 0 ? kFontSemibold(16):kFontRegular(14);
|
||||
self.secondBnt.titleLabel.font = _index == 1 ? kFontSemibold(16):kFontRegular(14);
|
||||
self.fristBnt.selected = _index == 0;
|
||||
self.secondBnt.selected = _index == 1;
|
||||
if(_index == 0){
|
||||
[self.lineImage mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(36));
|
||||
make.height.mas_equalTo(kGetScaleWidth(8));
|
||||
make.bottom.equalTo(self.fristBnt.mas_bottom).mas_offset(-kGetScaleWidth(4));
|
||||
make.trailing.equalTo(self.fristBnt.mas_trailing);
|
||||
}];
|
||||
return;
|
||||
}
|
||||
[self.lineImage mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(36));
|
||||
make.height.mas_equalTo(kGetScaleWidth(8));
|
||||
make.bottom.equalTo(self.secondBnt.mas_bottom).mas_offset(-kGetScaleWidth(4));
|
||||
make.trailing.equalTo(self.secondBnt.mas_trailing);
|
||||
|
||||
}];
|
||||
}
|
||||
#pragma mark - 懒加载
|
||||
- (UIButton *)fristBnt{
|
||||
if(!_fristBnt){
|
||||
_fristBnt = [UIButton new];
|
||||
[_fristBnt setTitle:YMLocalizedString(@"XPNewHomeViewController0") forState:UIControlStateNormal];
|
||||
[_fristBnt setTitleColor:UIColorFromRGB(0x1F1B4F) forState:UIControlStateSelected];
|
||||
[_fristBnt setTitleColor:UIColorFromRGB(0x767585) forState:UIControlStateNormal];
|
||||
_fristBnt.selected = YES;
|
||||
_fristBnt.titleLabel.font = kFontSemibold(16);
|
||||
[_fristBnt addTarget:self action:@selector(chooseItem:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _fristBnt;
|
||||
}
|
||||
|
||||
- (UIButton *)secondBnt{
|
||||
if(!_secondBnt){
|
||||
_secondBnt = [UIButton new];
|
||||
[_secondBnt setTitle:YMLocalizedString(@"XPNewHomeViewController1") forState:UIControlStateNormal];
|
||||
[_secondBnt setTitleColor:UIColorFromRGB(0x1F1B4F) forState:UIControlStateSelected];
|
||||
[_secondBnt setTitleColor:UIColorFromRGB(0x767585) forState:UIControlStateNormal];
|
||||
_secondBnt.titleLabel.font = kFontRegular(14);
|
||||
[_secondBnt addTarget:self action:@selector(chooseItem:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
}
|
||||
return _secondBnt;
|
||||
}
|
||||
- (UIImageView *)lineImage{
|
||||
if(!_lineImage){
|
||||
_lineImage = [UIImageView new];
|
||||
_lineImage.image = kImage(@"home_slider_bg");
|
||||
}
|
||||
return _lineImage;
|
||||
}
|
||||
//- (void)layoutSubviews{
|
||||
// [super layoutSubviews];
|
||||
//
|
||||
// //部分使用者为了适配不同的手机屏幕尺寸,JXCategoryView的宽高比要求保持一样,所以它的高度就会因为不同宽度的屏幕而不一样。计算出来的高度,有时候会是位数很长的浮点数,如果把这个高度设置给UICollectionView就会触发内部的一个错误。所以,为了规避这个问题,在这里对高度统一向下取整。
|
||||
// //如果向下取整导致了你的页面异常,请自己重新设置JXCategoryView的高度,保证为整数即可。
|
||||
//
|
||||
// CGRect targetFrame = CGRectMake(0, 0, self.bounds.size.width - kGetScaleWidth(159), floor(self.bounds.size.height));
|
||||
// self.collectionView.frame = targetFrame;
|
||||
//
|
||||
//
|
||||
//}
|
||||
|
||||
@end
|
@@ -6,11 +6,12 @@
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
#import <JXPagingView/JXPagerView.h>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@interface XPHomePartyViewController : MvpViewController<JXCategoryListContentViewDelegate>
|
||||
@interface XPHomePartyViewController : MvpViewController<JXPagerViewListViewDelegate>
|
||||
@property (nonatomic, copy) void(^scrollCallback)(UIScrollView *scrollView);
|
||||
///模块的 ID
|
||||
@property (nonatomic,copy) NSString *pi_tabId;
|
||||
///是否是个播
|
||||
|
@@ -178,10 +178,25 @@
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryListContentViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
#pragma mark - JXPagingViewListViewDelegate
|
||||
- (UIScrollView *)listScrollView {
|
||||
return self.tableView;
|
||||
}
|
||||
|
||||
- (void)listViewDidScrollCallback:(void (^)(UIScrollView *))callback {
|
||||
self.scrollCallback = callback;
|
||||
}
|
||||
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
}
|
||||
|
||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
|
||||
if(self.scrollCallback){
|
||||
self.scrollCallback(scrollView);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
|
||||
- (void)setIsAnchor:(BOOL)isAnchor {
|
||||
|
@@ -6,10 +6,11 @@
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
#import <JXPagingView/JXPagerView.h>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPHomeRecommendViewController : MvpViewController<JXCategoryListContentViewDelegate>
|
||||
@interface XPHomeRecommendViewController : MvpViewController<JXPagerViewListViewDelegate>
|
||||
@property (nonatomic, copy) void(^scrollCallback)(UIScrollView *scrollView);
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -415,11 +415,26 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
|
||||
dispatch_group_leave(group);
|
||||
|
||||
}
|
||||
#pragma mark - JXCategoryListContentViewDelegate
|
||||
#pragma mark - JXPagingViewListViewDelegate
|
||||
- (UIScrollView *)listScrollView {
|
||||
return self.tableView;
|
||||
}
|
||||
|
||||
- (void)listViewDidScrollCallback:(void (^)(UIScrollView *))callback {
|
||||
self.scrollCallback = callback;
|
||||
}
|
||||
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
}
|
||||
|
||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
|
||||
if(self.scrollCallback){
|
||||
self.scrollCallback(scrollView);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
|
@@ -8,9 +8,9 @@
|
||||
#import "XPNewHomeViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <JXPagingView/JXPagerView.h>
|
||||
#import <JXPagingView/JXPagerListRefreshView.h>
|
||||
#import <JXCategoryView/JXCategoryView.h>
|
||||
#import <JXCategoryView/JXCategoryIndicatorBackgroundView.h>
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
///Tool
|
||||
#import "YUMIMacroUitls.h"
|
||||
#import "DJDKMIMOMColor.h"
|
||||
@@ -30,7 +30,8 @@
|
||||
#import "XPHomeRecommendViewController.h"
|
||||
#import "XPNewHomeNavView.h"
|
||||
#import "XPRoomViewController.h"
|
||||
|
||||
#import "XPNewHomeHeadView.h"
|
||||
#import "PIHoemCategoryTitleView.h"
|
||||
///P
|
||||
#import "XPHomeContainerPresenter.h"
|
||||
#import "XPHomeContainerProtocol.h"
|
||||
@@ -40,17 +41,19 @@
|
||||
UIKIT_EXTERN NSString * kHomeMoreScrollPageKey;
|
||||
UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
|
||||
@interface XPNewHomeViewController ()<JXCategoryViewDelegate, JXCategoryListContainerViewDelegate, XPHomeContainerProtocol, XPNewHomeNavViewDelegate>
|
||||
@interface XPNewHomeViewController ()<JXPagerViewDelegate,JXPagerMainTableViewGestureDelegate,JXCategoryViewDelegate, XPHomeContainerProtocol, XPNewHomeNavViewDelegate>
|
||||
///背景
|
||||
@property (nonatomic,strong) UIImageView *backImageView;
|
||||
///导航
|
||||
@property (nonatomic,strong) XPNewHomeNavView *navView;
|
||||
///头视图
|
||||
@property(nonatomic,strong) XPNewHomeHeadView *headView;
|
||||
///分页标题
|
||||
@property (nonatomic, strong) NSArray<NSString *> *titles;
|
||||
///分页控件
|
||||
@property (nonatomic, strong) JXCategoryTitleView *titleView;
|
||||
@property (nonatomic, strong) PIHoemCategoryTitleView *titleView;
|
||||
///分页lineView
|
||||
@property (nonatomic, strong) JXCategoryListContainerView *contentView;
|
||||
@property (nonatomic, strong) JXPagerView *pagingView;
|
||||
///tag的列表
|
||||
@property (nonatomic,copy) NSMutableArray<HomeTagModel *> *tagList;
|
||||
@property (nonatomic,strong) HomeTagModel *recommendItem;
|
||||
@@ -60,40 +63,39 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
|
||||
@implementation XPNewHomeViewController
|
||||
-(instancetype)initWithIsEmpty:(BOOL)isEmpty{
|
||||
self = [super init];
|
||||
if(self){
|
||||
self.isEmpty = isEmpty;
|
||||
}
|
||||
return self;
|
||||
self = [super init];
|
||||
if(self){
|
||||
self.isEmpty = isEmpty;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)dealloc{
|
||||
[[NSNotificationCenter defaultCenter]removeObserver:self];
|
||||
[[NSNotificationCenter defaultCenter]removeObserver:self];
|
||||
}
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (XPHomeContainerPresenter *)createPresenter {
|
||||
return [[XPHomeContainerPresenter alloc] init];
|
||||
return [[XPHomeContainerPresenter alloc] init];
|
||||
}
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
if(self.isEmpty == NO){
|
||||
[self initHttp];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
|
||||
[super viewDidLoad];
|
||||
if(self.isEmpty == NO){
|
||||
[self initHttp];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.view.backgroundColor = [DJDKMIMOMColor colorWithHexString:@"#F3F5FA"];
|
||||
[self.view addSubview:self.backImageView];
|
||||
[self.view addSubview:self.navView];
|
||||
[self.view addSubview:self.titleView];
|
||||
[self.view addSubview:self.contentView];
|
||||
self.view.backgroundColor = [DJDKMIMOMColor colorWithHexString:@"#F3F5FA"];
|
||||
[self.view addSubview:self.backImageView];
|
||||
[self.view addSubview:self.navView];
|
||||
[self.view addSubview:self.pagingView];
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(openRoomNotification:) name:kOpenRoomNotification object:nil];
|
||||
if([[AccountInfoStorage instance] getUid].length == 0){
|
||||
return;
|
||||
@@ -135,49 +137,45 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
}
|
||||
}
|
||||
- (void)initSubViewConstraints {
|
||||
|
||||
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(170 + kSafeAreaTopHeight);
|
||||
}];
|
||||
|
||||
[self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(kNavigationHeight);
|
||||
}];
|
||||
|
||||
|
||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.navView.mas_bottom).offset(10);
|
||||
make.left.right.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(30);
|
||||
}];
|
||||
|
||||
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.titleView.mas_bottom);
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
}];
|
||||
|
||||
|
||||
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(170 + kSafeAreaTopHeight);
|
||||
}];
|
||||
|
||||
[self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(kNavigationHeight);
|
||||
}];
|
||||
|
||||
|
||||
[self.pagingView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.navView.mas_bottom).mas_offset(kGetScaleWidth(10));
|
||||
make.leading.bottom.trailing.mas_equalTo(0);
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
- (void)initHttp {
|
||||
[self.presenter getHomeTagList];
|
||||
[self.presenter getHomeTagList];
|
||||
[self.presenter getHomeTopBannerList];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - XPNewHomeNavViewDelegate
|
||||
- (void)xPNewHomeNavView:(XPNewHomeNavView *)view didClickRank:(UIButton *)sender {
|
||||
XPWebViewController * webVC =[[XPWebViewController alloc] init];
|
||||
webVC.url = URLWithType(kHomeRankURL);
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
XPWebViewController * webVC =[[XPWebViewController alloc] init];
|
||||
webVC.url = URLWithType(kHomeRankURL);
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
|
||||
- (void)xPNewHomeNavView:(XPNewHomeNavView *)view didClickOpenRoom:(UIButton *)sender {
|
||||
NSString* roomUid = [AccountInfoStorage instance].getUid;
|
||||
[self opRoom:roomUid];
|
||||
|
||||
NSString* roomUid = [AccountInfoStorage instance].getUid;
|
||||
[self opRoom:roomUid];
|
||||
|
||||
}
|
||||
-(void)opRoom:(NSString *)roomUid{
|
||||
|
||||
[Api getRoomInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
RoomInfoModel * roomInfo = [RoomInfoModel modelWithJSON:data.data];
|
||||
@@ -194,135 +192,208 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
}
|
||||
} uid:roomUid intoUid:roomUid];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)xPNewHomeNavView:(XPNewHomeNavView *)view didClickSearch:(UIView *)sender {
|
||||
XPRoomSearchContainerViewController * searchVC = [[XPRoomSearchContainerViewController alloc] init];
|
||||
searchVC.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
[self.navigationController presentViewController:searchVC animated:YES completion:nil];
|
||||
XPRoomSearchContainerViewController * searchVC = [[XPRoomSearchContainerViewController alloc] init];
|
||||
searchVC.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
[self.navigationController presentViewController:searchVC animated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryViewDelegate
|
||||
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView {
|
||||
return self.titles.count;
|
||||
//- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView {
|
||||
// return self.titles.count;
|
||||
//}
|
||||
//
|
||||
//- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
|
||||
// HomeTagModel * hometag = [self.tagList safeObjectAtIndex1:index];
|
||||
//
|
||||
// UIViewController<JXCategoryListContentViewDelegate> * list = (UIViewController<JXCategoryListContentViewDelegate> *)[self.contentView.validListDict objectForKey:[NSNumber numberWithInteger:index]];
|
||||
// if (list) {
|
||||
// return list;
|
||||
// } else {
|
||||
// if ([hometag.name isEqualToString:YMLocalizedString(@"XPNewHomeViewController0")]) {
|
||||
// XPHomeRecommendViewController * recommendVC = [[XPHomeRecommendViewController alloc] init];
|
||||
// return recommendVC;
|
||||
// } else {
|
||||
// XPHomePartyViewController * homeVC = [[XPHomePartyViewController alloc] init];
|
||||
// homeVC.pi_tabId = hometag.tid;
|
||||
// return homeVC;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//
|
||||
//
|
||||
//- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
|
||||
// HomeTagModel * hometag = [self.tagList safeObjectAtIndex1:index];
|
||||
// if (![hometag.name isEqualToString:YMLocalizedString(@"XPNewHomeViewController1")]) {
|
||||
// XPHomePartyViewController * list = (XPHomePartyViewController<JXCategoryListContentViewDelegate> *)[self.contentView.validListDict objectForKey:[NSNumber numberWithInteger:index]];;
|
||||
// list.pi_tabId = hometag.tid;
|
||||
// }
|
||||
//}
|
||||
#pragma mark - JXCategoryViewDelegate
|
||||
- (NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView {
|
||||
if(self.headView.bannerList.count == 0)return kGetScaleWidth(103);
|
||||
return kGetScaleWidth(188);
|
||||
}
|
||||
|
||||
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
|
||||
HomeTagModel * hometag = [self.tagList safeObjectAtIndex1:index];
|
||||
|
||||
UIViewController<JXCategoryListContentViewDelegate> * list = (UIViewController<JXCategoryListContentViewDelegate> *)[self.contentView.validListDict objectForKey:[NSNumber numberWithInteger:index]];
|
||||
if (list) {
|
||||
return list;
|
||||
} else {
|
||||
if ([hometag.name isEqualToString:YMLocalizedString(@"XPNewHomeViewController0")]) {
|
||||
XPHomeRecommendViewController * recommendVC = [[XPHomeRecommendViewController alloc] init];
|
||||
return recommendVC;
|
||||
} else {
|
||||
XPHomePartyViewController * homeVC = [[XPHomePartyViewController alloc] init];
|
||||
homeVC.pi_tabId = hometag.tid;
|
||||
return homeVC;
|
||||
}
|
||||
}
|
||||
- (UIView *)tableHeaderViewInPagerView:(JXPagerView *)pagerView {
|
||||
return self.headView;
|
||||
}
|
||||
- (NSUInteger)heightForPinSectionHeaderInPagerView:(JXPagerView *)pagerView {
|
||||
return kGetScaleWidth(44);
|
||||
}
|
||||
- (UIView *)viewForPinSectionHeaderInPagerView:(JXPagerView *)pagerView {
|
||||
return self.titleView;
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfListsInPagerView:(JXPagerView *)pagerView {
|
||||
return self.titles.count;
|
||||
}
|
||||
|
||||
|
||||
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
|
||||
HomeTagModel * hometag = [self.tagList safeObjectAtIndex1:index];
|
||||
if (![hometag.name isEqualToString:YMLocalizedString(@"XPNewHomeViewController1")]) {
|
||||
XPHomePartyViewController * list = (XPHomePartyViewController<JXCategoryListContentViewDelegate> *)[self.contentView.validListDict objectForKey:[NSNumber numberWithInteger:index]];;
|
||||
list.pi_tabId = hometag.tid;
|
||||
}
|
||||
- (id<JXPagerViewListViewDelegate>)pagerView:(JXPagerView *)pagerView initListAtIndex:(NSInteger)index {
|
||||
|
||||
XPHomeRecommendViewController<JXPagerViewListViewDelegate> * homeV = (XPHomeRecommendViewController<JXPagerViewListViewDelegate> *)[self.pagingView.validListDict objectForKey:[NSNumber numberWithInteger:index]];
|
||||
if (homeV) {
|
||||
return homeV;
|
||||
}
|
||||
if (index == 0) {
|
||||
XPHomeRecommendViewController * recommendVC = [[XPHomeRecommendViewController alloc] init];
|
||||
return recommendVC;
|
||||
} else {
|
||||
XPHomePartyViewController * homeVC = [[XPHomePartyViewController alloc] init];
|
||||
|
||||
return homeVC;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryListContentViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
return self.view;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - JXPagerMainTableViewGestureDelegate
|
||||
- (BOOL)mainTableViewGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
|
||||
//禁止categoryView左右滑动的时候,上下和左右都可以滚动
|
||||
if (otherGestureRecognizer.view == self.pagingView.listContainerView) {
|
||||
return NO;
|
||||
}
|
||||
if(otherGestureRecognizer.view.tag == 9000001){
|
||||
return NO;
|
||||
}
|
||||
if(otherGestureRecognizer.view.tag == 9000002){
|
||||
return NO;
|
||||
}
|
||||
|
||||
return [gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]] && [otherGestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]];
|
||||
}
|
||||
#pragma mark - XPHomeContainerProtocol
|
||||
-(void)getHomeTopBannerListSuccess:(NSArray *)list{
|
||||
self.headView.bannerList = list;
|
||||
[self.pagingView reloadData];
|
||||
}
|
||||
- (void)getHomeTagListSuccess:(NSArray<HomeTagModel *> *)array {
|
||||
[self.tagList addObject:self.recommendItem];
|
||||
[self.tagList addObjectsFromArray:array];
|
||||
NSMutableArray * titles = [NSMutableArray array];
|
||||
[titles addObject:YMLocalizedString(@"XPNewHomeViewController2")];
|
||||
[array enumerateObjectsUsingBlock:^(HomeTagModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if (obj.name.length > 0) {
|
||||
[titles addObject:obj.name];
|
||||
}
|
||||
}];
|
||||
self.titles = titles.copy;
|
||||
self.titleView.titles = self.titles;
|
||||
[self.titleView reloadData];
|
||||
// [self.tagList addObject:self.recommendItem];
|
||||
// [self.tagList addObjectsFromArray:array];
|
||||
// NSMutableArray * titles = [NSMutableArray array];
|
||||
// [titles addObject:YMLocalizedString(@"XPNewHomeViewController2")];
|
||||
// [array enumerateObjectsUsingBlock:^(HomeTagModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
// if (obj.name.length > 0) {
|
||||
// [titles addObject:obj.name];
|
||||
// }
|
||||
// }];
|
||||
// self.titles = titles.copy;
|
||||
// self.titleView.titles = self.titles;
|
||||
// [self.titleView reloadData];
|
||||
}
|
||||
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index{
|
||||
NSLog(@"111");
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (JXCategoryTitleView *)titleView {
|
||||
if (!_titleView) {
|
||||
_titleView = [[JXCategoryTitleView alloc] init];
|
||||
_titleView.delegate = self;
|
||||
_titleView.titles = self.titles;
|
||||
_titleView.backgroundColor = [UIColor clearColor];
|
||||
_titleView.titleColor = [DJDKMIMOMColor secondTextColor];
|
||||
_titleView.titleSelectedColor = [UIColor whiteColor];
|
||||
_titleView.titleFont = [UIFont systemFontOfSize:14];
|
||||
_titleView.titleSelectedFont = [UIFont systemFontOfSize:14];
|
||||
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
|
||||
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
|
||||
_titleView.defaultSelectedIndex = 0;
|
||||
_titleView.cellSpacing = 20;
|
||||
_titleView.cellWidthIncrement = 5;
|
||||
_titleView.listContainer = self.contentView;
|
||||
|
||||
JXCategoryIndicatorImageView * indocator = [[JXCategoryIndicatorImageView alloc] init];
|
||||
indocator.indicatorImageView.image = [UIImage imageNamed:@"home_slider_bg"];
|
||||
indocator.indicatorImageViewSize = CGSizeMake(50, 24);
|
||||
indocator.verticalMargin = 4;
|
||||
indocator.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_titleView.indicators = @[indocator];
|
||||
}
|
||||
return _titleView;
|
||||
- (PIHoemCategoryTitleView *)titleView {
|
||||
if (!_titleView) {
|
||||
_titleView = [[PIHoemCategoryTitleView alloc] init];
|
||||
_titleView.delegate = self;
|
||||
_titleView.titles = self.titles;
|
||||
_titleView.backgroundColor = [UIColor clearColor];
|
||||
_titleView.titleColor = [UIColor clearColor];
|
||||
_titleView.titleSelectedColor = [UIColor clearColor];
|
||||
_titleView.titleFont = kFontSemibold(16);
|
||||
_titleView.titleSelectedFont = kFontRegular(14);
|
||||
_titleView. titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
|
||||
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
|
||||
_titleView.defaultSelectedIndex = 0;
|
||||
|
||||
_titleView.cellSpacing = kGetScaleWidth(2);
|
||||
_titleView.cellWidth = kGetScaleWidth(20);
|
||||
_titleView.listContainer = (id<JXCategoryViewListContainer>)self.pagingView.listContainerView;
|
||||
|
||||
// JXCategoryIndicatorImageView * indocator = [[JXCategoryIndicatorImageView alloc] init];
|
||||
// indocator.indicatorImageView.image = [UIImage imageNamed:@"home_slider_bg"];
|
||||
// indocator.indicatorImageViewSize = CGSizeMake(kGetScaleWidth(36), kGetScaleWidth(8));
|
||||
// indocator.verticalMargin = 4;
|
||||
// indocator.contentMode = UIViewContentModeScaleAspectFit;
|
||||
// _titleView.indicators = @[indocator];
|
||||
}
|
||||
return _titleView;
|
||||
}
|
||||
|
||||
- (JXCategoryListContainerView *)contentView {
|
||||
if (!_contentView) {
|
||||
_contentView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
|
||||
_contentView.defaultSelectedIndex = 0;
|
||||
}
|
||||
return _contentView;
|
||||
- (NSArray<NSString *> *)titles{
|
||||
if(!_titles){
|
||||
_titles = @[YMLocalizedString(@"XPNewHomeViewController0"),YMLocalizedString(@"XPNewHomeViewController1")];
|
||||
}
|
||||
return _titles;
|
||||
}
|
||||
- (JXPagerView *)pagingView {
|
||||
if (!_pagingView) {
|
||||
_pagingView = [[JXPagerView alloc] initWithDelegate:self listContainerType:0];
|
||||
_pagingView.mainTableView.gestureDelegate = self;
|
||||
_pagingView.backgroundColor = [UIColor clearColor];
|
||||
_pagingView.listContainerView.backgroundColor = [UIColor clearColor];
|
||||
_pagingView.listContainerView.listCellBackgroundColor = [UIColor clearColor];
|
||||
_pagingView.mainTableView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return _pagingView;
|
||||
}
|
||||
|
||||
- (HomeTagModel *)recommendItem {
|
||||
if (!_recommendItem) {
|
||||
_recommendItem = [[HomeTagModel alloc] init];
|
||||
_recommendItem.name = YMLocalizedString(@"XPNewHomeViewController3");
|
||||
}
|
||||
return _recommendItem;
|
||||
if (!_recommendItem) {
|
||||
_recommendItem = [[HomeTagModel alloc] init];
|
||||
_recommendItem.name = YMLocalizedString(@"XPNewHomeViewController3");
|
||||
}
|
||||
return _recommendItem;
|
||||
}
|
||||
|
||||
- (NSMutableArray<HomeTagModel *> *)tagList {
|
||||
if (!_tagList) {
|
||||
_tagList = [NSMutableArray array];
|
||||
}
|
||||
return _tagList;
|
||||
if (!_tagList) {
|
||||
_tagList = [NSMutableArray array];
|
||||
}
|
||||
return _tagList;
|
||||
}
|
||||
|
||||
- (XPNewHomeNavView *)navView {
|
||||
if (!_navView) {
|
||||
_navView = [[XPNewHomeNavView alloc] init];
|
||||
_navView.delegate = self;
|
||||
}
|
||||
return _navView;
|
||||
if (!_navView) {
|
||||
_navView = [[XPNewHomeNavView alloc] init];
|
||||
_navView.delegate = self;
|
||||
}
|
||||
return _navView;
|
||||
}
|
||||
|
||||
- (UIImageView *)backImageView {
|
||||
if (!_backImageView) {
|
||||
_backImageView = [[UIImageView alloc] init];
|
||||
_backImageView.image = [UIImage imageNamed:@"home_top_bg"];
|
||||
_backImageView.layer.masksToBounds = YES;
|
||||
_backImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _backImageView;
|
||||
if (!_backImageView) {
|
||||
_backImageView = [[UIImageView alloc] init];
|
||||
_backImageView.image = [UIImage imageNamed:@"home_top_bg"];
|
||||
_backImageView.layer.masksToBounds = YES;
|
||||
_backImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _backImageView;
|
||||
}
|
||||
- (XPNewHomeHeadView *)headView{
|
||||
if(!_headView){
|
||||
_headView = [[XPNewHomeHeadView alloc]initWithFrame:CGRectZero];
|
||||
}
|
||||
return _headView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -810,7 +810,7 @@
|
||||
config.message = message;
|
||||
[TTPopup alertWithConfig:config confirmHandler:^{
|
||||
if ([self isInSudGame:self.cardInfo.uid]) {
|
||||
NSString *message = [NSString stringWithFormat:YMLocalizedString(@"XPUserCardViewController6")];
|
||||
NSString *message = YMLocalizedString(@"XPUserCardViewController6");
|
||||
TTAlertConfig *config = [[TTAlertConfig alloc] init];
|
||||
config.title = @"";
|
||||
config.message = message;
|
||||
|
@@ -2663,7 +2663,9 @@
|
||||
"XPNobleCenterPayView3" = "确认支付";
|
||||
///LoginForgetEditView.m
|
||||
"LoginForgetEditView0" = "获取验证码";
|
||||
|
||||
/// XPNewHomeViewController
|
||||
"XPNewHomeViewController0"="热门推荐";
|
||||
"XPNewHomeViewController1"="优质陪伴";
|
||||
///LoginForgetPasswordViewController.m
|
||||
"LoginForgetPasswordViewController0" = "忘记密码";
|
||||
"LoginForgetPasswordViewController1" = "验证码发送成功";
|
||||
@@ -2897,6 +2899,7 @@
|
||||
"XPRoomTrumpetViewController5" = "输入内容最多20个字哦~";
|
||||
"XPRoomTrumpetViewController6" = "发佈后,1分钟内不可使用小喇叭~";
|
||||
"XPRoomTrumpetViewController7" = "后可以再次使用喇叭喊话~";
|
||||
|
||||
///SudCommon.m
|
||||
"SudCommon0" = "通用错误";
|
||||
"SudCommon1" = "http 缺失code 参数";
|
||||
@@ -2969,6 +2972,13 @@
|
||||
"LittleGameStageView0" = "游戏中不可以换麦!";
|
||||
///LittleGameScrollStageView.m
|
||||
"LittleGameScrollStageView0" = "游戏中不可以换麦!";
|
||||
|
||||
///XPNewHomeHeadView
|
||||
"XPNewHomeHeadView0"="心动恋爱";
|
||||
"XPNewHomeHeadView1"="颜值女神聚集地";
|
||||
"XPNewHomeHeadView2"="陪伴交友";
|
||||
"XPNewHomeHeadView3"="有趣的人都在这";
|
||||
|
||||
///不能脚本生成的
|
||||
"App_Common_And" = "和";
|
||||
"App_Common_Male" = "男";
|
||||
|
@@ -2897,6 +2897,7 @@
|
||||
"XPRoomTrumpetViewController5" = "輸入內容最多20個字哦~";
|
||||
"XPRoomTrumpetViewController6" = "發佈後,1分鐘內不可使用小喇叭~";
|
||||
"XPRoomTrumpetViewController7" = "後可以再次使用喇叭喊話~";
|
||||
|
||||
///SudCommon.m
|
||||
"SudCommon0" = "通用錯誤";
|
||||
"SudCommon1" = "http 缺失code 參數";
|
||||
@@ -2971,6 +2972,19 @@
|
||||
"LittleGameScrollStageView0" = "游戲中不可以換麥!";
|
||||
///XPMineGameTableViewCell.m
|
||||
"XPMineGameTableViewCell0" = "休閑游戲";
|
||||
|
||||
|
||||
|
||||
|
||||
///XPNewHomeHeadView
|
||||
"XPNewHomeHeadView0"="心動戀愛";
|
||||
"XPNewHomeHeadView1"="顏值女神聚集地";
|
||||
"XPNewHomeHeadView2"="陪伴交友";
|
||||
"XPNewHomeHeadView3"="有趣的人都在這";
|
||||
/// XPNewHomeViewController
|
||||
"XPNewHomeViewController0"="熱門推薦";
|
||||
"XPNewHomeViewController1"="優質陪伴";
|
||||
|
||||
///不能腳本生成的
|
||||
"App_Common_And" = "和";
|
||||
"App_Common_Male" = "男";
|
||||
|