首页新的UI以及数据
1
Podfile
@@ -52,6 +52,7 @@ target 'xplan-ios' do
|
||||
pod 'SVGAPlayer', '~> 2.3'
|
||||
# 滑动标签栏
|
||||
pod 'JXCategoryView'
|
||||
pod 'JXPagingView/Pager'
|
||||
#UM统计
|
||||
pod 'UMCommon'
|
||||
pod 'UMDevice'
|
||||
|
@@ -21,6 +21,7 @@ PODS:
|
||||
- HappyDNS (0.3.17)
|
||||
- IAPHelper (1.1)
|
||||
- JXCategoryView (1.5.9)
|
||||
- JXPagingView/Pager (2.1.2)
|
||||
- LookinServer (1.0.4)
|
||||
- MarqueeLabel-ObjC (3.3.0)
|
||||
- Masonry (1.1.0)
|
||||
@@ -91,6 +92,7 @@ DEPENDENCIES:
|
||||
- FFPopup
|
||||
- IAPHelper
|
||||
- JXCategoryView
|
||||
- JXPagingView/Pager
|
||||
- LookinServer
|
||||
- MarqueeLabel-ObjC
|
||||
- Masonry
|
||||
@@ -120,6 +122,7 @@ DEPENDENCIES:
|
||||
|
||||
SPEC REPOS:
|
||||
https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git:
|
||||
- JXPagingView
|
||||
- NTESBaseComponent
|
||||
- NTESQuickPass
|
||||
trunk:
|
||||
@@ -170,6 +173,7 @@ SPEC CHECKSUMS:
|
||||
HappyDNS: 848ef73e24f2b0e2752064223ce2dc0dd88900ea
|
||||
IAPHelper: fd74f53b0ac142eed085777b88b86a11746a2dd4
|
||||
JXCategoryView: 2ef9ecfd3735158d009ce02d1f29811aa822da65
|
||||
JXPagingView: 90924b364a2ff7e94db534fad1fa50925ff69ee4
|
||||
LookinServer: 743c1681771d0a8dcc38825325a080c3186404a5
|
||||
MarqueeLabel-ObjC: 696eaa82e4fcc7fb53e4fdf37ac138f03bf022d6
|
||||
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
|
||||
@@ -199,6 +203,6 @@ SPEC CHECKSUMS:
|
||||
YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
|
||||
YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928
|
||||
|
||||
PODFILE CHECKSUM: 1fa9307cda450b37197ea1356c5e0679d82d1d41
|
||||
PODFILE CHECKSUM: 8120dbc8eb506e124ccb97e8ce2ecf2420ac8b5f
|
||||
|
||||
COCOAPODS: 1.11.2
|
||||
|
@@ -257,7 +257,7 @@
|
||||
E878894C273A607C00BF1D57 /* XPGiftUserCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E878894B273A607C00BF1D57 /* XPGiftUserCollectionViewCell.m */; };
|
||||
E8788950273A699900BF1D57 /* ThemeColor+SendGift.m in Sources */ = {isa = PBXBuildFile; fileRef = E878894F273A699900BF1D57 /* ThemeColor+SendGift.m */; };
|
||||
E87A24F1272935920086A794 /* XPMessageRemoteExtModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A24F0272935920086A794 /* XPMessageRemoteExtModel.m */; };
|
||||
E87A26F627587C48002DDC7A /* XPHomeContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A26F527587C48002DDC7A /* XPHomeContainerViewController.m */; };
|
||||
E87A26F627587C48002DDC7A /* XPHomePartyContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A26F527587C48002DDC7A /* XPHomePartyContainerViewController.m */; };
|
||||
E87A26F927587C62002DDC7A /* XPHomeContainerPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A26F827587C62002DDC7A /* XPHomeContainerPresenter.m */; };
|
||||
E87A26FD27587E17002DDC7A /* HomeTagModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A26FC27587E17002DDC7A /* HomeTagModel.m */; };
|
||||
E87A270027588445002DDC7A /* XPHomeListEmptyCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A26FF27588445002DDC7A /* XPHomeListEmptyCollectionViewCell.m */; };
|
||||
@@ -376,7 +376,7 @@
|
||||
E8B846DC26FDE24300A777FE /* RechargeListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846DB26FDE24300A777FE /* RechargeListModel.m */; };
|
||||
E8C21501274B76F60079E6BF /* XPRoomAnimationHitView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C21500274B76F60079E6BF /* XPRoomAnimationHitView.m */; };
|
||||
E8C6FFCA27548120004DC9F0 /* XPHomePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFC027548120004DC9F0 /* XPHomePresenter.m */; };
|
||||
E8C6FFCB27548120004DC9F0 /* XPHomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFC527548120004DC9F0 /* XPHomeViewController.m */; };
|
||||
E8C6FFCB27548120004DC9F0 /* XPHomePartyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFC527548120004DC9F0 /* XPHomePartyViewController.m */; };
|
||||
E8C6FFCC27548120004DC9F0 /* Api+Home.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFC827548120004DC9F0 /* Api+Home.m */; };
|
||||
E8C6FFD027548256004DC9F0 /* XPHomeListCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFCF27548256004DC9F0 /* XPHomeListCollectionViewCell.m */; };
|
||||
E8C6FFD42754AA87004DC9F0 /* XPNoteView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFD32754AA87004DC9F0 /* XPNoteView.m */; };
|
||||
@@ -401,6 +401,19 @@
|
||||
E8DEC9A42764A6600078CB70 /* XPMoreMenuPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8DEC9A32764A6600078CB70 /* XPMoreMenuPresenter.m */; };
|
||||
E8DEC9A82764A68B0078CB70 /* Api+MoreMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = E8DEC9A72764A68B0078CB70 /* Api+MoreMenu.m */; };
|
||||
E8DEC9AC2764A6CD0078CB70 /* XPRoomMoreMenuCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8DEC9AB2764A6CD0078CB70 /* XPRoomMoreMenuCollectionViewCell.m */; };
|
||||
E8E5E18B27C332EE00F457D8 /* XPHomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E18A27C332EE00F457D8 /* XPHomeViewController.m */; };
|
||||
E8E5E18E27C3331E00F457D8 /* XPHomeRecommendViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E18D27C3331E00F457D8 /* XPHomeRecommendViewController.m */; };
|
||||
E8E5E19127C369F000F457D8 /* XPHomeRecommendHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E19027C369F000F457D8 /* XPHomeRecommendHeadView.m */; };
|
||||
E8E5E19427C36BA600F457D8 /* XPHomeBannerTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E19327C36BA600F457D8 /* XPHomeBannerTableViewCell.m */; };
|
||||
E8E5E19727C36BE700F457D8 /* XPHomeRecommendTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E19627C36BE700F457D8 /* XPHomeRecommendTableViewCell.m */; };
|
||||
E8E5E19A27C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E19927C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.m */; };
|
||||
E8E5E19D27C36C3500F457D8 /* XPHomeMenuTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E19C27C36C3500F457D8 /* XPHomeMenuTableViewCell.m */; };
|
||||
E8E5E1A027C36E3F00F457D8 /* HomeBannerInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E19F27C36E3F00F457D8 /* HomeBannerInfoModel.m */; };
|
||||
E8E5E1A327C3730B00F457D8 /* XPHomeSectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E1A227C3730B00F457D8 /* XPHomeSectionView.m */; };
|
||||
E8E5E1A627C37F0C00F457D8 /* XPHomeRecommendCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E1A527C37F0C00F457D8 /* XPHomeRecommendCollectionViewCell.m */; };
|
||||
E8E5E1A927C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E1A827C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.m */; };
|
||||
E8E5E1AF27C3920100F457D8 /* XPHomeRecommendPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E1AE27C3920100F457D8 /* XPHomeRecommendPresenter.m */; };
|
||||
E8E5E1B327C397A400F457D8 /* HomeMenuInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E1B227C397A400F457D8 /* HomeMenuInfoModel.m */; };
|
||||
E8E70D7726F2F15100F03460 /* XPMineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E70D7626F2F15100F03460 /* XPMineViewController.m */; };
|
||||
E8E70D7A26F2F16600F03460 /* XPMinePresent.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E70D7926F2F16600F03460 /* XPMinePresent.m */; };
|
||||
E8E70D7E26F2F19D00F03460 /* Api+Mine.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E70D7D26F2F19D00F03460 /* Api+Mine.m */; };
|
||||
@@ -937,8 +950,8 @@
|
||||
E878894F273A699900BF1D57 /* ThemeColor+SendGift.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "ThemeColor+SendGift.m"; sourceTree = "<group>"; };
|
||||
E87A24EF272935920086A794 /* XPMessageRemoteExtModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMessageRemoteExtModel.h; sourceTree = "<group>"; };
|
||||
E87A24F0272935920086A794 /* XPMessageRemoteExtModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMessageRemoteExtModel.m; sourceTree = "<group>"; };
|
||||
E87A26F427587C48002DDC7A /* XPHomeContainerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeContainerViewController.h; sourceTree = "<group>"; };
|
||||
E87A26F527587C48002DDC7A /* XPHomeContainerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeContainerViewController.m; sourceTree = "<group>"; };
|
||||
E87A26F427587C48002DDC7A /* XPHomePartyContainerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomePartyContainerViewController.h; sourceTree = "<group>"; };
|
||||
E87A26F527587C48002DDC7A /* XPHomePartyContainerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomePartyContainerViewController.m; sourceTree = "<group>"; };
|
||||
E87A26F727587C62002DDC7A /* XPHomeContainerPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeContainerPresenter.h; sourceTree = "<group>"; };
|
||||
E87A26F827587C62002DDC7A /* XPHomeContainerPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeContainerPresenter.m; sourceTree = "<group>"; };
|
||||
E87A26FA27587C83002DDC7A /* XPHomeContainerProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeContainerProtocol.h; sourceTree = "<group>"; };
|
||||
@@ -1163,8 +1176,8 @@
|
||||
E8C6FFBF27548120004DC9F0 /* XPHomePresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPHomePresenter.h; sourceTree = "<group>"; };
|
||||
E8C6FFC027548120004DC9F0 /* XPHomePresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPHomePresenter.m; sourceTree = "<group>"; };
|
||||
E8C6FFC227548120004DC9F0 /* XPHomeProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPHomeProtocol.h; sourceTree = "<group>"; };
|
||||
E8C6FFC527548120004DC9F0 /* XPHomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPHomeViewController.m; sourceTree = "<group>"; };
|
||||
E8C6FFC627548120004DC9F0 /* XPHomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPHomeViewController.h; sourceTree = "<group>"; };
|
||||
E8C6FFC527548120004DC9F0 /* XPHomePartyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPHomePartyViewController.m; sourceTree = "<group>"; };
|
||||
E8C6FFC627548120004DC9F0 /* XPHomePartyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPHomePartyViewController.h; sourceTree = "<group>"; };
|
||||
E8C6FFC827548120004DC9F0 /* Api+Home.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Api+Home.m"; sourceTree = "<group>"; };
|
||||
E8C6FFC927548120004DC9F0 /* Api+Home.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Api+Home.h"; sourceTree = "<group>"; };
|
||||
E8C6FFCE27548256004DC9F0 /* XPHomeListCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeListCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
@@ -1214,6 +1227,33 @@
|
||||
E8DEC9A72764A68B0078CB70 /* Api+MoreMenu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+MoreMenu.m"; sourceTree = "<group>"; };
|
||||
E8DEC9AA2764A6CD0078CB70 /* XPRoomMoreMenuCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMoreMenuCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
E8DEC9AB2764A6CD0078CB70 /* XPRoomMoreMenuCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMoreMenuCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
E8E5E18927C332EE00F457D8 /* XPHomeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeViewController.h; sourceTree = "<group>"; };
|
||||
E8E5E18A27C332EE00F457D8 /* XPHomeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeViewController.m; sourceTree = "<group>"; };
|
||||
E8E5E18C27C3331E00F457D8 /* XPHomeRecommendViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeRecommendViewController.h; sourceTree = "<group>"; };
|
||||
E8E5E18D27C3331E00F457D8 /* XPHomeRecommendViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeRecommendViewController.m; sourceTree = "<group>"; };
|
||||
E8E5E18F27C369F000F457D8 /* XPHomeRecommendHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeRecommendHeadView.h; sourceTree = "<group>"; };
|
||||
E8E5E19027C369F000F457D8 /* XPHomeRecommendHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeRecommendHeadView.m; sourceTree = "<group>"; };
|
||||
E8E5E19227C36BA600F457D8 /* XPHomeBannerTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeBannerTableViewCell.h; sourceTree = "<group>"; };
|
||||
E8E5E19327C36BA600F457D8 /* XPHomeBannerTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeBannerTableViewCell.m; sourceTree = "<group>"; };
|
||||
E8E5E19527C36BE700F457D8 /* XPHomeRecommendTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeRecommendTableViewCell.h; sourceTree = "<group>"; };
|
||||
E8E5E19627C36BE700F457D8 /* XPHomeRecommendTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeRecommendTableViewCell.m; sourceTree = "<group>"; };
|
||||
E8E5E19827C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeHotRoomTableViewCell.h; sourceTree = "<group>"; };
|
||||
E8E5E19927C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeHotRoomTableViewCell.m; sourceTree = "<group>"; };
|
||||
E8E5E19B27C36C3500F457D8 /* XPHomeMenuTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeMenuTableViewCell.h; sourceTree = "<group>"; };
|
||||
E8E5E19C27C36C3500F457D8 /* XPHomeMenuTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeMenuTableViewCell.m; sourceTree = "<group>"; };
|
||||
E8E5E19E27C36E3F00F457D8 /* HomeBannerInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeBannerInfoModel.h; sourceTree = "<group>"; };
|
||||
E8E5E19F27C36E3F00F457D8 /* HomeBannerInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeBannerInfoModel.m; sourceTree = "<group>"; };
|
||||
E8E5E1A127C3730B00F457D8 /* XPHomeSectionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeSectionView.h; sourceTree = "<group>"; };
|
||||
E8E5E1A227C3730B00F457D8 /* XPHomeSectionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeSectionView.m; sourceTree = "<group>"; };
|
||||
E8E5E1A427C37F0C00F457D8 /* XPHomeRecommendCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeRecommendCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
E8E5E1A527C37F0C00F457D8 /* XPHomeRecommendCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeRecommendCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
E8E5E1A727C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeHotRoomCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
E8E5E1A827C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeHotRoomCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
E8E5E1AD27C3920100F457D8 /* XPHomeRecommendPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeRecommendPresenter.h; sourceTree = "<group>"; };
|
||||
E8E5E1AE27C3920100F457D8 /* XPHomeRecommendPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeRecommendPresenter.m; sourceTree = "<group>"; };
|
||||
E8E5E1B027C3920E00F457D8 /* XPHomeRecommendProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeRecommendProtocol.h; sourceTree = "<group>"; };
|
||||
E8E5E1B127C397A400F457D8 /* HomeMenuInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeMenuInfoModel.h; sourceTree = "<group>"; };
|
||||
E8E5E1B227C397A400F457D8 /* HomeMenuInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeMenuInfoModel.m; sourceTree = "<group>"; };
|
||||
E8E70D7526F2F15100F03460 /* XPMineViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineViewController.h; sourceTree = "<group>"; };
|
||||
E8E70D7626F2F15100F03460 /* XPMineViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineViewController.m; sourceTree = "<group>"; };
|
||||
E8E70D7826F2F16600F03460 /* XPMinePresent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMinePresent.h; sourceTree = "<group>"; };
|
||||
@@ -3231,6 +3271,8 @@
|
||||
E8C6FFE52754FE53004DC9F0 /* XPHomeSearchPresenter.m */,
|
||||
E87A26F727587C62002DDC7A /* XPHomeContainerPresenter.h */,
|
||||
E87A26F827587C62002DDC7A /* XPHomeContainerPresenter.m */,
|
||||
E8E5E1AD27C3920100F457D8 /* XPHomeRecommendPresenter.h */,
|
||||
E8E5E1AE27C3920100F457D8 /* XPHomeRecommendPresenter.m */,
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
@@ -3241,6 +3283,7 @@
|
||||
E8C6FFC227548120004DC9F0 /* XPHomeProtocol.h */,
|
||||
E8C6FFE72754FE66004DC9F0 /* XPHomeSearchProtocol.h */,
|
||||
E87A26FA27587C83002DDC7A /* XPHomeContainerProtocol.h */,
|
||||
E8E5E1B027C3920E00F457D8 /* XPHomeRecommendProtocol.h */,
|
||||
);
|
||||
path = Protocol;
|
||||
sourceTree = "<group>";
|
||||
@@ -3254,6 +3297,10 @@
|
||||
E8C6FFEC27550CC2004DC9F0 /* HomeSearchResultModel.m */,
|
||||
E87A26FB27587E17002DDC7A /* HomeTagModel.h */,
|
||||
E87A26FC27587E17002DDC7A /* HomeTagModel.m */,
|
||||
E8E5E19E27C36E3F00F457D8 /* HomeBannerInfoModel.h */,
|
||||
E8E5E19F27C36E3F00F457D8 /* HomeBannerInfoModel.m */,
|
||||
E8E5E1B127C397A400F457D8 /* HomeMenuInfoModel.h */,
|
||||
E8E5E1B227C397A400F457D8 /* HomeMenuInfoModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -3263,10 +3310,14 @@
|
||||
children = (
|
||||
E8C6FFCD27548154004DC9F0 /* Cell */,
|
||||
E8C6FFD12754AA6A004DC9F0 /* SubViews */,
|
||||
E8C6FFC627548120004DC9F0 /* XPHomeViewController.h */,
|
||||
E8C6FFC527548120004DC9F0 /* XPHomeViewController.m */,
|
||||
E87A26F427587C48002DDC7A /* XPHomeContainerViewController.h */,
|
||||
E87A26F527587C48002DDC7A /* XPHomeContainerViewController.m */,
|
||||
E8C6FFC627548120004DC9F0 /* XPHomePartyViewController.h */,
|
||||
E8C6FFC527548120004DC9F0 /* XPHomePartyViewController.m */,
|
||||
E87A26F427587C48002DDC7A /* XPHomePartyContainerViewController.h */,
|
||||
E87A26F527587C48002DDC7A /* XPHomePartyContainerViewController.m */,
|
||||
E8E5E18927C332EE00F457D8 /* XPHomeViewController.h */,
|
||||
E8E5E18A27C332EE00F457D8 /* XPHomeViewController.m */,
|
||||
E8E5E18C27C3331E00F457D8 /* XPHomeRecommendViewController.h */,
|
||||
E8E5E18D27C3331E00F457D8 /* XPHomeRecommendViewController.m */,
|
||||
E8C6FFDE2754EEF9004DC9F0 /* XPHomeSearchViewController.h */,
|
||||
E8C6FFDF2754EEF9004DC9F0 /* XPHomeSearchViewController.m */,
|
||||
E87A27012758BC81002DDC7A /* XPRoomSearchContainerViewController.h */,
|
||||
@@ -3293,6 +3344,18 @@
|
||||
E8C6FFE22754F349004DC9F0 /* XPSearchListTableViewCell.m */,
|
||||
E87A26FE27588445002DDC7A /* XPHomeListEmptyCollectionViewCell.h */,
|
||||
E87A26FF27588445002DDC7A /* XPHomeListEmptyCollectionViewCell.m */,
|
||||
E8E5E19227C36BA600F457D8 /* XPHomeBannerTableViewCell.h */,
|
||||
E8E5E19327C36BA600F457D8 /* XPHomeBannerTableViewCell.m */,
|
||||
E8E5E19B27C36C3500F457D8 /* XPHomeMenuTableViewCell.h */,
|
||||
E8E5E19C27C36C3500F457D8 /* XPHomeMenuTableViewCell.m */,
|
||||
E8E5E19527C36BE700F457D8 /* XPHomeRecommendTableViewCell.h */,
|
||||
E8E5E19627C36BE700F457D8 /* XPHomeRecommendTableViewCell.m */,
|
||||
E8E5E1A427C37F0C00F457D8 /* XPHomeRecommendCollectionViewCell.h */,
|
||||
E8E5E1A527C37F0C00F457D8 /* XPHomeRecommendCollectionViewCell.m */,
|
||||
E8E5E19827C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.h */,
|
||||
E8E5E19927C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.m */,
|
||||
E8E5E1A727C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.h */,
|
||||
E8E5E1A827C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.m */,
|
||||
);
|
||||
path = Cell;
|
||||
sourceTree = "<group>";
|
||||
@@ -3306,6 +3369,10 @@
|
||||
E8C6FFD62754BC61004DC9F0 /* XPHomeNavView.m */,
|
||||
E8C6FFE82755040B004DC9F0 /* XPHomeSearchNavView.h */,
|
||||
E8C6FFE92755040B004DC9F0 /* XPHomeSearchNavView.m */,
|
||||
E8E5E18F27C369F000F457D8 /* XPHomeRecommendHeadView.h */,
|
||||
E8E5E19027C369F000F457D8 /* XPHomeRecommendHeadView.m */,
|
||||
E8E5E1A127C3730B00F457D8 /* XPHomeSectionView.h */,
|
||||
E8E5E1A227C3730B00F457D8 /* XPHomeSectionView.m */,
|
||||
);
|
||||
path = SubViews;
|
||||
sourceTree = "<group>";
|
||||
@@ -3742,6 +3809,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
E8E5E1AF27C3920100F457D8 /* XPHomeRecommendPresenter.m in Sources */,
|
||||
181D7F1B2726CE2A00B7C059 /* StageView.m in Sources */,
|
||||
18EE3FF12750D2AD00A452BF /* NIMTimeUtils.m in Sources */,
|
||||
E84BF7DA277C72AC00EF8877 /* XPRoomRoleTableViewCell.m in Sources */,
|
||||
@@ -3786,6 +3854,7 @@
|
||||
E8A03DF3276328FC0098D9EA /* CandyTreeRecordModel.m in Sources */,
|
||||
E81366F826F0C12A0076364C /* LoginFullInfoProtocol.h in Sources */,
|
||||
E8E70D7E26F2F19D00F03460 /* Api+Mine.m in Sources */,
|
||||
E8E5E19427C36BA600F457D8 /* XPHomeBannerTableViewCell.m in Sources */,
|
||||
E824543D26F58C3A00BE8163 /* XPLoginBindSuccessView.m in Sources */,
|
||||
E8EEB8F726FC2673007C6EBA /* UserPhoto.m in Sources */,
|
||||
E81C27A226EF23490031E639 /* XPEnum.h in Sources */,
|
||||
@@ -3825,6 +3894,7 @@
|
||||
E81C1B2F277071670020D1E4 /* XPArrangeMicInfoModel.m in Sources */,
|
||||
9B0086CA27BA4F570032BD2B /* AnchorMicroView.m in Sources */,
|
||||
E81C279626EB39CC0031E639 /* LoginForgetPasswordPresent.m in Sources */,
|
||||
E8E5E19727C36BE700F457D8 /* XPHomeRecommendTableViewCell.m in Sources */,
|
||||
18EE3FF42750FA3700A452BF /* UIView+NIM.m in Sources */,
|
||||
E8A03DFF27635F960098D9EA /* XPRoomCandyGiftView.m in Sources */,
|
||||
180116F9279E8C4C00F2CBC0 /* PLTimeUtil.m in Sources */,
|
||||
@@ -3848,6 +3918,7 @@
|
||||
E8A1E45B27620F4900B294CA /* XPRoomHalfWebView.m in Sources */,
|
||||
9B7D80562753C595003DAC0C /* SendMessageView.m in Sources */,
|
||||
E84B0E3F2727EDF6008818C6 /* XPRoomMessageTableViewCell.m in Sources */,
|
||||
E8E5E18B27C332EE00F457D8 /* XPHomeViewController.m in Sources */,
|
||||
E82325FC274E4735003A3332 /* XPUserCardItemModel.m in Sources */,
|
||||
E80DE4102775C34E00BE5BCB /* XPFirstRechargeSuccessView.m in Sources */,
|
||||
E8412FB32779E285006E1101 /* Api+RoomSetting.m in Sources */,
|
||||
@@ -3864,6 +3935,7 @@
|
||||
189DD6FF26E20E5900AB55B1 /* HttpRequestHelper.m in Sources */,
|
||||
E8788945273A55C200BF1D57 /* XPGiftInfoView.m in Sources */,
|
||||
E8AEAED6271412EC0017FCE0 /* XPRoomViewController.m in Sources */,
|
||||
E8E5E1A327C3730B00F457D8 /* XPHomeSectionView.m in Sources */,
|
||||
E8E70D9226F2F60C00F03460 /* XPMineItemModel.m in Sources */,
|
||||
189DD74A26E21D8400AB55B1 /* SSKeychain.m in Sources */,
|
||||
E8DACCFE27673F870052092C /* GiftValueInfoModel.m in Sources */,
|
||||
@@ -3903,6 +3975,7 @@
|
||||
9B0E1C5926E77022005D4442 /* BaseNavigationController.m in Sources */,
|
||||
E8C6FFD027548256004DC9F0 /* XPHomeListCollectionViewCell.m in Sources */,
|
||||
E84BF7DD277C765400EF8877 /* XPRoomRoleEmptyTableViewCell.m in Sources */,
|
||||
E8E5E1A027C36E3F00F457D8 /* HomeBannerInfoModel.m in Sources */,
|
||||
E8EEB8F426FC2050007C6EBA /* SDBrowserImageView.m in Sources */,
|
||||
E824544626F5934700BE8163 /* XPMinePayPwdPresenter.m in Sources */,
|
||||
189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */,
|
||||
@@ -3919,6 +3992,7 @@
|
||||
E878893C273A54C300BF1D57 /* Api+Gift.m in Sources */,
|
||||
E81C279026EB314D0031E639 /* LoginForgetEditView.m in Sources */,
|
||||
E8DEC9A82764A68B0078CB70 /* Api+MoreMenu.m in Sources */,
|
||||
E8E5E19D27C36C3500F457D8 /* XPHomeMenuTableViewCell.m in Sources */,
|
||||
E8AC721026F43955007D6E91 /* UIImageConstant.m in Sources */,
|
||||
E81C27A026EEF83D0031E639 /* XPHtmlUrl.m in Sources */,
|
||||
E8A03DF0276303D40098D9EA /* XPCandyTreeRankTableViewCell.m in Sources */,
|
||||
@@ -3951,7 +4025,7 @@
|
||||
18E7B31B26F0982E0064BC9B /* UserExpand.m in Sources */,
|
||||
E8C6FFE62754FE53004DC9F0 /* XPHomeSearchPresenter.m in Sources */,
|
||||
E824543526F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m in Sources */,
|
||||
E8C6FFCB27548120004DC9F0 /* XPHomeViewController.m in Sources */,
|
||||
E8C6FFCB27548120004DC9F0 /* XPHomePartyViewController.m in Sources */,
|
||||
E8680718271967B00024F48F /* MicroView.m in Sources */,
|
||||
E896EF942771AAC100AD2CC1 /* XPMineFansPresenter.m in Sources */,
|
||||
E8B825CD26EA18C8009E8E9F /* ThemeColor.m in Sources */,
|
||||
@@ -3966,6 +4040,7 @@
|
||||
E8AE427327153A3500BEEBB2 /* XPRoomActivityContainerView.m in Sources */,
|
||||
E86596432701611A00846EBD /* UIImage+ImageEffects.m in Sources */,
|
||||
18486217271EAB8C005FC5DC /* BaseRtcImpl.m in Sources */,
|
||||
E8E5E1A627C37F0C00F457D8 /* XPHomeRecommendCollectionViewCell.m in Sources */,
|
||||
E8DACCFB2766EDC60052092C /* MicroGiftValueView.m in Sources */,
|
||||
E8CEA03D26EA3DE500644B44 /* LoginPasswordPresent.m in Sources */,
|
||||
E8E70D7726F2F15100F03460 /* XPMineViewController.m in Sources */,
|
||||
@@ -3986,7 +4061,7 @@
|
||||
E81C279326EB394D0031E639 /* LoginForgetPasswordViewController.m in Sources */,
|
||||
E81C278D26EAFAF60031E639 /* DESEncrypt.m in Sources */,
|
||||
E81366E726F0A49E0076364C /* NSString+Utils.m in Sources */,
|
||||
E87A26F627587C48002DDC7A /* XPHomeContainerViewController.m in Sources */,
|
||||
E87A26F627587C48002DDC7A /* XPHomePartyContainerViewController.m in Sources */,
|
||||
E8EEB90126FC31B6007C6EBA /* XPMineUserInfoPresenter.m in Sources */,
|
||||
18F404BB2760982000A6C548 /* ChatLimitModel.m in Sources */,
|
||||
189DD56526DE465A00AB55B1 /* LoginViewController.m in Sources */,
|
||||
@@ -3999,6 +4074,7 @@
|
||||
E839532A276A002800CF2F24 /* XPMineDressUpViewController.m in Sources */,
|
||||
E88B5CAD26FB16A800DA9178 /* XPMineTeenagerDesView.m in Sources */,
|
||||
E896EF972771AAE400AD2CC1 /* XPMineAttentionPresenter.m in Sources */,
|
||||
E8E5E19127C369F000F457D8 /* XPHomeRecommendHeadView.m in Sources */,
|
||||
E8C6FFDA2754BE81004DC9F0 /* ThemeColor+Home.m in Sources */,
|
||||
E824545126F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m in Sources */,
|
||||
E8EEB90F26FC6AB8007C6EBA /* XPMineUserInfoEditPresenter.m in Sources */,
|
||||
@@ -4009,6 +4085,7 @@
|
||||
E81C1B29277069DD0020D1E4 /* XPArrangeMicEmptyTableViewCell.m in Sources */,
|
||||
E8AC721C26F4720B007D6E91 /* XPMineSettingPresent.m in Sources */,
|
||||
E88B5CA526FB088600DA9178 /* XPMineTeenagerViewController.m in Sources */,
|
||||
E8E5E1B327C397A400F457D8 /* HomeMenuInfoModel.m in Sources */,
|
||||
E8AEAEF027141C430017FCE0 /* XPRoomMenuContainerView.m in Sources */,
|
||||
E8DEC99527648FA50078CB70 /* ClientConfig.m in Sources */,
|
||||
E8EEB90926FC579A007C6EBA /* XPMineUserInfoEditTableViewCell.m in Sources */,
|
||||
@@ -4022,6 +4099,7 @@
|
||||
E866B6E52759F96F009B002A /* XPMiniRoomView.m in Sources */,
|
||||
9B7B605B27BB53060070BB72 /* XPAnchorAudienceUpMicView.m in Sources */,
|
||||
E8B825BF26E9E57D009E8E9F /* LoginTicketInfo.m in Sources */,
|
||||
E8E5E18E27C3331E00F457D8 /* XPHomeRecommendViewController.m in Sources */,
|
||||
E8E7DAE82744F5EF00C631CC /* XPGiftStorage.m in Sources */,
|
||||
E87AE7FC277AAC450037823A /* XPRoomTagPresenter.m in Sources */,
|
||||
E878894C273A607C00BF1D57 /* XPGiftUserCollectionViewCell.m in Sources */,
|
||||
@@ -4057,11 +4135,13 @@
|
||||
E88B5CC126FB407B00DA9178 /* XPMineUserInfoViewController.m in Sources */,
|
||||
18F4043A275E20D900A6C548 /* TRTCRtcImpl.m in Sources */,
|
||||
E8899C7F27853B6A007944BE /* DatingMicroView.m in Sources */,
|
||||
E8E5E19A27C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.m in Sources */,
|
||||
E824545926F5E65900BE8163 /* XPMineVerifIdentityView.m in Sources */,
|
||||
189DD74026E21C3F00AB55B1 /* YYUtility+App.m in Sources */,
|
||||
189DD74526E21CCC00AB55B1 /* YYReachability.m in Sources */,
|
||||
E82109AD26F1C8A000FC3319 /* CountDownHelper.m in Sources */,
|
||||
E8E70D8F26F2F5DB00F03460 /* XPMineMenuTableViewCell.m in Sources */,
|
||||
E8E5E1A927C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.m in Sources */,
|
||||
187EEEE126E89BFB002833B2 /* AccountModel.m in Sources */,
|
||||
E896EFA92771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.m in Sources */,
|
||||
E8AC722126F47E23007D6E91 /* XPMineAboutUsViewController.m in Sources */,
|
||||
|
22
xplan-ios/Assets.xcassets/Home/home_recommend_hot.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_recommend_hot@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_recommend_hot@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Home/home_recommend_hot.imageset/home_recommend_hot@2x.png
vendored
Normal file
After Width: | Height: | Size: 440 B |
BIN
xplan-ios/Assets.xcassets/Home/home_recommend_hot.imageset/home_recommend_hot@3x.png
vendored
Normal file
After Width: | Height: | Size: 660 B |
22
xplan-ios/Assets.xcassets/Home/home_recommend_hot_cover_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_recommend_hot_cover_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_recommend_hot_cover_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 2.5 KiB |
22
xplan-ios/Assets.xcassets/Home/home_recommend_room_more.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_recommend_room_more@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_recommend_room_more@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Home/home_recommend_room_more.imageset/home_recommend_room_more@2x.png
vendored
Normal file
After Width: | Height: | Size: 167 B |
BIN
xplan-ios/Assets.xcassets/Home/home_recommend_room_more.imageset/home_recommend_room_more@3x.png
vendored
Normal file
After Width: | Height: | Size: 220 B |
22
xplan-ios/Assets.xcassets/Home/home_recommend_room_placeholder.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_recommend_room_placeholder@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_recommend_room_placeholder@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 7.3 KiB |
22
xplan-ios/Assets.xcassets/Home/home_recommend_section_logo.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_recommend_section_logo@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_recommend_section_logo@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.3 KiB |
@@ -40,6 +40,26 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
page:(NSString *)page
|
||||
pageSize:(NSString *)pageSize;
|
||||
|
||||
/// 首页推荐的轮播图
|
||||
/// @param completion 完成
|
||||
/// @param uid 用户的uid
|
||||
/// @param type 类型 2 房间的 1 首页的 9推荐页下面的
|
||||
+ (void)homeBannerList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid type:(NSString *)type;
|
||||
|
||||
/// 请求推荐页资源的列表
|
||||
/// @param completion 完成
|
||||
/// @param uid 用户的uid
|
||||
+ (void)homeMenuList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid;
|
||||
|
||||
/// 请求推荐房间列表
|
||||
/// @param completion 完成
|
||||
/// @param uid 用户的uid
|
||||
+ (void)homeRecommendRoomList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid;
|
||||
|
||||
/// 请求热门房间列表
|
||||
/// @param completion 完成
|
||||
+ (void)homeHotRoomList:(HttpRequestHelperCompletion)completion;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -36,4 +36,32 @@
|
||||
+ (void)searchComplection:(HttpRequestHelperCompletion)complection key:(NSString *)key type:(NSString *)type page:(NSString *)page pageSize:(NSString *)pageSize {
|
||||
[self makeRequest:@"search/room" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, key, type, page, pageSize, nil];
|
||||
}
|
||||
|
||||
/// 首页推荐的轮播图
|
||||
/// @param completion 完成
|
||||
/// @param uid 用户的uid
|
||||
/// @param type 类型 2 房间的 1 首页的 9推荐页下面的
|
||||
+ (void)homeBannerList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid type:(NSString *)type {
|
||||
[self makeRequest:@"home/banner" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, type, nil];
|
||||
}
|
||||
|
||||
/// 请求推荐页资源的列表
|
||||
/// @param completion 完成
|
||||
/// @param uid 用户的uid
|
||||
+ (void)homeMenuList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid {
|
||||
[self makeRequest:@"home/currentResource" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, nil];
|
||||
}
|
||||
|
||||
/// 请求推荐房间列表
|
||||
/// @param completion 完成
|
||||
/// @param uid 用户的uid
|
||||
+ (void)homeRecommendRoomList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid {
|
||||
[self makeRequest:@"home/tab/homeV2" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, nil];
|
||||
}
|
||||
|
||||
/// 请求热门房间列表
|
||||
/// @param completion 完成
|
||||
+ (void)homeHotRoomList:(HttpRequestHelperCompletion)completion {
|
||||
[self makeRequest:@"single/broadcast/getMainPopularityAnchorList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, nil];
|
||||
}
|
||||
@end
|
||||
|
32
xplan-ios/Main/Home/Model/HomeBannerInfoModel.h
Normal file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// HomeBannerInfoModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, HomeBannerInfoSkipType) {
|
||||
///跳转房间
|
||||
HomeBannerInfoSkipType_Room = 2,
|
||||
///跳转h5
|
||||
HomeBannerInfoSkipType_Web = 3,
|
||||
};
|
||||
|
||||
@interface HomeBannerInfoModel : NSObject
|
||||
///ID
|
||||
@property (nonatomic,copy)NSString *bannerId;
|
||||
///名字
|
||||
@property (nonatomic,copy)NSString *bannerName;
|
||||
///图片
|
||||
@property (nonatomic, copy)NSString *bannerPic;
|
||||
///跳转的地址
|
||||
@property (nonatomic, copy)NSString *skipUri;
|
||||
///跳转的类型
|
||||
@property (nonatomic, assign)HomeBannerInfoSkipType skipType;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Home/Model/HomeBannerInfoModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// HomeBannerInfoModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import "HomeBannerInfoModel.h"
|
||||
|
||||
@implementation HomeBannerInfoModel
|
||||
|
||||
@end
|
38
xplan-ios/Main/Home/Model/HomeMenuInfoModel.h
Normal file
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// HomeMenuInfoModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSInteger, HomeMenuResourceType) {
|
||||
///进入牌照房
|
||||
HomeMenuResourceType_Room_Licnese = 1,
|
||||
///进入相亲房
|
||||
HomeMenuResourceType_Room_Dating,
|
||||
///进入PK房
|
||||
HomeMenuResourceType_Room_PK,
|
||||
///进入Game房
|
||||
HomeMenuResourceType_Room_Game,
|
||||
///进入H5
|
||||
HomeMenuResourceType_H5,
|
||||
///进入自定义房
|
||||
HomeMenuResourceType_Room_Custom,
|
||||
};
|
||||
|
||||
@interface HomeMenuInfoModel : NSObject
|
||||
///ID 映射字段
|
||||
@property (nonatomic,copy) NSString *hid;
|
||||
///显示的图片
|
||||
@property (nonatomic, copy)NSString *icon;
|
||||
///类型
|
||||
@property (nonatomic, assign)HomeMenuResourceType resourceType;
|
||||
///跳转h5的时候 跳转链接
|
||||
@property (nonatomic, copy)NSString *resourceContent;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
17
xplan-ios/Main/Home/Model/HomeMenuInfoModel.m
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// HomeMenuInfoModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import "HomeMenuInfoModel.h"
|
||||
|
||||
@implementation HomeMenuInfoModel
|
||||
|
||||
///如果一个模型中需要字段映射的话 比如id -> ID name -> other.name
|
||||
+ (NSDictionary *)replacedKeyFromPropertyName {
|
||||
return @{@"id":@"hid"};
|
||||
}
|
||||
|
||||
@end
|
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "XPEnum.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface HomeRecommendRoomModel : NSObject
|
||||
@@ -22,6 +22,16 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,copy) NSString *title;
|
||||
///tag的图片
|
||||
@property (nonatomic,copy) NSString *tagPict;
|
||||
///性别
|
||||
@property (nonatomic,assign) GenderType gender;
|
||||
///房主的昵称
|
||||
@property (nonatomic,copy) NSString *nick;
|
||||
///房间的id
|
||||
@property (nonatomic,copy) NSString *roomId;
|
||||
///房主的uid
|
||||
@property (nonatomic,copy) NSString *uid;
|
||||
///用户简介
|
||||
@property(nonatomic, copy) NSString *userDesc;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
23
xplan-ios/Main/Home/Presenter/XPHomeRecommendPresenter.h
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// XPHomeRecommendPresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPHomeRecommendPresenter : BaseMvpPresenter
|
||||
/// 获取首页顶部的轮播图
|
||||
- (void)getHomeTopBannerList;
|
||||
/// 获取首页资源列表
|
||||
- (void)getHomeMenuList;
|
||||
/// 获取首页推荐列表
|
||||
- (void)getHomeRecommendRoomList;
|
||||
/// 获取首页热门房间列表
|
||||
- (void)getHomeHotRoomList;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
53
xplan-ios/Main/Home/Presenter/XPHomeRecommendPresenter.m
Normal file
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// XPHomeRecommendPresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import "XPHomeRecommendPresenter.h"
|
||||
#import "Api+Home.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "HomeMenuInfoModel.h"
|
||||
#import "HomeRecommendRoomModel.h"
|
||||
#import "HomeBannerInfoModel.h"
|
||||
#import "XPHomeRecommendProtocol.h"
|
||||
@implementation XPHomeRecommendPresenter
|
||||
|
||||
|
||||
/// 获取首页顶部的轮播图
|
||||
- (void)getHomeTopBannerList {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[Api homeBannerList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray * array = [HomeBannerInfoModel modelsWithArray:data.data];
|
||||
[[self getView] getHomeTopBannerListSuccess:array];
|
||||
}] uid:uid type:@"9"];
|
||||
}
|
||||
|
||||
/// 获取首页资源列表
|
||||
- (void)getHomeMenuList {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[Api homeMenuList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray * array = [HomeMenuInfoModel modelsWithArray:data.data];
|
||||
[[self getView] getHomeMenuListSuccess:array];
|
||||
}] uid:uid];
|
||||
}
|
||||
|
||||
/// 获取首页推荐列表
|
||||
- (void)getHomeRecommendRoomList {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[Api homeRecommendRoomList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray * array = [HomeRecommendRoomModel modelsWithArray:data.data];
|
||||
[[self getView] getHomeRecommendRoomListSuccess:array];
|
||||
}] uid:uid];
|
||||
}
|
||||
|
||||
/// 获取首页热门房间列表
|
||||
- (void)getHomeHotRoomList {
|
||||
[Api homeHotRoomList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray * array = [HomeRecommendRoomModel modelsWithArray:data.data];
|
||||
// [[self getView] getHomeHotRoomListSuccess:array];
|
||||
}]];
|
||||
}
|
||||
|
||||
@end
|
23
xplan-ios/Main/Home/Protocol/XPHomeRecommendProtocol.h
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// XPHomeRecommendProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol XPHomeRecommendProtocol <NSObject>
|
||||
///获取首页轮播图列表成功
|
||||
- (void)getHomeTopBannerListSuccess:(NSArray*)list;
|
||||
///获取首页菜单列表成功
|
||||
- (void)getHomeMenuListSuccess:(NSArray *)list;
|
||||
///获取首页推荐列表成功
|
||||
- (void)getHomeRecommendRoomListSuccess:(NSArray *)list;
|
||||
///获取首页热门房列表成功
|
||||
- (void)getHomeHotRoomListSuccess:(NSArray *)list;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
26
xplan-ios/Main/Home/View/Cell/XPHomeBannerTableViewCell.h
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// XPHomeBannerTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class HomeBannerInfoModel, XPHomeBannerTableViewCell;
|
||||
|
||||
@protocol XPHomeBannerTableViewCellDelegate <NSObject>
|
||||
|
||||
///点击了某个banner
|
||||
- (void)xPHomeBannerTableViewCell:(XPHomeBannerTableViewCell *)view didClickBanner:(HomeBannerInfoModel *)info;
|
||||
|
||||
@end
|
||||
|
||||
@interface XPHomeBannerTableViewCell : UITableViewCell
|
||||
@property (nonatomic,strong) NSArray<HomeBannerInfoModel *> *bannerList;
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPHomeBannerTableViewCellDelegate> delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
82
xplan-ios/Main/Home/View/Cell/XPHomeBannerTableViewCell.m
Normal file
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// XPHomeBannerTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
// 轮播图
|
||||
|
||||
#import "XPHomeBannerTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <SDCycleScrollView/SDCycleScrollView.h>
|
||||
///Model
|
||||
#import "HomeBannerInfoModel.h"
|
||||
|
||||
@interface XPHomeBannerTableViewCell ()<SDCycleScrollViewDelegate>
|
||||
@property (nonatomic, strong) SDCycleScrollView *cycleScrollView;
|
||||
@end
|
||||
|
||||
@implementation XPHomeBannerTableViewCell
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.cycleScrollView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contentView);
|
||||
make.bottom.mas_equalTo(self.contentView).offset(-10);
|
||||
make.left.right.mas_equalTo(self.contentView).inset(15);
|
||||
}];
|
||||
}
|
||||
#pragma mark - SDCycleScrollViewDelegate
|
||||
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index {
|
||||
HomeBannerInfoModel * bannerInfo = [self.bannerList objectAtIndex: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.cycleScrollView.imageURLStringsGroup = array;
|
||||
[self.cycleScrollView autoScroll];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (SDCycleScrollView *)cycleScrollView {
|
||||
if (!_cycleScrollView) {
|
||||
_cycleScrollView = [[SDCycleScrollView alloc] init];
|
||||
_cycleScrollView.backgroundColor = [UIColor clearColor];
|
||||
_cycleScrollView.layer.cornerRadius = 10;
|
||||
_cycleScrollView.layer.masksToBounds = YES;
|
||||
_cycleScrollView.delegate = self;
|
||||
_cycleScrollView.showPageControl = NO;
|
||||
_cycleScrollView.autoScrollTimeInterval = 5.0;
|
||||
}
|
||||
return _cycleScrollView;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPHomeHotRoomCollectionViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class HomeRecommendRoomModel;
|
||||
@interface XPHomeHotRoomCollectionViewCell : UICollectionViewCell
|
||||
@property (nonatomic,strong) HomeRecommendRoomModel * hotRoomInfo;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
212
xplan-ios/Main/Home/View/Cell/XPHomeHotRoomCollectionViewCell.m
Normal file
@@ -0,0 +1,212 @@
|
||||
//
|
||||
// XPHomeHotRoomCollectionViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import "XPHomeHotRoomCollectionViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "NetImageView.h"
|
||||
#import "ThemeColor.h"
|
||||
#import "UIImage+Utils.h"
|
||||
///Model
|
||||
#import "HomeRecommendRoomModel.h"
|
||||
|
||||
@interface XPHomeHotRoomCollectionViewCell ()
|
||||
///头像的背景
|
||||
@property (nonatomic,strong) NetImageView *backImageView;
|
||||
///头像
|
||||
@property (nonatomic,strong) NetImageView *avatarImageView;
|
||||
///房间标题
|
||||
@property (nonatomic,strong) UILabel *roomTitleLabel;
|
||||
///昵称
|
||||
@property (nonatomic,strong) UILabel *nickLabel;
|
||||
///性别
|
||||
@property (nonatomic,strong) UIImageView *sexImageView;
|
||||
///房间话题的容器
|
||||
@property (nonatomic,strong) UIView * roomDesView;
|
||||
///房间的标签
|
||||
@property (nonatomic,strong) NetImageView *roomTagImageView;
|
||||
///房间的话题
|
||||
@property (nonatomic,strong) UILabel *roomDesLabel;
|
||||
///覆盖的图片
|
||||
@property (nonatomic,strong) UIImageView *coverImageView;
|
||||
@end
|
||||
|
||||
@implementation XPHomeHotRoomCollectionViewCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.contentView addSubview:self.backImageView];
|
||||
[self.contentView addSubview:self.coverImageView];
|
||||
[self.contentView addSubview:self.avatarImageView];
|
||||
[self.contentView addSubview:self.roomTitleLabel];
|
||||
[self.contentView addSubview:self.nickLabel];
|
||||
[self.contentView addSubview:self.sexImageView];
|
||||
[self.contentView addSubview:self.roomDesView];
|
||||
|
||||
|
||||
[self.roomDesView addSubview:self.roomTagImageView];
|
||||
[self.roomDesView addSubview:self.roomDesLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(48, 48));
|
||||
make.top.left.mas_equalTo(self.contentView).offset(9);
|
||||
}];
|
||||
|
||||
[self.coverImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.backImageView);
|
||||
}];
|
||||
|
||||
[self.roomTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.avatarImageView.mas_right).offset(7);
|
||||
make.top.mas_equalTo(self.avatarImageView);
|
||||
make.right.mas_lessThanOrEqualTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.roomTitleLabel);
|
||||
make.top.mas_equalTo(self.roomTitleLabel.mas_bottom).offset(2);
|
||||
}];
|
||||
|
||||
[self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.nickLabel.mas_right).offset(4);
|
||||
make.centerY.mas_equalTo(self.nickLabel);
|
||||
make.size.mas_equalTo(CGSizeMake(14, 14));
|
||||
}];
|
||||
|
||||
[self.roomDesView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self.contentView).offset(10);
|
||||
make.left.mas_equalTo(self.contentView).offset(9);
|
||||
make.height.mas_equalTo(28);
|
||||
make.bottom.mas_equalTo(self.contentView).offset(-8);
|
||||
}];
|
||||
|
||||
[self.roomTagImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(38, 18));
|
||||
make.left.mas_equalTo(self.roomDesView).offset(8);
|
||||
make.centerY.mas_equalTo(self.roomDesView);
|
||||
}];
|
||||
|
||||
[self.roomDesLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.roomDesView.mas_right).offset(4);
|
||||
make.centerY.mas_equalTo(self.roomDesView);
|
||||
}];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setHotRoomInfo:(HomeRecommendRoomModel *)hotRoomInfo {
|
||||
_hotRoomInfo = hotRoomInfo;
|
||||
if (_hotRoomInfo) {
|
||||
self.avatarImageView.imageUrl = _hotRoomInfo.avatar;
|
||||
self.backImageView.imageUrl = _hotRoomInfo.avatar;
|
||||
self.roomTitleLabel.text = _hotRoomInfo.title;
|
||||
self.roomTagImageView.imageUrl = _hotRoomInfo.tagPict;
|
||||
self.nickLabel.text = _hotRoomInfo.nick;
|
||||
self.sexImageView.image = _hotRoomInfo.gender == GenderType_Female ? [UIImage imageNamed:@"common_female"] : [UIImage imageNamed:@"common_male"];
|
||||
self.roomDesLabel.text = _hotRoomInfo.userDesc;
|
||||
}
|
||||
}
|
||||
|
||||
- (NetImageView *)backImageView {
|
||||
if (!_backImageView) {
|
||||
_backImageView = [[NetImageView alloc] init];
|
||||
_backImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_backImageView.layer.masksToBounds = YES;
|
||||
_backImageView.layer.cornerRadius = 8;
|
||||
}
|
||||
return _backImageView;
|
||||
}
|
||||
|
||||
- (NetImageView *)avatarImageView {
|
||||
if (!_avatarImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc]init];
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_avatarImageView.layer.masksToBounds = YES;
|
||||
_avatarImageView.layer.cornerRadius = 48/2;
|
||||
}
|
||||
return _avatarImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)roomTitleLabel {
|
||||
if (!_roomTitleLabel) {
|
||||
_roomTitleLabel = [[UILabel alloc] init];
|
||||
_roomTitleLabel.font = [UIFont boldSystemFontOfSize:14];
|
||||
_roomTitleLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _roomTitleLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)nickLabel {
|
||||
if (!_nickLabel) {
|
||||
_nickLabel = [[UILabel alloc] init];
|
||||
_nickLabel.font = [UIFont systemFontOfSize:12];
|
||||
_nickLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _nickLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)sexImageView {
|
||||
if (!_sexImageView) {
|
||||
_sexImageView = [[UIImageView alloc] init];
|
||||
_sexImageView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _sexImageView;
|
||||
}
|
||||
|
||||
- (UIView *)roomDesView {
|
||||
if (!_roomDesView) {
|
||||
_roomDesView = [[UIView alloc] init];
|
||||
_roomDesView.backgroundColor = UIColorRGBAlpha(0x9DADFF, 0.3);
|
||||
_roomDesView.layer.masksToBounds = YES;
|
||||
_roomDesView.layer.cornerRadius = 14;
|
||||
}
|
||||
return _roomDesView;
|
||||
}
|
||||
|
||||
- (NetImageView *)roomTagImageView {
|
||||
if (!_roomTagImageView) {
|
||||
_roomTagImageView = [[NetImageView alloc] init];
|
||||
_roomTagImageView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _roomTagImageView;
|
||||
}
|
||||
- (UILabel *)roomDesLabel {
|
||||
if (!_roomDesLabel) {
|
||||
_roomDesLabel = [[UILabel alloc] init];
|
||||
_roomDesLabel.font = [UIFont systemFontOfSize:12];
|
||||
_roomDesLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _roomDesLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)coverImageView {
|
||||
if (!_coverImageView) {
|
||||
_coverImageView = [[UIImageView alloc] init];
|
||||
_coverImageView.userInteractionEnabled = YES;
|
||||
_coverImageView.image = [UIImage imageNamed:@"home_recommend_hot_cover_bg"];
|
||||
}
|
||||
return _coverImageView;
|
||||
}
|
||||
|
||||
@end
|
16
xplan-ios/Main/Home/View/Cell/XPHomeHotRoomTableViewCell.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPHomeHotRoomTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPHomeHotRoomTableViewCell : UITableViewCell
|
||||
@property (nonatomic,strong) NSArray *hotAnchorList;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
87
xplan-ios/Main/Home/View/Cell/XPHomeHotRoomTableViewCell.m
Normal file
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// XPHomeHotRoomTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
// 人气主播
|
||||
|
||||
#import "XPHomeHotRoomTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "XPMacro.h"
|
||||
///View
|
||||
#import "XPHomeHotRoomCollectionViewCell.h"
|
||||
|
||||
@interface XPHomeHotRoomTableViewCell ()<UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
|
||||
///列表
|
||||
@property (nonatomic,strong) UICollectionView *collectionView;
|
||||
@end
|
||||
|
||||
@implementation XPHomeHotRoomTableViewCell
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.collectionView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.contentView).inset(15);
|
||||
make.top.bottom.mas_equalTo(self.contentView);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegate And UICollectionViewDatasource
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return CGSizeMake(188, 96);
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.hotAnchorList.count;
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPHomeHotRoomCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeHotRoomCollectionViewCell class]) forIndexPath:indexPath];
|
||||
HomeRecommendRoomModel * info = [self.hotAnchorList objectAtIndex:indexPath.row];
|
||||
cell.hotRoomInfo = info;
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setHotAnchorList:(NSArray *)hotAnchorList {
|
||||
_hotAnchorList = hotAnchorList;
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
- (UICollectionView *)collectionView{
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||
layout.minimumLineSpacing = 8;
|
||||
layout.minimumInteritemSpacing = 0;
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
[_collectionView registerClass:[XPHomeHotRoomCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPHomeHotRoomCollectionViewCell class])];
|
||||
}
|
||||
return _collectionView;
|
||||
}
|
||||
|
||||
@end
|
27
xplan-ios/Main/Home/View/Cell/XPHomeMenuTableViewCell.h
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// XPHomeMenuTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class HomeMenuInfoModel, XPHomeMenuTableViewCell;
|
||||
|
||||
@protocol XPHomeMenuTableViewCellDelegate <NSObject>
|
||||
|
||||
///点击了某个菜单
|
||||
- (void)xPHomeMenuTableViewCell:(XPHomeMenuTableViewCell *)view didClickMenuInfo:(HomeMenuInfoModel *)info;
|
||||
|
||||
@end
|
||||
|
||||
@interface XPHomeMenuTableViewCell : UITableViewCell
|
||||
@property (nonatomic,strong) NSArray<HomeMenuInfoModel *> *menuList;
|
||||
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPHomeMenuTableViewCellDelegate> delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
135
xplan-ios/Main/Home/View/Cell/XPHomeMenuTableViewCell.m
Normal file
@@ -0,0 +1,135 @@
|
||||
//
|
||||
// XPHomeMenuTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
// 扩列交友 心动匹配 小游戏
|
||||
|
||||
#import "XPHomeMenuTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "NetImageView.h"
|
||||
#import "XPMacro.h"
|
||||
///Model
|
||||
#import "HomeMenuInfoModel.h"
|
||||
|
||||
@interface XPHomeMenuTableViewCell ()
|
||||
@property (nonatomic,strong) NetImageView *firstMenuView;
|
||||
@property (nonatomic,strong) NetImageView *secondMenuView;
|
||||
@property (nonatomic,strong) NetImageView *thirdMenuView;
|
||||
///自view的数组
|
||||
@property (nonatomic,strong) NSArray<NetImageView *> *menuViewList;
|
||||
@end
|
||||
|
||||
@implementation XPHomeMenuTableViewCell
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.firstMenuView];
|
||||
[self.contentView addSubview:self.secondMenuView];
|
||||
[self.contentView addSubview:self.thirdMenuView];
|
||||
self.menuViewList = @[self.firstMenuView, self.secondMenuView, self.thirdMenuView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
CGFloat width1 = (KScreenWidth - 30 - 8) * 176 / (176 + 82 + 80);
|
||||
CGFloat width2 = (KScreenWidth - 30 - 8) * 82 / (176 + 82 + 80);
|
||||
CGFloat width3 = (KScreenWidth - 30 - 8) * 80 / (176 + 82 + 80);
|
||||
[self.firstMenuView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(15);
|
||||
make.bottom.mas_equalTo(0);
|
||||
make.height.mas_equalTo(60);
|
||||
make.width.mas_equalTo(width1);
|
||||
}];
|
||||
[self.secondMenuView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.firstMenuView.mas_right).mas_offset(4);
|
||||
make.bottom.mas_equalTo(0);
|
||||
make.height.mas_equalTo(60);
|
||||
make.width.mas_equalTo(width2);
|
||||
}];
|
||||
[self.thirdMenuView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.secondMenuView.mas_right).mas_offset(4);
|
||||
make.bottom.mas_equalTo(0);
|
||||
make.height.mas_equalTo(60);
|
||||
make.width.mas_equalTo(width3);
|
||||
}];
|
||||
}
|
||||
#pragma mark - Event Response
|
||||
- (void)onTapMenuRecognizer:(UITapGestureRecognizer *)tap {
|
||||
UIView * view = [tap view];
|
||||
HomeMenuInfoModel * homeInfoModel = [self.menuList objectAtIndex:view.tag -1000];
|
||||
if (homeInfoModel && self.delegate && [self.delegate respondsToSelector:@selector(xPHomeMenuTableViewCell:didClickMenuInfo:)]) {
|
||||
[self.delegate xPHomeMenuTableViewCell:self didClickMenuInfo:homeInfoModel];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setMenuList:(NSArray *)menuList {
|
||||
_menuList = menuList;
|
||||
NSMutableArray * array = [_menuList mutableCopy];
|
||||
if (_menuList.count > 3) {
|
||||
_menuList = [array subarrayWithRange:NSMakeRange(0, 3)];
|
||||
}
|
||||
|
||||
for (int i = 0; i< _menuList.count; i++) {
|
||||
NetImageView * imageView = [self.menuViewList objectAtIndex:i];
|
||||
HomeMenuInfoModel * menuInfoModel = [_menuList objectAtIndex:i];
|
||||
imageView.imageUrl = menuInfoModel.icon;
|
||||
}
|
||||
}
|
||||
|
||||
- (NetImageView *)firstMenuView {
|
||||
if (!_firstMenuView) {
|
||||
_firstMenuView = [[NetImageView alloc] init];
|
||||
_firstMenuView.userInteractionEnabled = YES;
|
||||
_firstMenuView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_firstMenuView.layer.masksToBounds = YES;
|
||||
_firstMenuView.tag = 1000;
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTapMenuRecognizer:)];
|
||||
[_firstMenuView addGestureRecognizer:tap];
|
||||
}
|
||||
return _firstMenuView;
|
||||
}
|
||||
|
||||
- (NetImageView *)secondMenuView {
|
||||
if (!_secondMenuView) {
|
||||
_secondMenuView = [[NetImageView alloc] init];
|
||||
_secondMenuView.userInteractionEnabled = YES;
|
||||
_secondMenuView.image = [UIImage imageNamed:@"home_recommend_icon"];
|
||||
_secondMenuView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_secondMenuView.layer.masksToBounds = YES;
|
||||
_secondMenuView.tag = 1001;
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTapMenuRecognizer:)];
|
||||
[_secondMenuView addGestureRecognizer:tap];
|
||||
}
|
||||
return _secondMenuView;
|
||||
}
|
||||
|
||||
- (NetImageView *)thirdMenuView {
|
||||
if (!_thirdMenuView) {
|
||||
_thirdMenuView = [[NetImageView alloc] init];
|
||||
_thirdMenuView.userInteractionEnabled = YES;
|
||||
_thirdMenuView.image = [UIImage imageNamed:@"home_recommend_icon"];
|
||||
_thirdMenuView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_thirdMenuView.layer.masksToBounds = YES;
|
||||
_thirdMenuView.tag = 1002;
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTapMenuRecognizer:)];
|
||||
[_thirdMenuView addGestureRecognizer:tap];
|
||||
}
|
||||
return _thirdMenuView;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPHomeRecommendCollectionViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class HomeRecommendRoomModel;
|
||||
@interface XPHomeRecommendCollectionViewCell : UICollectionViewCell
|
||||
@property (nonatomic,strong, nullable) HomeRecommendRoomModel *recommendRoomInfo;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,170 @@
|
||||
//
|
||||
// XPHomeRecommendCollectionViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import "XPHomeRecommendCollectionViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor+Home.h"
|
||||
#import "NetImageView.h"
|
||||
///Model
|
||||
#import "HomeRecommendRoomModel.h"
|
||||
|
||||
@interface XPHomeRecommendCollectionViewCell ()
|
||||
///背景
|
||||
@property (nonatomic,strong) UIView * backView;
|
||||
///头像
|
||||
@property (nonatomic,strong) NetImageView *avatarImageView;
|
||||
///容器
|
||||
@property (nonatomic,strong) UIView * personContainerView;
|
||||
///显示🔥
|
||||
@property (nonatomic,strong) UIImageView *hotImageView;
|
||||
///显示在线人数
|
||||
@property (nonatomic,strong) UILabel *numberLabel;
|
||||
///显示名字
|
||||
@property (nonatomic,strong) UILabel *nickLabel;
|
||||
@end
|
||||
|
||||
@implementation XPHomeRecommendCollectionViewCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self.contentView addSubview:self.backView];
|
||||
|
||||
[self.backView addSubview:self.avatarImageView];
|
||||
[self.backView addSubview:self.personContainerView];
|
||||
[self.backView addSubview:self.nickLabel];
|
||||
|
||||
[self.personContainerView addSubview:self.hotImageView];
|
||||
[self.personContainerView addSubview:self.numberLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.backView);
|
||||
make.height.mas_equalTo(self.avatarImageView.mas_width);
|
||||
}];
|
||||
|
||||
[self.personContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.backView).offset(6);
|
||||
make.height.mas_equalTo(16);
|
||||
make.bottom.mas_equalTo(self.avatarImageView.mas_bottom).offset(-3);
|
||||
make.right.mas_equalTo(self.numberLabel.mas_right).offset(3);
|
||||
}];
|
||||
|
||||
[self.hotImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(13, 13));
|
||||
make.left.mas_equalTo(self.personContainerView).offset(3);
|
||||
make.centerY.mas_equalTo(self.personContainerView);
|
||||
}];
|
||||
|
||||
[self.numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.hotImageView.mas_right).offset(2);
|
||||
make.centerY.mas_equalTo(self.personContainerView);
|
||||
}];
|
||||
|
||||
[self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.backView).offset(3);
|
||||
make.right.mas_equalTo(self.backView);
|
||||
make.height.mas_equalTo(22);
|
||||
make.top.mas_equalTo(self.avatarImageView.mas_bottom);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setRecommendRoomInfo:(HomeRecommendRoomModel *)recommendRoomInfo {
|
||||
_recommendRoomInfo = recommendRoomInfo;
|
||||
if (_recommendRoomInfo) {
|
||||
self.avatarImageView.imageUrl = _recommendRoomInfo.avatar;
|
||||
self.numberLabel.text = [NSString stringWithFormat:@"%ld", _recommendRoomInfo.onlineNum];
|
||||
self.nickLabel.text = _recommendRoomInfo.title;
|
||||
self.personContainerView.hidden = NO;
|
||||
} else {
|
||||
self.avatarImageView.image = [UIImage imageNamed:@"home_recommend_room_placeholder"];
|
||||
self.nickLabel.text = @"虚位以待";
|
||||
self.personContainerView.hidden = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (UIView *)backView {
|
||||
if (!_backView) {
|
||||
_backView = [[UIView alloc] init];
|
||||
_backView.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
_backView.layer.masksToBounds = YES;
|
||||
_backView.layer.cornerRadius = 8;
|
||||
_backView.layer.shadowColor = UIColorRGBAlpha(0xE5E5F2, 0.34).CGColor;
|
||||
_backView.layer.shadowOffset = CGSizeMake(5, 5);
|
||||
}
|
||||
return _backView;
|
||||
}
|
||||
|
||||
|
||||
- (NetImageView *)avatarImageView {
|
||||
if (!_avatarImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc]init];
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_avatarImageView.layer.masksToBounds = YES;
|
||||
_avatarImageView.layer.cornerRadius = 8;
|
||||
}
|
||||
return _avatarImageView;
|
||||
}
|
||||
|
||||
- (UIView *)personContainerView {
|
||||
if (!_personContainerView) {
|
||||
_personContainerView = [[UIView alloc] init];
|
||||
_personContainerView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.2];
|
||||
_personContainerView.layer.masksToBounds = YES;
|
||||
_personContainerView.layer.cornerRadius = 8;
|
||||
}
|
||||
return _personContainerView;
|
||||
}
|
||||
|
||||
- (UIImageView *)hotImageView {
|
||||
if (!_hotImageView) {
|
||||
_hotImageView = [[UIImageView alloc] init];
|
||||
_hotImageView.userInteractionEnabled = YES;
|
||||
_hotImageView.image = [UIImage imageNamed:@"home_recommend_hot"];
|
||||
}
|
||||
return _hotImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)nickLabel {
|
||||
if (!_nickLabel) {
|
||||
_nickLabel = [[UILabel alloc] init];
|
||||
_nickLabel.font = [UIFont systemFontOfSize:12];
|
||||
_nickLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _nickLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)numberLabel {
|
||||
if (!_numberLabel) {
|
||||
_numberLabel = [[UILabel alloc] init];
|
||||
_numberLabel.font = [UIFont systemFontOfSize:12];
|
||||
_numberLabel.textColor = [UIColor whiteColor];
|
||||
}
|
||||
return _numberLabel;
|
||||
}
|
||||
|
||||
@end
|
16
xplan-ios/Main/Home/View/Cell/XPHomeRecommendTableViewCell.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPHomeRecommendTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPHomeRecommendTableViewCell : UITableViewCell
|
||||
@property (nonatomic,strong) NSArray *recommendList;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
90
xplan-ios/Main/Home/View/Cell/XPHomeRecommendTableViewCell.m
Normal file
@@ -0,0 +1,90 @@
|
||||
//
|
||||
// XPHomeRecommendTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
// 最新推荐
|
||||
|
||||
#import "XPHomeRecommendTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "XPMacro.h"
|
||||
///View
|
||||
#import "XPHomeRecommendCollectionViewCell.h"
|
||||
|
||||
@interface XPHomeRecommendTableViewCell ()<UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
|
||||
///列表
|
||||
@property (nonatomic,strong) UICollectionView *collectionView;
|
||||
@end
|
||||
|
||||
@implementation XPHomeRecommendTableViewCell
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.collectionView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.contentView).inset(15);
|
||||
make.top.bottom.mas_equalTo(self.contentView);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegate And UICollectionViewDatasource
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
CGFloat itemWidth = (CGFloat)(KScreenWidth - 15 * 2 - 8 * 2 - 4) / (CGFloat)3;
|
||||
return CGSizeMake(itemWidth, itemWidth+ 22);
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return 6;
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPHomeRecommendCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeRecommendCollectionViewCell class]) forIndexPath:indexPath];
|
||||
if (indexPath.row <= (self.recommendList.count -1)) {
|
||||
HomeRecommendRoomModel * info = [self.recommendList objectAtIndex:indexPath.row];
|
||||
cell.recommendRoomInfo = info;
|
||||
} else {
|
||||
cell.recommendRoomInfo = nil;
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setRecommendList:(NSArray *)recommendList {
|
||||
_recommendList = recommendList;
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
- (UICollectionView *)collectionView{
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.minimumLineSpacing = 16;
|
||||
layout.minimumInteritemSpacing = 8;
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
[_collectionView registerClass:[XPHomeRecommendCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPHomeRecommendCollectionViewCell class])];
|
||||
}
|
||||
return _collectionView;
|
||||
}
|
||||
|
||||
@end
|
@@ -6,14 +6,14 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import <JXCategoryView/JXCategoryView.h>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class XPHomeNavView;
|
||||
@protocol XPHomeNavViewDelegate <NSObject>
|
||||
|
||||
///点击了搜索按钮
|
||||
- (void)xPHomeNavView:(XPHomeNavView *)view didClickSearch:(UIButton *)sender;
|
||||
- (void)xPHomeNavViewDidClickSearch:(XPHomeNavView *)view;
|
||||
|
||||
///点击了榜单按钮
|
||||
- (void)xPHomeNavView:(XPHomeNavView *)view didClickRank:(UIButton *)sender;
|
||||
@@ -21,7 +21,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@interface XPHomeNavView : UIView
|
||||
|
||||
///滑块
|
||||
@property (nonatomic, strong, readonly) JXCategoryTitleView *titleView;
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPHomeNavViewDelegate> delegate;
|
||||
|
||||
|
@@ -8,18 +8,19 @@
|
||||
#import "XPHomeNavView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
|
||||
///Tool
|
||||
#import "ThemeColor+Home.h"
|
||||
#import "XPMacro.h"
|
||||
#import "UIImage+Utils.h"
|
||||
|
||||
@interface XPHomeNavView ()
|
||||
///搜索按钮
|
||||
@property (nonatomic,strong) UIButton *searchButton;
|
||||
///标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
@interface XPHomeNavView ()<UITextFieldDelegate>
|
||||
///排行榜
|
||||
@property (nonatomic,strong) UIButton *rankButton;
|
||||
///搜索框
|
||||
@property (nonatomic,strong) UITextField *searchTextField;
|
||||
///滑块
|
||||
@property (nonatomic,strong) JXCategoryTitleView *titleView;
|
||||
@end
|
||||
|
||||
@implementation XPHomeNavView
|
||||
@@ -37,35 +38,42 @@
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self addSubview:self.searchButton];
|
||||
[self addSubview:self.titleLabel];
|
||||
[self addSubview:self.titleView];
|
||||
[self addSubview:self.searchTextField];
|
||||
[self addSubview:self.rankButton];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self).offset(statusbarHeight);
|
||||
make.height.mas_equalTo(44);
|
||||
make.left.right.mas_equalTo(self);
|
||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self).offset(12);
|
||||
make.height.mas_equalTo(40);
|
||||
make.centerY.mas_equalTo(self.searchTextField);
|
||||
make.width.mas_equalTo(150);
|
||||
}];
|
||||
|
||||
[self.searchButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(22, 22));
|
||||
make.left.mas_equalTo(14);
|
||||
make.centerY.mas_equalTo(self.titleLabel);
|
||||
[self.searchTextField mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.titleView.mas_right).offset(2);
|
||||
make.right.mas_equalTo(self.rankButton.mas_left).offset(-10);
|
||||
make.height.mas_equalTo(30);
|
||||
make.top.mas_equalTo(statusbarHeight + 14);
|
||||
}];
|
||||
|
||||
[self.rankButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(22, 22));
|
||||
make.right.mas_equalTo(-14);
|
||||
make.centerY.mas_equalTo(self.titleLabel);
|
||||
make.centerY.mas_equalTo(self.searchTextField);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UITextFieldDelegate
|
||||
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
|
||||
return NO;
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)searchButtonAction:(UIButton *)sender {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeNavView:didClickSearch:)]) {
|
||||
[self.delegate xPHomeNavView:self didClickSearch:sender];
|
||||
- (void)didTapTextFieldRecognizer {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeNavViewDidClickSearch:)]) {
|
||||
[self.delegate xPHomeNavViewDidClickSearch:self];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,25 +84,30 @@
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UIButton *)searchButton {
|
||||
if (!_searchButton) {
|
||||
_searchButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_searchButton setImage:[UIImage imageNamed:@"home_search"] forState:UIControlStateNormal];
|
||||
[_searchButton setImage:[UIImage imageNamed:@"home_search"] forState:UIControlStateSelected];
|
||||
[_searchButton addTarget:self action:@selector(searchButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
- (UITextField *)searchTextField {
|
||||
if (!_searchTextField) {
|
||||
_searchTextField = [[UITextField alloc] init];
|
||||
_searchTextField.layer.cornerRadius = 15;
|
||||
_searchTextField.layer.masksToBounds = YES;
|
||||
_searchTextField.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
_searchTextField.font = [UIFont systemFontOfSize:13];
|
||||
_searchTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"搜索昵称或ID" attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:13], NSForegroundColorAttributeName : [ThemeColor textThirdColor]}];
|
||||
UIImageView *searchIcon = [[UIImageView alloc] init];
|
||||
searchIcon.image = [UIImage imageNamed:@"home_search_input_search"];
|
||||
searchIcon.frame = CGRectMake(11, 7, 16, 16);
|
||||
searchIcon.contentMode = UIViewContentModeCenter;
|
||||
UIView *searchIconView = [[UIView alloc] init];
|
||||
[searchIconView addSubview:searchIcon];
|
||||
searchIconView.frame = CGRectMake(0, 0, 34, 30);
|
||||
_searchTextField.leftView = searchIconView;
|
||||
_searchTextField.leftViewMode = UITextFieldViewModeAlways;
|
||||
_searchTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
|
||||
_searchTextField.returnKeyType = UIReturnKeySearch;
|
||||
_searchTextField.enablesReturnKeyAutomatically = YES;
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapTextFieldRecognizer)];
|
||||
[_searchTextField addGestureRecognizer:tap];
|
||||
}
|
||||
return _searchButton;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.text = AppName;
|
||||
_titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Bold" size:20];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _titleLabel;
|
||||
return _searchTextField;
|
||||
}
|
||||
|
||||
- (UIButton *)rankButton {
|
||||
@@ -106,4 +119,29 @@
|
||||
}
|
||||
return _rankButton;
|
||||
}
|
||||
|
||||
- (JXCategoryTitleView *)titleView {
|
||||
if (!_titleView) {
|
||||
_titleView = [[JXCategoryTitleView alloc] initWithFrame:CGRectZero];
|
||||
_titleView.backgroundColor =[UIColor clearColor];
|
||||
_titleView.titleColor = UIColorFromRGB(0x444444);
|
||||
_titleView.titleSelectedColor = [ThemeColor mainTextColor];
|
||||
_titleView.titleFont = [UIFont systemFontOfSize:20 weight:UIFontWeightSemibold];
|
||||
_titleView.titleSelectedFont = [UIFont systemFontOfSize:24 weight:UIFontWeightHeavy];
|
||||
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
|
||||
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
|
||||
_titleView.averageCellSpacingEnabled = NO;
|
||||
_titleView.defaultSelectedIndex = 0;
|
||||
_titleView.cellSpacing = 20;
|
||||
|
||||
JXCategoryIndicatorImageView *lineView = [[JXCategoryIndicatorImageView alloc] init];
|
||||
lineView.indicatorWidth = 48;
|
||||
lineView.indicatorHeight = 12;
|
||||
lineView.indicatorCornerRadius = 7;
|
||||
lineView.verticalMargin = 5;
|
||||
lineView.indicatorImageView.image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xFFD15A), UIColorFromRGB(0xFFC000)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(48, 12)];
|
||||
_titleView.indicators = @[lineView];
|
||||
}
|
||||
return _titleView;
|
||||
}
|
||||
@end
|
||||
|
16
xplan-ios/Main/Home/View/SubViews/XPHomeRecommendHeadView.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPHomeRecommendHeadView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPHomeRecommendHeadView : UIView
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
38
xplan-ios/Main/Home/View/SubViews/XPHomeRecommendHeadView.m
Normal file
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// XPHomeRecommendHeadView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import "XPHomeRecommendHeadView.h"
|
||||
|
||||
@interface XPHomeRecommendHeadView ()
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
@end
|
||||
|
||||
@implementation XPHomeRecommendHeadView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self= [super initWithFrame:frame]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
|
||||
|
||||
|
||||
@end
|
22
xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// XPHomeSectionView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPHomeSectionView : UIView
|
||||
///显示标题
|
||||
@property (nonatomic,copy) NSString *title;
|
||||
///显示图片的名称
|
||||
@property (nonatomic,copy) NSString *imageName;
|
||||
///是否隐藏logo
|
||||
@property (nonatomic,assign) BOOL isHiddenLogo;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
148
xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.m
Normal file
@@ -0,0 +1,148 @@
|
||||
//
|
||||
// XPHomeSectionView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import "XPHomeSectionView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor+Home.h"
|
||||
|
||||
@interface XPHomeSectionView ()
|
||||
///标志的容器
|
||||
@property (nonatomic,strong) UIStackView *logoStackView;
|
||||
///显示图片
|
||||
@property (nonatomic,strong) UIImageView *logoImageView;
|
||||
///显示标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///更多的容器
|
||||
@property (nonatomic,strong) UIStackView *moreStackView;
|
||||
///更多
|
||||
@property (nonatomic,strong) UILabel *moreLabel;
|
||||
///箭头
|
||||
@property (nonatomic,strong) UIImageView *arrowImageView;
|
||||
@end
|
||||
|
||||
@implementation XPHomeSectionView
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.logoStackView];
|
||||
[self addSubview:self.moreStackView];
|
||||
|
||||
[self.logoStackView addArrangedSubview:self.logoImageView];
|
||||
[self.logoStackView addArrangedSubview:self.titleLabel];
|
||||
[self.moreStackView addArrangedSubview:self.moreLabel];
|
||||
[self.moreStackView addArrangedSubview:self.arrowImageView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.logoStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self).offset(15);
|
||||
make.centerY.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
[self.logoImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(20, 20));
|
||||
}];
|
||||
|
||||
[self.moreStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self).offset(-15);
|
||||
make.centerY.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
[self.arrowImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(6, 10));
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setImageName:(NSString *)imageName {
|
||||
_imageName = imageName;
|
||||
if (_imageName.length > 0) {
|
||||
self.logoImageView.image = [UIImage imageNamed:_imageName];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setTitle:(NSString *)title {
|
||||
_title = title;
|
||||
if (_title.length > 0) {
|
||||
self.titleLabel.text = _title;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setIsHiddenLogo:(BOOL)isHiddenLogo {
|
||||
_isHiddenLogo = isHiddenLogo;
|
||||
self.logoImageView.hidden = isHiddenLogo;
|
||||
}
|
||||
|
||||
- (UIStackView *)logoStackView {
|
||||
if (!_logoStackView) {
|
||||
_logoStackView = [[UIStackView alloc] init];
|
||||
_logoStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_logoStackView.distribution = UIStackViewDistributionFill;
|
||||
_logoStackView.alignment = UIStackViewAlignmentCenter;
|
||||
_logoStackView.spacing = 2;
|
||||
}
|
||||
return _logoStackView;
|
||||
}
|
||||
|
||||
- (UIStackView *)moreStackView {
|
||||
if (!_moreStackView) {
|
||||
_moreStackView = [[UIStackView alloc] init];
|
||||
_moreStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_moreStackView.distribution = UIStackViewDistributionFill;
|
||||
_moreStackView.alignment = UIStackViewAlignmentCenter;
|
||||
_moreStackView.spacing = 2;
|
||||
}
|
||||
return _moreStackView;
|
||||
}
|
||||
|
||||
- (UILabel *)moreLabel {
|
||||
if (!_moreLabel) {
|
||||
_moreLabel = [[UILabel alloc] init];
|
||||
_moreLabel.text = @"更多";
|
||||
_moreLabel.font = [UIFont systemFontOfSize:12];
|
||||
_moreLabel.textColor = [ThemeColor textThirdColor];
|
||||
}
|
||||
return _moreLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)arrowImageView {
|
||||
if (!_arrowImageView) {
|
||||
_arrowImageView = [[UIImageView alloc] init];
|
||||
_arrowImageView.userInteractionEnabled = YES;
|
||||
_arrowImageView.image = [UIImage imageNamed:@"home_recommend_room_more"];
|
||||
}
|
||||
return _arrowImageView;
|
||||
}
|
||||
|
||||
- (UIImageView *)logoImageView {
|
||||
if (!_logoImageView) {
|
||||
_logoImageView = [[UIImageView alloc] init];
|
||||
}
|
||||
return _logoImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -6,10 +6,10 @@
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPHomeContainerViewController : MvpViewController
|
||||
@interface XPHomePartyContainerViewController : MvpViewController<JXCategoryListContentViewDelegate>
|
||||
|
||||
@end
|
||||
|
@@ -5,7 +5,7 @@
|
||||
// Created by 冯硕 on 2021/12/2.
|
||||
//
|
||||
|
||||
#import "XPHomeContainerViewController.h"
|
||||
#import "XPHomePartyContainerViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <JXCategoryView/JXCategoryView.h>
|
||||
@@ -17,22 +17,15 @@
|
||||
///Model
|
||||
#import "HomeTagModel.h"
|
||||
///View
|
||||
#import "XPHomeNavView.h"
|
||||
#import "XPRoomSearchContainerViewController.h"
|
||||
#import "XPHomeViewController.h"
|
||||
#import "XPHomePartyViewController.h"
|
||||
#import "XPWebViewController.h"
|
||||
///P
|
||||
#import "XPHomeContainerPresenter.h"
|
||||
#import "XPHomeContainerProtocol.h"
|
||||
|
||||
|
||||
@interface XPHomeContainerViewController ()<JXCategoryViewDelegate, JXCategoryListContainerViewDelegate, XPHomeContainerProtocol,XPHomeNavViewDelegate>
|
||||
///背景
|
||||
@property (nonatomic,strong) UIImageView *backImageView;
|
||||
///导航栏
|
||||
@property (nonatomic,strong) XPHomeNavView *navView;
|
||||
///背景图
|
||||
@property (nonatomic,strong) UIView * backView;
|
||||
@interface XPHomePartyContainerViewController ()<JXCategoryViewDelegate, JXCategoryListContainerViewDelegate, XPHomeContainerProtocol>
|
||||
///分页标题
|
||||
@property (nonatomic, strong) NSArray<NSString *> *titles;
|
||||
///分页控件
|
||||
@@ -42,10 +35,10 @@
|
||||
///tag的列表
|
||||
@property (nonatomic,copy) NSArray<HomeTagModel *> *tagList;
|
||||
///刷新的话 会重新走一次init的方法
|
||||
@property (nonatomic, strong) NSMutableDictionary <NSString *, XPHomeViewController<JXCategoryListContentViewDelegate> *> *listCache;
|
||||
@property (nonatomic, strong) NSMutableDictionary <NSString *, XPHomePartyViewController<JXCategoryListContentViewDelegate> *> *listCache;
|
||||
@end
|
||||
|
||||
@implementation XPHomeContainerViewController
|
||||
@implementation XPHomePartyContainerViewController
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
@@ -63,37 +56,20 @@
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.backImageView];
|
||||
[self.view addSubview:self.navView];
|
||||
[self.view addSubview:self.backView];
|
||||
[self.backView addSubview:self.titleView];
|
||||
[self.backView addSubview:self.contentView];
|
||||
self.view.backgroundColor = [UIColor clearColor];
|
||||
[self.view addSubview:self.titleView];
|
||||
[self.view addSubview:self.contentView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.top.right.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(336);
|
||||
}];
|
||||
|
||||
[self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(kNavigationHeight + 10);
|
||||
}];
|
||||
|
||||
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.navView.mas_bottom).offset(-10);
|
||||
}];
|
||||
|
||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.backView);
|
||||
make.left.right.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(50);
|
||||
}];
|
||||
|
||||
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.titleView.mas_bottom).offset(10);
|
||||
make.left.right.bottom.mas_equalTo(self.backView);
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -108,11 +84,11 @@
|
||||
|
||||
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
|
||||
HomeTagModel * hometag = [self.tagList objectAtIndex:index];
|
||||
XPHomeViewController<JXCategoryListContentViewDelegate> * list = _listCache[hometag.tid];
|
||||
XPHomePartyViewController<JXCategoryListContentViewDelegate> * list = _listCache[hometag.tid];
|
||||
if (list) {
|
||||
return list;
|
||||
} else {
|
||||
XPHomeViewController * homeVC = [[XPHomeViewController alloc] init];
|
||||
XPHomePartyViewController * homeVC = [[XPHomePartyViewController alloc] init];
|
||||
homeVC.tabId = hometag.tid;
|
||||
//①自己缓存已经初始化的列表
|
||||
_listCache[hometag.tid] = homeVC;
|
||||
@@ -122,10 +98,15 @@
|
||||
|
||||
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
|
||||
HomeTagModel * hometag = [self.tagList objectAtIndex:index];
|
||||
XPHomeViewController<JXCategoryListContentViewDelegate> * list = _listCache[hometag.tid];
|
||||
XPHomePartyViewController<JXCategoryListContentViewDelegate> * list = _listCache[hometag.tid];
|
||||
list.tabId = hometag.tid;
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryListContentViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
}
|
||||
|
||||
#pragma mark - XPHomeContainerProtocol
|
||||
- (void)getHomeTagListSuccess:(NSArray<HomeTagModel *> *)array {
|
||||
self.tagList = array;
|
||||
@@ -140,25 +121,13 @@
|
||||
[self.titleView reloadData];
|
||||
}
|
||||
|
||||
#pragma mark - XPHoneNavViewDelegate
|
||||
- (void)xPHomeNavView:(XPHomeNavView *)view didClickSearch:(UIButton *)sender {
|
||||
XPRoomSearchContainerViewController * searchVC = [[XPRoomSearchContainerViewController alloc] init];
|
||||
searchVC.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
[self.navigationController presentViewController:searchVC animated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)xPHomeNavView:(XPHomeNavView *)view didClickRank:(UIButton *)sender {
|
||||
XPWebViewController * webVC =[[XPWebViewController alloc] init];
|
||||
webVC.url = URLWithType(kHomeRankURL);
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
|
||||
#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 = [ThemeColor secondTextColor];
|
||||
_titleView.titleSelectedColor = [ThemeColor mainTextColor];
|
||||
_titleView.titleFont = [UIFont fontWithName:@"PingFang-SC-Medium" size:13];
|
||||
@@ -178,32 +147,4 @@
|
||||
}
|
||||
return _contentView;
|
||||
}
|
||||
|
||||
- (UIView *)backView {
|
||||
if (!_backView) {
|
||||
_backView = [[UIView alloc] init];
|
||||
_backView.backgroundColor = [ThemeColor appBackgroundColor];
|
||||
_backView.layer.masksToBounds = YES;
|
||||
_backView.layer.cornerRadius = 15;
|
||||
}
|
||||
return _backView;
|
||||
}
|
||||
- (XPHomeNavView *)navView {
|
||||
if (!_navView) {
|
||||
_navView = [[XPHomeNavView alloc] init];
|
||||
_navView.delegate = self;
|
||||
}
|
||||
return _navView;
|
||||
}
|
||||
|
||||
- (UIImageView *)backImageView {
|
||||
if (!_backImageView) {
|
||||
_backImageView = [[UIImageView alloc] init];
|
||||
_backImageView.userInteractionEnabled = YES;
|
||||
_backImageView.image = [UIImage imageNamed:@"home_nav_background"];
|
||||
}
|
||||
return _backImageView;
|
||||
}
|
||||
|
||||
|
||||
@end
|
18
xplan-ios/Main/Home/View/XPHomePartyViewController.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// XPHomeViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@interface XPHomePartyViewController : MvpViewController<JXCategoryListContentViewDelegate>
|
||||
///模块的 ID
|
||||
@property (nonatomic,copy) NSString *tabId;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
180
xplan-ios/Main/Home/View/XPHomePartyViewController.m
Normal file
@@ -0,0 +1,180 @@
|
||||
//
|
||||
// XPHomeViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "XPHomePartyViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
///Tool
|
||||
#import "XPMacro.h"
|
||||
#import "ThemeColor.h"
|
||||
///Model
|
||||
#import "HomeRecommendRoomModel.h"
|
||||
///View
|
||||
#import "XPHomeListCollectionViewCell.h"
|
||||
#import "XPHomeListEmptyCollectionViewCell.h"
|
||||
///P
|
||||
#import "XPHomePresenter.h"
|
||||
#import "XPHomeProtocol.h"
|
||||
///VC
|
||||
#import "XPRoomViewController.h"
|
||||
|
||||
@interface XPHomePartyViewController ()<UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, XPHomeProtocol>
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSMutableArray *datasource;
|
||||
///列表
|
||||
@property (nonatomic,strong) UICollectionView *collectionView;
|
||||
///当前的页数
|
||||
@property (nonatomic,assign) int page;
|
||||
///没有新的数据了
|
||||
@property (nonatomic,assign) BOOL hasNoMoreData;
|
||||
@end
|
||||
|
||||
@implementation XPHomePartyViewController
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (XPHomePresenter *)createPresenter {
|
||||
return [[XPHomePresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initHeaderAndFooterRrfresh];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.view.backgroundColor = [UIColor clearColor];
|
||||
[self.view addSubview:self.collectionView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (void)initHeaderAndFooterRrfresh {
|
||||
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(headerRefresh)];
|
||||
header.stateLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
header.lastUpdatedTimeLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
header.stateLabel.textColor = [ThemeColor secondTextColor];
|
||||
header.lastUpdatedTimeLabel.textColor = [ThemeColor secondTextColor];
|
||||
self.collectionView.mj_header = header;
|
||||
|
||||
MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(footerRefresh)];
|
||||
footer.stateLabel.textColor = [ThemeColor secondTextColor];
|
||||
footer.stateLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
self.collectionView.mj_footer = footer;
|
||||
}
|
||||
|
||||
#pragma mark - 刷新的fangfa
|
||||
- (void)headerRefresh {
|
||||
self.page = 1;
|
||||
[self.presenter getRecommendRoomList:self.tabId page:self.page pageSize:20 state:NO];
|
||||
}
|
||||
|
||||
- (void)footerRefresh {
|
||||
if (self.hasNoMoreData) {
|
||||
[self showErrorToast:@"没有更多房间了"];
|
||||
return;
|
||||
}
|
||||
self.page++;
|
||||
[self.presenter getRecommendRoomList:self.tabId page:self.page pageSize:20 state:YES];
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDataSource
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.datasource.count > 0 ? self.datasource.count : 1;
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count > 0) {
|
||||
XPHomeListCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeListCollectionViewCell class]) forIndexPath:indexPath];
|
||||
HomeRecommendRoomModel * model = [self.datasource objectAtIndex:indexPath.item];
|
||||
cell.roomModel = model;
|
||||
return cell;
|
||||
}
|
||||
|
||||
XPHomeListEmptyCollectionViewCell * emptyCell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeListEmptyCollectionViewCell class]) forIndexPath:indexPath];
|
||||
return emptyCell;
|
||||
|
||||
}
|
||||
#pragma mark - UICollectionViewDelegate
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
|
||||
if (self.datasource.count > 0) {
|
||||
HomeRecommendRoomModel * model = [self.datasource objectAtIndex:indexPath.item];
|
||||
[XPRoomViewController openRoom:model.roomUid viewController:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count <= 0) {
|
||||
return CGSizeMake(KScreenWidth, KScreenHeight- kNavigationHeight - 49 - 20);
|
||||
}
|
||||
return CGSizeMake((KScreenWidth - 15 * 3) / 2, 157 + 36);
|
||||
}
|
||||
#pragma mark - XPHomeProtocol
|
||||
- (void)getHomeRecommendRoomListSuccess:(NSArray *)list state:(BOOL)state {
|
||||
if (state == 0) {
|
||||
[self.datasource removeAllObjects];
|
||||
[self.collectionView.mj_header endRefreshing];
|
||||
} else {
|
||||
[self.collectionView.mj_footer endRefreshing];
|
||||
}
|
||||
if (list.count > 0) {
|
||||
self.hasNoMoreData = NO;
|
||||
[self.datasource addObjectsFromArray:list];
|
||||
} else {
|
||||
self.hasNoMoreData = YES;
|
||||
[self.collectionView.mj_footer endRefreshingWithNoMoreData];
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
#pragma mark - JXCategoryListContentViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setTabId:(NSString *)tabId {
|
||||
_tabId = tabId;
|
||||
[self headerRefresh];
|
||||
}
|
||||
|
||||
|
||||
- (UICollectionView *)collectionView{
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
|
||||
layout.minimumLineSpacing = 0;
|
||||
layout.minimumInteritemSpacing = 15;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 15);
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
[_collectionView registerClass:[XPHomeListCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPHomeListCollectionViewCell class])];
|
||||
[_collectionView registerClass:[XPHomeListEmptyCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPHomeListEmptyCollectionViewCell class])];
|
||||
}
|
||||
return _collectionView;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)datasource {
|
||||
if (!_datasource) {
|
||||
_datasource = [NSMutableArray array];
|
||||
}
|
||||
return _datasource;
|
||||
}
|
||||
|
||||
|
||||
@end
|
16
xplan-ios/Main/Home/View/XPHomeRecommendViewController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPHomeRecommendViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPHomeRecommendViewController : MvpViewController<JXCategoryListContentViewDelegate>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
249
xplan-ios/Main/Home/View/XPHomeRecommendViewController.m
Normal file
@@ -0,0 +1,249 @@
|
||||
//
|
||||
// XPHomeRecommendViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import "XPHomeRecommendViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "XPMacro.h"
|
||||
///View
|
||||
#import "XPHomeBannerTableViewCell.h"
|
||||
#import "XPHomeMenuTableViewCell.h"
|
||||
#import "XPHomeRecommendTableViewCell.h"
|
||||
#import "XPHomeHotRoomTableViewCell.h"
|
||||
#import "XPHomeSectionView.h"
|
||||
///Model
|
||||
#import "HomeMenuInfoModel.h"
|
||||
#import "HomeBannerInfoModel.h"
|
||||
#import "HomeRecommendRoomModel.h"
|
||||
///P
|
||||
#import "XPHomeRecommendPresenter.h"
|
||||
#import "XPHomeRecommendProtocol.h"
|
||||
///VC
|
||||
#import "XPWebViewController.h"
|
||||
#import "XPRoomViewController.h"
|
||||
@interface XPHomeRecommendViewController ()<UITableViewDelegate, UITableViewDataSource, XPHomeRecommendProtocol, XPHomeMenuTableViewCellDelegate, XPHomeBannerTableViewCellDelegate>
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///菜单列表
|
||||
@property (nonatomic,strong) NSArray<HomeMenuInfoModel *> *menuList;
|
||||
///轮播图
|
||||
@property (nonatomic,strong) NSArray<HomeBannerInfoModel *> *bannerList;
|
||||
///推荐房
|
||||
@property (nonatomic,strong) NSArray<HomeRecommendRoomModel *> *recommendList;
|
||||
///热门房
|
||||
@property (nonatomic,strong) NSArray<HomeRecommendRoomModel *> *hotRoomList;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPHomeRecommendViewController
|
||||
- (XPHomeRecommendPresenter *)createPresenter {
|
||||
return [[XPHomeRecommendPresenter alloc] init];
|
||||
}
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initHttpRequest];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
#pragma mark - InitHttp
|
||||
- (void)initHttpRequest {
|
||||
[self.presenter getHomeTopBannerList];
|
||||
[self.presenter getHomeMenuList];
|
||||
[self.presenter getHomeRecommendRoomList];
|
||||
[self.presenter getHomeHotRoomList];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.view.backgroundColor = [UIColor clearColor];
|
||||
[self.view addSubview:self.tableView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return 4;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
if (section == 0) {
|
||||
return self.bannerList.count >0 ? 1 : 0;
|
||||
} else if(section == 1) {
|
||||
return self.menuList.count > 0 ? 1 : 0;
|
||||
} else if(section == 2) {
|
||||
return self.recommendList.count > 0 ? 1 : 0;
|
||||
} else if(section == 3) {
|
||||
return self.hotRoomList.count > 0 ? 1 : 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.section == 0) {
|
||||
return 140;
|
||||
} else if(indexPath.section == 1) {
|
||||
return 60;
|
||||
} else if(indexPath.section == 2) {
|
||||
CGFloat itemHeight = (CGFloat)(KScreenWidth - 15 * 2 - 8 * 2 - 4) / (CGFloat)3 + 22;
|
||||
return itemHeight * 2 + 16;
|
||||
} else if(indexPath.section == 3) {
|
||||
return 96;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
|
||||
if (section == 2) {
|
||||
return self.recommendList.count > 0 ? 38 : 0;
|
||||
} else if(section == 3) {
|
||||
return self.hotRoomList.count > 0 ? 38 : 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
|
||||
if (section == 2) {
|
||||
XPHomeSectionView * sectionView = [[XPHomeSectionView alloc] init];
|
||||
sectionView.frame = CGRectMake(0, 0, KScreenWidth, 38);
|
||||
sectionView.imageName = @"home_recommend_section_logo";
|
||||
sectionView.title = @"最新推荐";
|
||||
return sectionView;
|
||||
} else if (section == 3) {
|
||||
XPHomeSectionView * sectionView = [[XPHomeSectionView alloc] init];
|
||||
sectionView.frame = CGRectMake(0, 0, KScreenWidth, 38);
|
||||
sectionView.isHiddenLogo = YES;
|
||||
sectionView.title = @"人气主播";
|
||||
return sectionView;
|
||||
}
|
||||
return [UIView new];
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.section == 0) {
|
||||
XPHomeBannerTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPHomeBannerTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPHomeBannerTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPHomeBannerTableViewCell class])];
|
||||
}
|
||||
cell.delegate = self;
|
||||
cell.bannerList = self.bannerList;
|
||||
return cell;
|
||||
} else if(indexPath.section == 1) {
|
||||
XPHomeMenuTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPHomeMenuTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPHomeMenuTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPHomeMenuTableViewCell class])];
|
||||
}
|
||||
cell.delegate = self;
|
||||
cell.menuList = self.menuList;
|
||||
return cell;
|
||||
} else if(indexPath.section == 2) {
|
||||
XPHomeRecommendTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPHomeRecommendTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPHomeRecommendTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPHomeRecommendTableViewCell class])];
|
||||
}
|
||||
cell.recommendList = self.recommendList;
|
||||
return cell;
|
||||
} else {
|
||||
XPHomeHotRoomTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPHomeHotRoomTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPHomeHotRoomTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPHomeHotRoomTableViewCell class])];
|
||||
}
|
||||
cell.hotAnchorList = self.hotRoomList;
|
||||
return cell;
|
||||
}
|
||||
}
|
||||
#pragma mark - XPHomeRecommendProtocol
|
||||
- (void)getHomeMenuListSuccess:(NSArray *)list {
|
||||
self.menuList = list;
|
||||
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationNone];
|
||||
}
|
||||
|
||||
- (void)getHomeTopBannerListSuccess:(NSArray *)list {
|
||||
self.bannerList = list;
|
||||
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationNone];
|
||||
}
|
||||
|
||||
- (void)getHomeRecommendRoomListSuccess:(NSArray *)list {
|
||||
self.recommendList = list;
|
||||
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:2] withRowAnimation:UITableViewRowAnimationNone];
|
||||
|
||||
[self getHomeHotRoomListSuccess:list];
|
||||
}
|
||||
|
||||
- (void)getHomeHotRoomListSuccess:(NSArray *)list {
|
||||
self.hotRoomList = list;
|
||||
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:3] withRowAnimation:UITableViewRowAnimationNone];
|
||||
}
|
||||
|
||||
#pragma mark - XPHomeMenuTableViewCellDelegate
|
||||
- (void)xPHomeMenuTableViewCell:(XPHomeMenuTableViewCell *)view didClickMenuInfo:(HomeMenuInfoModel *)info {
|
||||
if (info.resourceType == HomeMenuResourceType_H5) {
|
||||
XPWebViewController * webVC = [[ XPWebViewController alloc] init];
|
||||
webVC.url = info.resourceContent;
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
} else {
|
||||
if (info.hid.length > 0) {
|
||||
[XPRoomViewController openRoom:info.hid viewController:self];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - XPHomeBannerTableViewCellDelegate
|
||||
- (void)xPHomeBannerTableViewCell:(XPHomeBannerTableViewCell *)view didClickBanner:(HomeBannerInfoModel *)info {
|
||||
switch (info.skipType) {
|
||||
case HomeBannerInfoSkipType_Room:
|
||||
{
|
||||
if (info.skipUri.length > 0) {
|
||||
[XPRoomViewController openRoom:info.skipUri viewController:self];
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HomeBannerInfoSkipType_Web:
|
||||
{
|
||||
XPWebViewController *vc = [[XPWebViewController alloc]init];
|
||||
vc.url = info.skipUri;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryListContentViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.tableFooterView = [UIView new];
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
[_tableView registerClass:[XPHomeBannerTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPHomeBannerTableViewCell class])];
|
||||
[_tableView registerClass:[XPHomeMenuTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPHomeMenuTableViewCell class])];
|
||||
[_tableView registerClass:[XPHomeRecommendTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPHomeRecommendTableViewCell class])];
|
||||
[_tableView registerClass:[XPHomeHotRoomTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPHomeHotRoomTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
@end
|
@@ -2,17 +2,15 @@
|
||||
// XPHomeViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
#import "BaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPHomeViewController : BaseViewController
|
||||
|
||||
@interface XPHomeViewController : MvpViewController<JXCategoryListContentViewDelegate>
|
||||
///模块的 ID
|
||||
@property (nonatomic,copy) NSString *tabId;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -2,36 +2,32 @@
|
||||
// XPHomeViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
// Created by 冯硕 on 2022/2/21.
|
||||
//
|
||||
|
||||
#import "XPHomeViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
///Tool
|
||||
#import "ThemeColor+Home.h"
|
||||
#import "XPMacro.h"
|
||||
#import "ThemeColor.h"
|
||||
///Model
|
||||
#import "HomeRecommendRoomModel.h"
|
||||
#import "XPHtmlURL.h"
|
||||
///View
|
||||
#import "XPHomeListCollectionViewCell.h"
|
||||
#import "XPHomeListEmptyCollectionViewCell.h"
|
||||
///P
|
||||
#import "XPHomePresenter.h"
|
||||
#import "XPHomeProtocol.h"
|
||||
///VC
|
||||
#import "XPRoomViewController.h"
|
||||
#import "XPHomeNavView.h"
|
||||
#import "XPHomeRecommendViewController.h"
|
||||
#import "XPRoomSearchContainerViewController.h"
|
||||
#import "XPHomePartyContainerViewController.h"
|
||||
#import "XPWebViewController.h"
|
||||
|
||||
@interface XPHomeViewController ()<UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, XPHomeProtocol>
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSMutableArray *datasource;
|
||||
///列表
|
||||
@property (nonatomic,strong) UICollectionView *collectionView;
|
||||
///当前的页数
|
||||
@property (nonatomic,assign) int page;
|
||||
///没有新的数据了
|
||||
@property (nonatomic,assign) BOOL hasNoMoreData;
|
||||
@interface XPHomeViewController ()<XPHomeNavViewDelegate, JXCategoryViewDelegate,JXCategoryListContainerViewDelegate>
|
||||
///标题
|
||||
@property (nonatomic,strong) NSArray<NSString *> *titles;
|
||||
@property (nonatomic, strong) JXCategoryListContainerView *listContainerView;
|
||||
///背景
|
||||
@property (nonatomic,strong) UIImageView *topBackImageView;
|
||||
///导航栏
|
||||
@property (nonatomic,strong) XPHomeNavView *homeNavView;
|
||||
@end
|
||||
|
||||
@implementation XPHomeViewController
|
||||
@@ -40,141 +36,101 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (XPHomePresenter *)createPresenter {
|
||||
return [[XPHomePresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initHeaderAndFooterRrfresh];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.view.backgroundColor = [UIColor clearColor];
|
||||
[self.view addSubview:self.collectionView];
|
||||
[self.view addSubview:self.topBackImageView];
|
||||
[self.view addSubview:self.homeNavView];
|
||||
[self.view addSubview:self.listContainerView];
|
||||
|
||||
self.homeNavView.titleView.titles = self.titles;
|
||||
self.homeNavView.titleView.delegate = self;
|
||||
self.homeNavView.titleView.listContainer = self.listContainerView;
|
||||
[self.homeNavView.titleView reloadData];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
[self.topBackImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.top.right.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(336);
|
||||
}];
|
||||
|
||||
[self.homeNavView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(kNavigationHeight);
|
||||
}];
|
||||
|
||||
[self.listContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.homeNavView.mas_bottom);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (void)initHeaderAndFooterRrfresh {
|
||||
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(headerRefresh)];
|
||||
header.stateLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
header.lastUpdatedTimeLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
header.stateLabel.textColor = [ThemeColor secondTextColor];
|
||||
header.lastUpdatedTimeLabel.textColor = [ThemeColor secondTextColor];
|
||||
self.collectionView.mj_header = header;
|
||||
|
||||
MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(footerRefresh)];
|
||||
footer.stateLabel.textColor = [ThemeColor secondTextColor];
|
||||
footer.stateLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
self.collectionView.mj_footer = footer;
|
||||
#pragma mark - JXCategoryListContainerViewDelegate
|
||||
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView {
|
||||
return self.titles.count;
|
||||
}
|
||||
|
||||
#pragma mark - 刷新的fangfa
|
||||
- (void)headerRefresh {
|
||||
self.page = 1;
|
||||
[self.presenter getRecommendRoomList:self.tabId page:self.page pageSize:20 state:NO];
|
||||
// 根据下标 index 返回对应遵守并实现 `JXCategoryListContentViewDelegate` 协议的列表实例
|
||||
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
|
||||
if (index == 0) {
|
||||
return [[XPHomeRecommendViewController alloc] init];
|
||||
}else if (index == 1) {
|
||||
return [[XPHomePartyContainerViewController alloc] init];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)footerRefresh {
|
||||
if (self.hasNoMoreData) {
|
||||
[self showErrorToast:@"没有更多房间了"];
|
||||
return;
|
||||
}
|
||||
self.page++;
|
||||
[self.presenter getRecommendRoomList:self.tabId page:self.page pageSize:20 state:YES];
|
||||
#pragma mark - XPHoneNavViewDelegate
|
||||
- (void)xPHomeNavViewDidClickSearch:(XPHomeNavView *)view {
|
||||
XPRoomSearchContainerViewController * searchVC = [[XPRoomSearchContainerViewController alloc] init];
|
||||
searchVC.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
[self.navigationController presentViewController:searchVC animated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDataSource
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.datasource.count > 0 ? self.datasource.count : 1;
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count > 0) {
|
||||
XPHomeListCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeListCollectionViewCell class]) forIndexPath:indexPath];
|
||||
HomeRecommendRoomModel * model = [self.datasource objectAtIndex:indexPath.item];
|
||||
cell.roomModel = model;
|
||||
return cell;
|
||||
}
|
||||
|
||||
XPHomeListEmptyCollectionViewCell * emptyCell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeListEmptyCollectionViewCell class]) forIndexPath:indexPath];
|
||||
return emptyCell;
|
||||
|
||||
}
|
||||
#pragma mark - UICollectionViewDelegate
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
|
||||
if (self.datasource.count > 0) {
|
||||
HomeRecommendRoomModel * model = [self.datasource objectAtIndex:indexPath.item];
|
||||
[XPRoomViewController openRoom:model.roomUid viewController:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count <= 0) {
|
||||
return CGSizeMake(KScreenWidth, KScreenHeight- kNavigationHeight - 49 - 20);
|
||||
}
|
||||
return CGSizeMake((KScreenWidth - 15 * 3) / 2, 157 + 36);
|
||||
}
|
||||
#pragma mark - XPHomeProtocol
|
||||
- (void)getHomeRecommendRoomListSuccess:(NSArray *)list state:(BOOL)state {
|
||||
if (state == 0) {
|
||||
[self.datasource removeAllObjects];
|
||||
[self.collectionView.mj_header endRefreshing];
|
||||
} else {
|
||||
[self.collectionView.mj_footer endRefreshing];
|
||||
}
|
||||
if (list.count > 0) {
|
||||
self.hasNoMoreData = NO;
|
||||
[self.datasource addObjectsFromArray:list];
|
||||
} else {
|
||||
self.hasNoMoreData = YES;
|
||||
[self.collectionView.mj_footer endRefreshingWithNoMoreData];
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
#pragma mark - JXCategoryListContentViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
- (void)xPHomeNavView:(XPHomeNavView *)view didClickRank:(UIButton *)sender {
|
||||
XPWebViewController * webVC =[[XPWebViewController alloc] init];
|
||||
webVC.url = URLWithType(kHomeRankURL);
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setTabId:(NSString *)tabId {
|
||||
_tabId = tabId;
|
||||
[self headerRefresh];
|
||||
}
|
||||
|
||||
|
||||
- (UICollectionView *)collectionView{
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
|
||||
layout.minimumLineSpacing = 0;
|
||||
layout.minimumInteritemSpacing = 15;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 15);
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
[_collectionView registerClass:[XPHomeListCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPHomeListCollectionViewCell class])];
|
||||
[_collectionView registerClass:[XPHomeListEmptyCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPHomeListEmptyCollectionViewCell class])];
|
||||
- (JXCategoryListContainerView *)listContainerView {
|
||||
if (!_listContainerView) {
|
||||
_listContainerView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
|
||||
}
|
||||
return _collectionView;
|
||||
return _listContainerView;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)datasource {
|
||||
if (!_datasource) {
|
||||
_datasource = [NSMutableArray array];
|
||||
- (XPHomeNavView *)homeNavView {
|
||||
if (!_homeNavView) {
|
||||
_homeNavView = [[XPHomeNavView alloc] init];
|
||||
_homeNavView.delegate = self;
|
||||
}
|
||||
return _datasource;
|
||||
return _homeNavView;
|
||||
}
|
||||
|
||||
- (UIImageView *)topBackImageView {
|
||||
if (!_topBackImageView) {
|
||||
_topBackImageView = [[UIImageView alloc] init];
|
||||
_topBackImageView.userInteractionEnabled = YES;
|
||||
_topBackImageView.image = [UIImage imageNamed:@"home_nav_background"];
|
||||
}
|
||||
return _topBackImageView;
|
||||
}
|
||||
|
||||
- (NSArray<NSString *> *)titles {
|
||||
if (!_titles) {
|
||||
_titles = @[@"推荐",@"派对"];
|
||||
}
|
||||
return _titles;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
@@ -34,7 +34,7 @@
|
||||
#import "XplanFBFlutterViewContainer.h"
|
||||
#import "XPMineViewController.h"
|
||||
#import "SessionListViewController.h"
|
||||
#import "XPHomeContainerViewController.h"
|
||||
#import "XPHomeViewController.h"
|
||||
#import "XPMiniRoomView.h"
|
||||
#import "XPTeenagerAlertView.h"
|
||||
#import "XPRoomViewController.h"
|
||||
@@ -221,7 +221,7 @@
|
||||
msg = [[SessionListViewController alloc] init];
|
||||
me = [[XPMineViewController alloc] init];
|
||||
|
||||
home = [[XPHomeContainerViewController alloc] init];
|
||||
home = [[XPHomeViewController alloc] init];
|
||||
} else {
|
||||
game = [[BaseViewController alloc]init];
|
||||
msg = [[SessionListViewController alloc]init];
|
||||
|