商店包的首页和搜索
This commit is contained in:
2
Podfile
2
Podfile
@@ -39,6 +39,8 @@ target 'xplan-ios' do
|
||||
pod 'pop', '~> 1.0.12'
|
||||
#云信
|
||||
pod 'NIMSDK_LITE', '~> 7.8.3'
|
||||
#下拉刷新控件
|
||||
pod 'MJRefresh'
|
||||
#登录的
|
||||
pod 'mob_sharesdk'
|
||||
pod 'mob_sharesdk/ShareSDKPlatforms/QQ'
|
||||
|
@@ -25,6 +25,7 @@ PODS:
|
||||
- Masonry (1.1.0)
|
||||
- MBProgressHUD (1.2.0)
|
||||
- MJExtension (3.3.0)
|
||||
- MJRefresh (3.7.3)
|
||||
- mob_sharesdk (4.4.2):
|
||||
- mob_sharesdk/ShareSDK (= 4.4.2)
|
||||
- MOBFoundation (>= 3.2.9)
|
||||
@@ -80,6 +81,7 @@ DEPENDENCIES:
|
||||
- Masonry
|
||||
- MBProgressHUD
|
||||
- MJExtension
|
||||
- MJRefresh
|
||||
- mob_sharesdk
|
||||
- mob_sharesdk/ShareSDKExtension
|
||||
- mob_sharesdk/ShareSDKPlatforms/Apple
|
||||
@@ -111,6 +113,7 @@ SPEC REPOS:
|
||||
- Masonry
|
||||
- MBProgressHUD
|
||||
- MJExtension
|
||||
- MJRefresh
|
||||
- mob_sharesdk
|
||||
- MOBFoundation
|
||||
- NIMSDK_LITE
|
||||
@@ -140,6 +143,7 @@ SPEC CHECKSUMS:
|
||||
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
|
||||
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
|
||||
MJExtension: 01704cca2b60a214c10761b6491eab74069d68a9
|
||||
MJRefresh: ec9c53ff4abf3a9237b4283862f1bd51c2ee3fdb
|
||||
mob_sharesdk: a60006891a079486ff3269ed326adfa05a967c01
|
||||
MOBFoundation: efdc3ce6b843fbc10ae8c1c6122a02b0d845b39b
|
||||
NIMSDK_LITE: 8e28ae0a26dd1dccc4684b697381f0a72a733f51
|
||||
@@ -156,6 +160,6 @@ SPEC CHECKSUMS:
|
||||
SZTextView: 094dc6acc9beec537685c545d6e3e0d4975174e1
|
||||
YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
|
||||
|
||||
PODFILE CHECKSUM: e8e216a3e86155b1d25433a4eb105e33395eca92
|
||||
PODFILE CHECKSUM: be98ba24f735681ec9750b82d85fa2944ec76e44
|
||||
|
||||
COCOAPODS: 1.10.1
|
||||
|
@@ -258,6 +258,19 @@
|
||||
E8B846D826FDE17300A777FE /* XPMineRechargeProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E8B846D726FDE16300A777FE /* XPMineRechargeProtocol.h */; };
|
||||
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 */; };
|
||||
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 */; };
|
||||
E8C6FFD72754BC61004DC9F0 /* XPHoneNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFD62754BC61004DC9F0 /* XPHoneNavView.m */; };
|
||||
E8C6FFDA2754BE81004DC9F0 /* ThemeColor+Home.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFD92754BE81004DC9F0 /* ThemeColor+Home.m */; };
|
||||
E8C6FFDD2754CF5D004DC9F0 /* HomeRecommendRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFDC2754CF5D004DC9F0 /* HomeRecommendRoomModel.m */; };
|
||||
E8C6FFE02754EEF9004DC9F0 /* XPHomeSearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFDF2754EEF9004DC9F0 /* XPHomeSearchViewController.m */; };
|
||||
E8C6FFE32754F349004DC9F0 /* XPSearchListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFE22754F349004DC9F0 /* XPSearchListTableViewCell.m */; };
|
||||
E8C6FFE62754FE53004DC9F0 /* XPHomeSearchPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFE52754FE53004DC9F0 /* XPHomeSearchPresenter.m */; };
|
||||
E8C6FFEA2755040B004DC9F0 /* XPHomeSearchNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFE92755040B004DC9F0 /* XPHomeSearchNavView.m */; };
|
||||
E8C6FFED27550CC2004DC9F0 /* HomeSearchResultModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFEC27550CC2004DC9F0 /* HomeSearchResultModel.m */; };
|
||||
E8CEA03D26EA3DE500644B44 /* LoginPasswordPresent.m in Sources */ = {isa = PBXBuildFile; fileRef = E8CEA03C26EA3DE500644B44 /* LoginPasswordPresent.m */; };
|
||||
E8E70D7726F2F15100F03460 /* XPMineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E70D7626F2F15100F03460 /* XPMineViewController.m */; };
|
||||
E8E70D7A26F2F16600F03460 /* XPMinePresent.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E70D7926F2F16600F03460 /* XPMinePresent.m */; };
|
||||
@@ -783,6 +796,34 @@
|
||||
E8B846DB26FDE24300A777FE /* RechargeListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RechargeListModel.m; sourceTree = "<group>"; };
|
||||
E8C214FF274B76F60079E6BF /* XPRoomAnimationHitView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomAnimationHitView.h; sourceTree = "<group>"; };
|
||||
E8C21500274B76F60079E6BF /* XPRoomAnimationHitView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomAnimationHitView.m; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
E8C6FFCF27548256004DC9F0 /* XPHomeListCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeListCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
E8C6FFD22754AA87004DC9F0 /* XPNoteView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNoteView.h; sourceTree = "<group>"; };
|
||||
E8C6FFD32754AA87004DC9F0 /* XPNoteView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNoteView.m; sourceTree = "<group>"; };
|
||||
E8C6FFD52754BC61004DC9F0 /* XPHoneNavView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHoneNavView.h; sourceTree = "<group>"; };
|
||||
E8C6FFD62754BC61004DC9F0 /* XPHoneNavView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHoneNavView.m; sourceTree = "<group>"; };
|
||||
E8C6FFD82754BE81004DC9F0 /* ThemeColor+Home.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ThemeColor+Home.h"; sourceTree = "<group>"; };
|
||||
E8C6FFD92754BE81004DC9F0 /* ThemeColor+Home.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "ThemeColor+Home.m"; sourceTree = "<group>"; };
|
||||
E8C6FFDB2754CF5D004DC9F0 /* HomeRecommendRoomModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeRecommendRoomModel.h; sourceTree = "<group>"; };
|
||||
E8C6FFDC2754CF5D004DC9F0 /* HomeRecommendRoomModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeRecommendRoomModel.m; sourceTree = "<group>"; };
|
||||
E8C6FFDE2754EEF9004DC9F0 /* XPHomeSearchViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeSearchViewController.h; sourceTree = "<group>"; };
|
||||
E8C6FFDF2754EEF9004DC9F0 /* XPHomeSearchViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeSearchViewController.m; sourceTree = "<group>"; };
|
||||
E8C6FFE12754F349004DC9F0 /* XPSearchListTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSearchListTableViewCell.h; sourceTree = "<group>"; };
|
||||
E8C6FFE22754F349004DC9F0 /* XPSearchListTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSearchListTableViewCell.m; sourceTree = "<group>"; };
|
||||
E8C6FFE42754FE53004DC9F0 /* XPHomeSearchPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeSearchPresenter.h; sourceTree = "<group>"; };
|
||||
E8C6FFE52754FE53004DC9F0 /* XPHomeSearchPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeSearchPresenter.m; sourceTree = "<group>"; };
|
||||
E8C6FFE72754FE66004DC9F0 /* XPHomeSearchProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeSearchProtocol.h; sourceTree = "<group>"; };
|
||||
E8C6FFE82755040B004DC9F0 /* XPHomeSearchNavView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeSearchNavView.h; sourceTree = "<group>"; };
|
||||
E8C6FFE92755040B004DC9F0 /* XPHomeSearchNavView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeSearchNavView.m; sourceTree = "<group>"; };
|
||||
E8C6FFEB27550CC2004DC9F0 /* HomeSearchResultModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeSearchResultModel.h; sourceTree = "<group>"; };
|
||||
E8C6FFEC27550CC2004DC9F0 /* HomeSearchResultModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeSearchResultModel.m; sourceTree = "<group>"; };
|
||||
E8CEA03B26EA3DE500644B44 /* LoginPasswordPresent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginPasswordPresent.h; sourceTree = "<group>"; };
|
||||
E8CEA03C26EA3DE500644B44 /* LoginPasswordPresent.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginPasswordPresent.m; sourceTree = "<group>"; };
|
||||
E8CEA03E26EA3E0200644B44 /* LoginPasswordProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginPasswordProtocol.h; sourceTree = "<group>"; };
|
||||
@@ -1142,6 +1183,7 @@
|
||||
189DD56126DE45F800AB55B1 /* Main */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E8C6FFBD27548120004DC9F0 /* Home */,
|
||||
E8E7DAED27451E4600C631CC /* ModuleKit */,
|
||||
E884C3732743B66400E1EBED /* IM */,
|
||||
18486210271EA9A5005FC5DC /* RTC */,
|
||||
@@ -2138,6 +2180,97 @@
|
||||
path = Recharge;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E8C6FFBD27548120004DC9F0 /* Home */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E8C6FFC327548120004DC9F0 /* Model */,
|
||||
E8C6FFC727548120004DC9F0 /* Api */,
|
||||
E8C6FFC427548120004DC9F0 /* View */,
|
||||
E8C6FFBE27548120004DC9F0 /* Presenter */,
|
||||
E8C6FFC127548120004DC9F0 /* Protocol */,
|
||||
E8C6FFD82754BE81004DC9F0 /* ThemeColor+Home.h */,
|
||||
E8C6FFD92754BE81004DC9F0 /* ThemeColor+Home.m */,
|
||||
);
|
||||
path = Home;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E8C6FFBE27548120004DC9F0 /* Presenter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E8C6FFBF27548120004DC9F0 /* XPHomePresenter.h */,
|
||||
E8C6FFC027548120004DC9F0 /* XPHomePresenter.m */,
|
||||
E8C6FFE42754FE53004DC9F0 /* XPHomeSearchPresenter.h */,
|
||||
E8C6FFE52754FE53004DC9F0 /* XPHomeSearchPresenter.m */,
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E8C6FFC127548120004DC9F0 /* Protocol */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E8C6FFC227548120004DC9F0 /* XPHomeProtocol.h */,
|
||||
E8C6FFE72754FE66004DC9F0 /* XPHomeSearchProtocol.h */,
|
||||
);
|
||||
path = Protocol;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E8C6FFC327548120004DC9F0 /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E8C6FFDB2754CF5D004DC9F0 /* HomeRecommendRoomModel.h */,
|
||||
E8C6FFDC2754CF5D004DC9F0 /* HomeRecommendRoomModel.m */,
|
||||
E8C6FFEB27550CC2004DC9F0 /* HomeSearchResultModel.h */,
|
||||
E8C6FFEC27550CC2004DC9F0 /* HomeSearchResultModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E8C6FFC427548120004DC9F0 /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E8C6FFCD27548154004DC9F0 /* Cell */,
|
||||
E8C6FFD12754AA6A004DC9F0 /* SubViews */,
|
||||
E8C6FFC627548120004DC9F0 /* XPHomeViewController.h */,
|
||||
E8C6FFC527548120004DC9F0 /* XPHomeViewController.m */,
|
||||
E8C6FFDE2754EEF9004DC9F0 /* XPHomeSearchViewController.h */,
|
||||
E8C6FFDF2754EEF9004DC9F0 /* XPHomeSearchViewController.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E8C6FFC727548120004DC9F0 /* Api */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E8C6FFC927548120004DC9F0 /* Api+Home.h */,
|
||||
E8C6FFC827548120004DC9F0 /* Api+Home.m */,
|
||||
);
|
||||
path = Api;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E8C6FFCD27548154004DC9F0 /* Cell */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E8C6FFCE27548256004DC9F0 /* XPHomeListCollectionViewCell.h */,
|
||||
E8C6FFCF27548256004DC9F0 /* XPHomeListCollectionViewCell.m */,
|
||||
E8C6FFE12754F349004DC9F0 /* XPSearchListTableViewCell.h */,
|
||||
E8C6FFE22754F349004DC9F0 /* XPSearchListTableViewCell.m */,
|
||||
);
|
||||
path = Cell;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E8C6FFD12754AA6A004DC9F0 /* SubViews */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E8C6FFD22754AA87004DC9F0 /* XPNoteView.h */,
|
||||
E8C6FFD32754AA87004DC9F0 /* XPNoteView.m */,
|
||||
E8C6FFD52754BC61004DC9F0 /* XPHoneNavView.h */,
|
||||
E8C6FFD62754BC61004DC9F0 /* XPHoneNavView.m */,
|
||||
E8C6FFE82755040B004DC9F0 /* XPHomeSearchNavView.h */,
|
||||
E8C6FFE92755040B004DC9F0 /* XPHomeSearchNavView.m */,
|
||||
);
|
||||
path = SubViews;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E8E70D6E26F2EB1200F03460 /* Mine */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -2492,6 +2625,7 @@
|
||||
E824545C26F5EEBA00BE8163 /* XPMineVerifIdentityPresenter.m in Sources */,
|
||||
E8AC723726F49982007D6E91 /* XPMineNotificaProtocol.h in Sources */,
|
||||
E89D60BD271D647A001F8895 /* XPRoomPresenter.m in Sources */,
|
||||
E8C6FFD72754BC61004DC9F0 /* XPHoneNavView.m in Sources */,
|
||||
E8AC723226F49710007D6E91 /* XPMineNotificationTableViewCell.m in Sources */,
|
||||
E8AC722926F488DA007D6E91 /* XPMineFeedbackProtocol.h in Sources */,
|
||||
E8AC721E26F472BF007D6E91 /* XPMineSettingProtocol.h in Sources */,
|
||||
@@ -2503,6 +2637,7 @@
|
||||
E81C27A226EF23490031E639 /* XPEnum.h in Sources */,
|
||||
E88B5CB526FB20B800DA9178 /* XPMineTeenagerPwdView.m in Sources */,
|
||||
E81C279826EB3AC40031E639 /* LoginForgetPasswordProtocol.h in Sources */,
|
||||
E8C6FFD42754AA87004DC9F0 /* XPNoteView.m in Sources */,
|
||||
E82325F9274E2E42003A3332 /* Api+UserCard.m in Sources */,
|
||||
E82109B026F1D83500FC3319 /* LoginBindPhonePresent.m in Sources */,
|
||||
E865963F27015A9C00846EBD /* XPMineUserTableView.m in Sources */,
|
||||
@@ -2565,6 +2700,7 @@
|
||||
E8AC721326F46ADD007D6E91 /* XPMineSettingViewController.m in Sources */,
|
||||
18E7B32126F098650064BC9B /* UserInfoSkillVo.m in Sources */,
|
||||
E8AC722726F482A4007D6E91 /* XPMineFeedbackPresenter.m in Sources */,
|
||||
E8C6FFCC27548120004DC9F0 /* Api+Home.m in Sources */,
|
||||
186A534E26FC6ED900D67B2C /* TTPopupService.m in Sources */,
|
||||
18A61BD7274F7F6900A09A54 /* NetImageConfig.m in Sources */,
|
||||
E8C21501274B76F60079E6BF /* XPRoomAnimationHitView.m in Sources */,
|
||||
@@ -2579,6 +2715,7 @@
|
||||
18486235271EB794005FC5DC /* AgoraRtcImpl.m in Sources */,
|
||||
184862CE27213FD7005FC5DC /* ZegoRtcImpl.m in Sources */,
|
||||
9B0E1C5926E77022005D4442 /* BaseNavigationController.m in Sources */,
|
||||
E8C6FFD027548256004DC9F0 /* XPHomeListCollectionViewCell.m in Sources */,
|
||||
E8EEB8F426FC2050007C6EBA /* SDBrowserImageView.m in Sources */,
|
||||
E824544626F5934700BE8163 /* XPMinePayPwdPresenter.m in Sources */,
|
||||
189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */,
|
||||
@@ -2587,6 +2724,7 @@
|
||||
180806FB2729A354001FD836 /* ThemeColor+Room.m in Sources */,
|
||||
E82325F2274E2DE6003A3332 /* XPUserCardViewController.m in Sources */,
|
||||
E8E70D8626F2F55C00F03460 /* XPMineAccountView.m in Sources */,
|
||||
E8C6FFCA27548120004DC9F0 /* XPHomePresenter.m in Sources */,
|
||||
E878893C273A54C300BF1D57 /* Api+Gift.m in Sources */,
|
||||
E81C279026EB314D0031E639 /* LoginForgetEditView.m in Sources */,
|
||||
E8AC721026F43955007D6E91 /* UIImageConstant.m in Sources */,
|
||||
@@ -2614,11 +2752,15 @@
|
||||
E8B846D626FDE01B00A777FE /* XPMineRechargePresenter.m in Sources */,
|
||||
E8EEB91426FC7786007C6EBA /* XPMineUserInfoNickViewController.m in Sources */,
|
||||
18E7B31B26F0982E0064BC9B /* UserExpand.m in Sources */,
|
||||
E8C6FFE62754FE53004DC9F0 /* XPHomeSearchPresenter.m in Sources */,
|
||||
E824543526F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m in Sources */,
|
||||
E8C6FFCB27548120004DC9F0 /* XPHomeViewController.m in Sources */,
|
||||
E8680718271967B00024F48F /* MicroView.m in Sources */,
|
||||
E8B825CD26EA18C8009E8E9F /* ThemeColor.m in Sources */,
|
||||
E88B5CBD26FB3BDF00DA9178 /* XPTeenagerAlertView.m in Sources */,
|
||||
E8C6FFED27550CC2004DC9F0 /* HomeSearchResultModel.m in Sources */,
|
||||
E8AEAEF327141C7C0017FCE0 /* XPRoomMessageContainerView.m in Sources */,
|
||||
E8C6FFE02754EEF9004DC9F0 /* XPHomeSearchViewController.m in Sources */,
|
||||
E8AE427327153A3500BEEBB2 /* XPRoomActivityContainerView.m in Sources */,
|
||||
E86596432701611A00846EBD /* UIImage+ImageEffects.m in Sources */,
|
||||
18486217271EAB8C005FC5DC /* BaseRtcImpl.m in Sources */,
|
||||
@@ -2640,6 +2782,7 @@
|
||||
E824544B26F5BBB800BE8163 /* XPMineModifPayPwdViewController.m in Sources */,
|
||||
E8EEB8FE26FC2DF8007C6EBA /* XPMineUserInfoCustomNavView.m in Sources */,
|
||||
E88B5CAD26FB16A800DA9178 /* XPMineTeenagerDesView.m in Sources */,
|
||||
E8C6FFDA2754BE81004DC9F0 /* ThemeColor+Home.m in Sources */,
|
||||
E824545126F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m in Sources */,
|
||||
E8EEB90F26FC6AB8007C6EBA /* XPMineUserInfoEditPresenter.m in Sources */,
|
||||
E8AC723A26F49AAE007D6E91 /* XPMineNotifyStatus.m in Sources */,
|
||||
@@ -2670,6 +2813,7 @@
|
||||
187EEEDC26E89B32002833B2 /* BaseModel.m in Sources */,
|
||||
E81366FC26F0D2980076364C /* UIButton+EnlargeTouchArea.m in Sources */,
|
||||
E824546426F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.m in Sources */,
|
||||
E8C6FFE32754F349004DC9F0 /* XPSearchListTableViewCell.m in Sources */,
|
||||
E884C3722743AEDE00E1EBED /* CustomAttachmentDecoder.m in Sources */,
|
||||
18EE3FEE2750CE6D00A452BF /* NIMMessageUtils.m in Sources */,
|
||||
9B7D804A2753783D003DAC0C /* SessionViewController.m in Sources */,
|
||||
@@ -2696,10 +2840,12 @@
|
||||
E80487652717DDD9008595F2 /* XPRoomMenuItem.m in Sources */,
|
||||
189DD75026E21D9000AB55B1 /* GCDHelper.m in Sources */,
|
||||
E84B0E422727EE0A008818C6 /* XPRoomMessageHeaderView.m in Sources */,
|
||||
E8C6FFDD2754CF5D004DC9F0 /* HomeRecommendRoomModel.m in Sources */,
|
||||
E890BC10273D23F00007C46B /* GiftInfoModel.m in Sources */,
|
||||
186A534826FC6ED900D67B2C /* TTAlertButtonConfig.m in Sources */,
|
||||
E89D60BA271D643A001F8895 /* Api+Room.m in Sources */,
|
||||
E872308926E89BE000B90D4F /* LoginPhoneViewController.m in Sources */,
|
||||
E8C6FFEA2755040B004DC9F0 /* XPHomeSearchNavView.m in Sources */,
|
||||
18E7B29026EA0E6B0064BC9B /* FlutterBoost+Xplan.m in Sources */,
|
||||
E8B846DC26FDE24300A777FE /* RechargeListModel.m in Sources */,
|
||||
E884C36C2743951B00E1EBED /* GiftReceiveInfoModel.m in Sources */,
|
||||
|
6
xplan-ios/Assets.xcassets/Home/Contents.json
Normal file
6
xplan-ios/Assets.xcassets/Home/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
22
xplan-ios/Assets.xcassets/Home/home_room_list_note_bg.imageset/Contents.json
vendored
Normal file
22
xplan-ios/Assets.xcassets/Home/home_room_list_note_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_room_list_note_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_room_list_note_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Home/home_room_list_note_bg.imageset/home_room_list_note_bg@2x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Home/home_room_list_note_bg.imageset/home_room_list_note_bg@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 298 B |
BIN
xplan-ios/Assets.xcassets/Home/home_room_list_note_bg.imageset/home_room_list_note_bg@3x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Home/home_room_list_note_bg.imageset/home_room_list_note_bg@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 410 B |
22
xplan-ios/Assets.xcassets/Home/home_search.imageset/Contents.json
vendored
Normal file
22
xplan-ios/Assets.xcassets/Home/home_search.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_search@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_search@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Home/home_search.imageset/home_search@2x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Home/home_search.imageset/home_search@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 776 B |
BIN
xplan-ios/Assets.xcassets/Home/home_search.imageset/home_search@3x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Home/home_search.imageset/home_search@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
22
xplan-ios/Assets.xcassets/Home/home_search_white_back.imageset/Contents.json
vendored
Normal file
22
xplan-ios/Assets.xcassets/Home/home_search_white_back.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_search_white_back@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "home_search_white_back@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Home/home_search_white_back.imageset/home_search_white_back@2x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Home/home_search_white_back.imageset/home_search_white_back@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 213 B |
BIN
xplan-ios/Assets.xcassets/Home/home_search_white_back.imageset/home_search_white_back@3x.png
vendored
Normal file
BIN
xplan-ios/Assets.xcassets/Home/home_search_white_back.imageset/home_search_white_back@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 397 B |
40
xplan-ios/Main/Home/Api/Api+Home.h
Normal file
40
xplan-ios/Main/Home/Api/Api+Home.h
Normal file
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// Api+Home.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "Api.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface Api (Home)
|
||||
|
||||
/// 查看推荐列表
|
||||
/// @param complection 完成
|
||||
/// @param uid 用户的uid
|
||||
/// @param tabId tabid
|
||||
/// @param page 当前的页数
|
||||
/// @param pageSize 一页有多少个
|
||||
+ (void)getRecommendListComplection:(HttpRequestHelperCompletion)complection
|
||||
uid:(NSString *)uid
|
||||
tabId:(NSString *)tabId
|
||||
page:(NSString *)page
|
||||
pageSize:(NSString *)pageSize;
|
||||
|
||||
/// 搜索
|
||||
/// @param complection 完成
|
||||
/// @param key 关键字
|
||||
/// @param type 类型 1 房间 2 用户
|
||||
/// @param page 多少页
|
||||
/// @param pageSize 每页多少个
|
||||
+ (void)searchComplection:(HttpRequestHelperCompletion)complection
|
||||
key:(NSString *)key
|
||||
type:(NSString *)type
|
||||
page:(NSString *)page
|
||||
pageSize:(NSString *)pageSize;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
31
xplan-ios/Main/Home/Api/Api+Home.m
Normal file
31
xplan-ios/Main/Home/Api/Api+Home.m
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// Api+Home.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "Api+Home.h"
|
||||
|
||||
@implementation Api (Home)
|
||||
|
||||
/// 查看推荐列表
|
||||
/// @param complection 完成
|
||||
/// @param uid 用户的uid
|
||||
/// @param tabId tabid
|
||||
/// @param page 当前的页数
|
||||
/// @param pageSize 一页有多少个
|
||||
+ (void)getRecommendListComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid tabId:(NSString *)tabId page:(NSString *)page pageSize:(NSString *)pageSize {
|
||||
[self makeRequest:@"home/tab/map" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, tabId, page, pageSize, nil];
|
||||
}
|
||||
|
||||
/// 搜索
|
||||
/// @param complection 完成
|
||||
/// @param key 关键字
|
||||
/// @param type 类型 1 房间 2 用户
|
||||
/// @param page 多少页
|
||||
/// @param pageSize 每页多少个
|
||||
+ (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];
|
||||
}
|
||||
@end
|
27
xplan-ios/Main/Home/Model/HomeRecommendRoomModel.h
Normal file
27
xplan-ios/Main/Home/Model/HomeRecommendRoomModel.h
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// HomeRecommendRoomModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface HomeRecommendRoomModel : NSObject
|
||||
///头像
|
||||
@property (nonatomic,copy) NSString *avatar;
|
||||
///在线人数
|
||||
@property (nonatomic,assign) NSInteger onlineNum;
|
||||
///房主的uid
|
||||
@property (nonatomic,copy) NSString *roomUid;
|
||||
///房间的tag
|
||||
@property (nonatomic,copy) NSString *roomTag;
|
||||
///标题
|
||||
@property (nonatomic,copy) NSString *title;
|
||||
///tag的图片
|
||||
@property (nonatomic,copy) NSString *tagPict;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Home/Model/HomeRecommendRoomModel.m
Normal file
12
xplan-ios/Main/Home/Model/HomeRecommendRoomModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// HomeRecommendRoomModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "HomeRecommendRoomModel.h"
|
||||
|
||||
@implementation HomeRecommendRoomModel
|
||||
|
||||
@end
|
29
xplan-ios/Main/Home/Model/HomeSearchResultModel.h
Normal file
29
xplan-ios/Main/Home/Model/HomeSearchResultModel.h
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// HomeSearchResultModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface HomeSearchResultModel : NSObject
|
||||
///头像
|
||||
@property (nonatomic,copy) NSString *avatar;
|
||||
///在线人数
|
||||
@property (nonatomic,assign) NSInteger onlineNum;
|
||||
///房主的uid
|
||||
@property (nonatomic,copy) NSString *uid;
|
||||
///标题
|
||||
@property (nonatomic,copy) NSString *title;
|
||||
///erban
|
||||
@property (nonatomic,copy) NSString *erbanNo;
|
||||
///是否可用
|
||||
@property (nonatomic,assign) BOOL valid;
|
||||
///性别
|
||||
@property (nonatomic,assign) NSInteger gender;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Home/Model/HomeSearchResultModel.m
Normal file
12
xplan-ios/Main/Home/Model/HomeSearchResultModel.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// HomeSearchResultModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "HomeSearchResultModel.h"
|
||||
|
||||
@implementation HomeSearchResultModel
|
||||
|
||||
@end
|
22
xplan-ios/Main/Home/Presenter/XPHomePresenter.h
Normal file
22
xplan-ios/Main/Home/Presenter/XPHomePresenter.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// XPHomePresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPHomePresenter : BaseMvpPresenter
|
||||
|
||||
/// 请求首页
|
||||
/// @param tabId id
|
||||
/// @param page 当前的页数
|
||||
/// @param pageSize 一页有多少个
|
||||
- (void)getRecommendRoomList:(NSString *)tabId page:(int)page pageSize:(int)pageSize state:(BOOL)state;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
32
xplan-ios/Main/Home/Presenter/XPHomePresenter.m
Normal file
32
xplan-ios/Main/Home/Presenter/XPHomePresenter.m
Normal file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// XPHomePresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "XPHomePresenter.h"
|
||||
#import "Api+Home.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
///Model
|
||||
#import "HomeRecommendRoomModel.h"
|
||||
///P
|
||||
#import "XPHomeProtocol.h"
|
||||
@implementation XPHomePresenter
|
||||
|
||||
|
||||
/// 请求首页
|
||||
/// @param tabId id
|
||||
/// @param page 当前的页数
|
||||
/// @param pageSize 一页有多少个
|
||||
- (void)getRecommendRoomList:(NSString *)tabId page:(int)page pageSize:(int)pageSize state:(BOOL)state {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * pageStr = [NSString stringWithFormat:@"%d", page];
|
||||
NSString * pageSizeStr = [NSString stringWithFormat:@"%d", pageSize];
|
||||
[Api getRecommendListComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray * array = [HomeRecommendRoomModel modelsWithArray:data.data];
|
||||
[[self getView] getHomeRecommendRoomListSuccess:array state:state];
|
||||
}] uid:uid tabId:tabId page:pageStr pageSize:pageSizeStr];
|
||||
}
|
||||
|
||||
@end
|
18
xplan-ios/Main/Home/Presenter/XPHomeSearchPresenter.h
Normal file
18
xplan-ios/Main/Home/Presenter/XPHomeSearchPresenter.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// XPHomeSearchPresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPHomeSearchPresenter : BaseMvpPresenter
|
||||
|
||||
- (void)searchRoomList:(NSString *)key;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
22
xplan-ios/Main/Home/Presenter/XPHomeSearchPresenter.m
Normal file
22
xplan-ios/Main/Home/Presenter/XPHomeSearchPresenter.m
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// XPHomeSearchPresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "XPHomeSearchPresenter.h"
|
||||
#import "Api+Home.h"
|
||||
#import "XPHomeSearchProtocol.h"
|
||||
#import "HomeSearchResultModel.h"
|
||||
|
||||
@implementation XPHomeSearchPresenter
|
||||
|
||||
- (void)searchRoomList:(NSString *)key {
|
||||
[Api searchComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray * array = [HomeSearchResultModel modelsWithArray:data.data];
|
||||
[[self getView] searchRoomSuccess:array];
|
||||
}] key:key type:@"1" page:@"1" pageSize:@"50"];
|
||||
}
|
||||
|
||||
@end
|
18
xplan-ios/Main/Home/Protocol/XPHomeProtocol.h
Normal file
18
xplan-ios/Main/Home/Protocol/XPHomeProtocol.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// XPHomeProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol XPHomeProtocol <NSObject>
|
||||
///首页推荐房间的
|
||||
- (void)getHomeRecommendRoomListSuccess:(NSArray *)list state:(BOOL)state;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
19
xplan-ios/Main/Home/Protocol/XPHomeSearchProtocol.h
Normal file
19
xplan-ios/Main/Home/Protocol/XPHomeSearchProtocol.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// XPHomeSearchProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol XPHomeSearchProtocol <NSObject>
|
||||
|
||||
///搜索房间成功
|
||||
- (void)searchRoomSuccess:(NSArray *)data;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
19
xplan-ios/Main/Home/ThemeColor+Home.h
Normal file
19
xplan-ios/Main/Home/ThemeColor+Home.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// ThemeColor+Home.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "ThemeColor.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ThemeColor (Home)
|
||||
/// 首页顶部渐变色的开始 #462893
|
||||
+ (UIColor *)homeNavGradientStart;
|
||||
/// 首页顶部渐变色的开始 #356DC1
|
||||
+ (UIColor *)homeNavGradientEnd;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
23
xplan-ios/Main/Home/ThemeColor+Home.m
Normal file
23
xplan-ios/Main/Home/ThemeColor+Home.m
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// ThemeColor+Home.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "ThemeColor+Home.h"
|
||||
|
||||
@implementation ThemeColor (Home)
|
||||
|
||||
|
||||
/// 首页顶部渐变色的开始 #462893
|
||||
+ (UIColor *)homeNavGradientStart {
|
||||
return UIColorFromRGB(0x462893);
|
||||
}
|
||||
|
||||
/// 首页顶部渐变色的开始 #356DC1
|
||||
+ (UIColor *)homeNavGradientEnd {
|
||||
return UIColorFromRGB(0x356DC1);
|
||||
}
|
||||
|
||||
@end
|
19
xplan-ios/Main/Home/View/Cell/XPHomeListCollectionViewCell.h
Normal file
19
xplan-ios/Main/Home/View/Cell/XPHomeListCollectionViewCell.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// XPHomeListCollectionViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class HomeRecommendRoomModel;
|
||||
@interface XPHomeListCollectionViewCell : UICollectionViewCell
|
||||
|
||||
///
|
||||
@property (nonatomic,strong) HomeRecommendRoomModel *roomModel;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
178
xplan-ios/Main/Home/View/Cell/XPHomeListCollectionViewCell.m
Normal file
178
xplan-ios/Main/Home/View/Cell/XPHomeListCollectionViewCell.m
Normal file
@@ -0,0 +1,178 @@
|
||||
//
|
||||
// XPHomeListCollectionViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "XPHomeListCollectionViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
///Model
|
||||
#import "HomeRecommendRoomModel.h"
|
||||
///View
|
||||
#import "NetImageView.h"
|
||||
#import "XPNoteView.h"
|
||||
|
||||
@interface XPHomeListCollectionViewCell ()
|
||||
///头像
|
||||
@property (nonatomic,strong) NetImageView *avatarImageView;
|
||||
///底部的view
|
||||
@property (nonatomic,strong) UIView * bottomView;
|
||||
///名字
|
||||
@property (nonatomic,strong) UILabel *nickLabel;
|
||||
///类型
|
||||
@property (nonatomic,strong) NetImageView *tagImageView;
|
||||
///背景图
|
||||
@property (nonatomic,strong) UIImageView *shadowImageView;
|
||||
///在线人数的容器
|
||||
@property (nonatomic,strong) UIImageView * noteContainImageView;
|
||||
///音符
|
||||
@property (nonatomic,strong) XPNoteView *noteView;
|
||||
///在线人数的
|
||||
@property (nonatomic,strong) UILabel *numberLabel;
|
||||
@end
|
||||
|
||||
@implementation XPHomeListCollectionViewCell
|
||||
|
||||
- (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.avatarImageView];
|
||||
[self.contentView addSubview:self.tagImageView];
|
||||
[self.contentView addSubview:self.shadowImageView];
|
||||
[self.contentView addSubview:self.noteContainImageView];
|
||||
[self.contentView addSubview:self.bottomView];
|
||||
|
||||
[self.bottomView addSubview:self.nickLabel];
|
||||
|
||||
[self.noteContainImageView addSubview:self.noteView];
|
||||
[self.noteContainImageView addSubview:self.numberLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.contentView);
|
||||
make.height.mas_equalTo(157);
|
||||
}];
|
||||
|
||||
[self.tagImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(43, 18));
|
||||
make.left.top.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.noteContainImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.right.mas_equalTo(self.avatarImageView).offset(-5);
|
||||
make.left.mas_equalTo(self.noteView.mas_left).offset(-4);
|
||||
make.height.mas_equalTo(16);
|
||||
}];
|
||||
|
||||
[self.noteView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(10);
|
||||
make.height.mas_equalTo(10);
|
||||
make.centerY.mas_equalTo(self.noteContainImageView);
|
||||
make.right.mas_equalTo(self.noteContainImageView.mas_centerX).offset(-1);
|
||||
}];
|
||||
|
||||
[self.numberLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.noteContainImageView.mas_centerX).offset(1);
|
||||
make.centerY.mas_equalTo(self.noteContainImageView);
|
||||
}];
|
||||
|
||||
[self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.contentView);
|
||||
make.top.mas_equalTo(self.avatarImageView.mas_bottom);
|
||||
}];
|
||||
|
||||
[self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.centerY.mas_equalTo(self.bottomView);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setRoomModel:(HomeRecommendRoomModel *)roomModel {
|
||||
_roomModel = roomModel;
|
||||
if (_roomModel) {
|
||||
self.avatarImageView.imageUrl = _roomModel.avatar;
|
||||
self.nickLabel.text = _roomModel.title.length > 0 ? _roomModel.title : @"";
|
||||
self.numberLabel.text = [NSString stringWithFormat:@"%ld", _roomModel.onlineNum];
|
||||
self.tagImageView.imageUrl = _roomModel.tagPict;
|
||||
}
|
||||
}
|
||||
|
||||
- (NetImageView *)avatarImageView {
|
||||
if (!_avatarImageView) {
|
||||
_avatarImageView = [[NetImageView alloc] init];
|
||||
_avatarImageView.layer.masksToBounds = YES;
|
||||
_avatarImageView.layer.cornerRadius = 12;
|
||||
_avatarImageView.image = [UIImageConstant defaultAvatarPlaceholder];
|
||||
}
|
||||
return _avatarImageView;;
|
||||
}
|
||||
|
||||
- (UIView *)bottomView {
|
||||
if (!_bottomView) {
|
||||
_bottomView = [[UIView alloc] init];
|
||||
_bottomView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return _bottomView;
|
||||
}
|
||||
|
||||
- (UILabel *)nickLabel {
|
||||
if (!_nickLabel) {
|
||||
_nickLabel = [[UILabel alloc] init];
|
||||
_nickLabel.font = [UIFont systemFontOfSize:12];
|
||||
_nickLabel.textColor = [ThemeColor secondTextColor];
|
||||
}
|
||||
return _nickLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)shadowImageView {
|
||||
if (!_shadowImageView) {
|
||||
_shadowImageView = [[UIImageView alloc] init];
|
||||
_shadowImageView.userInteractionEnabled = YES;
|
||||
_shadowImageView.image = [UIImage imageNamed:@""];
|
||||
}
|
||||
return _shadowImageView;
|
||||
}
|
||||
|
||||
- (UIImageView *)noteContainImageView {
|
||||
if (!_noteContainImageView) {
|
||||
_noteContainImageView = [[UIImageView alloc] init];
|
||||
_noteContainImageView.userInteractionEnabled = YES;
|
||||
_noteContainImageView.image = [UIImage imageNamed:@"home_room_list_note_bg"];
|
||||
}
|
||||
return _noteContainImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)numberLabel {
|
||||
if (!_numberLabel) {
|
||||
_numberLabel = [[UILabel alloc] init];
|
||||
_numberLabel.font = [UIFont systemFontOfSize:10];
|
||||
_numberLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _numberLabel;
|
||||
}
|
||||
|
||||
- (XPNoteView *)noteView {
|
||||
if (!_noteView) {
|
||||
_noteView = [[XPNoteView alloc] init];
|
||||
_noteView.pillarColor = [ThemeColor mainTextColor];
|
||||
_noteView.pillarWidth = 1.5;
|
||||
[_noteView startAnimation];
|
||||
}
|
||||
return _noteView;
|
||||
}
|
||||
|
||||
|
||||
@end
|
17
xplan-ios/Main/Home/View/Cell/XPSearchListTableViewCell.h
Normal file
17
xplan-ios/Main/Home/View/Cell/XPSearchListTableViewCell.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// XPSearchListTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class HomeSearchResultModel;
|
||||
@interface XPSearchListTableViewCell : UITableViewCell
|
||||
///数据
|
||||
@property (nonatomic,strong) HomeSearchResultModel * resultModel;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
178
xplan-ios/Main/Home/View/Cell/XPSearchListTableViewCell.m
Normal file
178
xplan-ios/Main/Home/View/Cell/XPSearchListTableViewCell.m
Normal file
@@ -0,0 +1,178 @@
|
||||
//
|
||||
// XPSearchListTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "XPSearchListTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
///Model
|
||||
#import "HomeSearchResultModel.h"
|
||||
///View
|
||||
#import "NetImageView.h"
|
||||
|
||||
|
||||
@interface XPSearchListTableViewCell ()
|
||||
///头像
|
||||
@property (nonatomic,strong) NetImageView *avatarImageView;
|
||||
///名字的容器
|
||||
@property (nonatomic,strong) UIStackView *nameStackView;
|
||||
///昵称
|
||||
@property (nonatomic,strong) UILabel *nickLabel;
|
||||
///性别
|
||||
@property (nonatomic,strong) UIImageView *sexImageView;
|
||||
///美丽等级
|
||||
@property (nonatomic,strong) NetImageView *charmImageView;
|
||||
///等级
|
||||
@property (nonatomic,strong) NetImageView *experImageView;
|
||||
///显示id
|
||||
@property (nonatomic,strong) UILabel *idLabel;
|
||||
///分割线
|
||||
@property (nonatomic,strong) UIView * lineView;
|
||||
@end
|
||||
|
||||
@implementation XPSearchListTableViewCell
|
||||
- (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.contentView addSubview:self.avatarImageView];
|
||||
[self.contentView addSubview:self.nameStackView];
|
||||
[self.contentView addSubview:self.idLabel];
|
||||
[self.contentView addSubview:self.lineView];
|
||||
|
||||
[self.nameStackView addArrangedSubview:self.nickLabel];
|
||||
[self.nameStackView addArrangedSubview:self.sexImageView];
|
||||
[self.nameStackView addArrangedSubview:self.experImageView];
|
||||
[self.nameStackView addArrangedSubview:self.charmImageView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(45, 45));
|
||||
make.left.mas_equalTo(self.contentView).offset(15);
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.nameStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.avatarImageView.mas_right).offset(13);
|
||||
make.height.mas_equalTo(20);
|
||||
make.bottom.mas_equalTo(self.avatarImageView.mas_centerY).offset(-1.5);
|
||||
}];
|
||||
|
||||
[self.idLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.nameStackView);
|
||||
make.top.mas_equalTo(self.avatarImageView.mas_centerY).offset(1.5);
|
||||
}];
|
||||
|
||||
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.nameStackView);
|
||||
make.right.mas_equalTo(self.contentView).offset(-15);
|
||||
make.bottom.mas_equalTo(self.contentView);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setResultModel:(HomeSearchResultModel *)resultModel {
|
||||
_resultModel = resultModel;
|
||||
if (_resultModel) {
|
||||
self.avatarImageView.imageUrl = _resultModel.avatar;
|
||||
self.nickLabel.text = _resultModel.title;
|
||||
self.idLabel.text = [NSString stringWithFormat:@"ID:%@", _resultModel.erbanNo];
|
||||
}
|
||||
}
|
||||
|
||||
- (NetImageView *)avatarImageView {
|
||||
if (!_avatarImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc] init];
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
}
|
||||
return _avatarImageView;
|
||||
}
|
||||
|
||||
- (UIStackView *)nameStackView {
|
||||
if (!_nameStackView) {
|
||||
_nameStackView = [[UIStackView alloc] init];
|
||||
_nameStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_nameStackView.distribution = UIStackViewDistributionFill;
|
||||
_nameStackView.alignment = UIStackViewAlignmentFill;
|
||||
_nameStackView.spacing = 2;
|
||||
}
|
||||
return _nameStackView;
|
||||
}
|
||||
|
||||
- (UILabel *)nickLabel {
|
||||
if (!_nickLabel) {
|
||||
_nickLabel = [[UILabel alloc] init];
|
||||
_nickLabel.text = @"消息";
|
||||
_nickLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:15];
|
||||
_nickLabel.textColor = [ThemeColor secondTextColor];
|
||||
}
|
||||
return _nickLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)sexImageView {
|
||||
if (!_sexImageView) {
|
||||
_sexImageView = [[UIImageView alloc] init];
|
||||
_sexImageView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _sexImageView;
|
||||
}
|
||||
|
||||
- (NetImageView *)experImageView {
|
||||
if (!_experImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc] init];
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_experImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_experImageView.userInteractionEnabled = YES;
|
||||
_experImageView.hidden = YES;
|
||||
_experImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _experImageView;
|
||||
}
|
||||
|
||||
- (NetImageView *)charmImageView {
|
||||
if (!_charmImageView) {
|
||||
NetImageConfig * config = [[NetImageConfig alloc] init];
|
||||
config.imageType = ImageTypeUserIcon;
|
||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||
_charmImageView = [[NetImageView alloc] initWithConfig:config];
|
||||
_charmImageView.userInteractionEnabled = YES;
|
||||
_charmImageView.hidden = YES;
|
||||
_charmImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _charmImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)idLabel {
|
||||
if (!_idLabel) {
|
||||
_idLabel = [[UILabel alloc] init];
|
||||
_idLabel.font = [UIFont systemFontOfSize:13];
|
||||
_idLabel.textColor = [ThemeColor textThirdColor];
|
||||
}
|
||||
return _idLabel;
|
||||
}
|
||||
|
||||
- (UIView *)lineView {
|
||||
if (!_lineView) {
|
||||
_lineView = [[UIView alloc] init];
|
||||
_lineView.backgroundColor = [ThemeColor dividerColor];
|
||||
}
|
||||
return _lineView;
|
||||
}
|
||||
|
||||
|
||||
@end
|
26
xplan-ios/Main/Home/View/SubViews/XPHomeSearchNavView.h
Normal file
26
xplan-ios/Main/Home/View/SubViews/XPHomeSearchNavView.h
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// XPHomeSearchNavView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class XPHomeSearchNavView;
|
||||
@protocol XPHomeSearchNavViewDelegate <NSObject>
|
||||
//点击了返回
|
||||
- (void)xPHomeSearchNavView:(XPHomeSearchNavView *)view didClickBack:(UIButton *)sender;
|
||||
///点击了搜索
|
||||
- (void)xPHomeSearchNavView:(XPHomeSearchNavView *)view didClickSearch:(UIButton *)sender;
|
||||
@end
|
||||
|
||||
@interface XPHomeSearchNavView : UIView
|
||||
///输入框
|
||||
@property (nonatomic,strong,readonly) UITextField *searchTextField;
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPHomeSearchNavViewDelegate> delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
161
xplan-ios/Main/Home/View/SubViews/XPHomeSearchNavView.m
Normal file
161
xplan-ios/Main/Home/View/SubViews/XPHomeSearchNavView.m
Normal file
@@ -0,0 +1,161 @@
|
||||
//
|
||||
// XPHomeSearchNavView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "XPHomeSearchNavView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "UIButton+EnlargeTouchArea.h"
|
||||
@interface XPHomeSearchNavView ()
|
||||
|
||||
///返回
|
||||
@property (nonatomic,strong) UIButton *backButton;
|
||||
///输入框背景
|
||||
@property (nonatomic,strong) UIView * inputBackView;
|
||||
///搜索logo
|
||||
@property (nonatomic,strong) UIImageView *searchImageView;
|
||||
///输入框
|
||||
@property (nonatomic,strong) UITextField *searchTextField;
|
||||
///取消
|
||||
@property (nonatomic,strong) UIButton *cancleButton;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation XPHomeSearchNavView
|
||||
|
||||
- (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.backButton];
|
||||
[self addSubview:self.inputBackView];
|
||||
[self addSubview:self.cancleButton];
|
||||
|
||||
[self.inputBackView addSubview:self.searchImageView];
|
||||
[self.inputBackView addSubview:self.searchTextField];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.backButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(22, 22));
|
||||
make.left.mas_equalTo(self).offset(8);
|
||||
make.centerY.mas_equalTo(self.inputBackView);
|
||||
}];
|
||||
|
||||
[self.inputBackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(30);
|
||||
make.left.mas_equalTo(self.backButton.mas_right).offset(5);
|
||||
make.right.mas_equalTo(self.cancleButton.mas_left).offset(-13);
|
||||
make.top.mas_equalTo(self).offset(statusbarHeight + 10);
|
||||
}];
|
||||
|
||||
[self.cancleButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self).offset(-15);
|
||||
make.centerY.mas_equalTo(self.inputBackView);
|
||||
make.height.mas_equalTo(30);
|
||||
}];
|
||||
|
||||
[self.searchImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(18, 18));
|
||||
make.centerY.mas_equalTo(self.inputBackView);
|
||||
make.left.mas_equalTo(self.inputBackView).offset(9);
|
||||
}];
|
||||
|
||||
[self.searchTextField mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.searchImageView.mas_right);
|
||||
make.right.top.bottom.mas_equalTo(self.inputBackView);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)cancleButtonAction:(UIButton *)sender {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeSearchNavView:didClickSearch:)]) {
|
||||
[self.delegate xPHomeSearchNavView:self didClickSearch:sender];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)backButtonAction:(UIButton *)sender {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeSearchNavView:didClickBack:)]) {
|
||||
[self.delegate xPHomeSearchNavView:self didClickBack:sender];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
|
||||
- (UIButton *)backButton {
|
||||
if (!_backButton) {
|
||||
_backButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_backButton setImage:[UIImage imageNamed:@"home_search_white_back"] forState:UIControlStateNormal];
|
||||
[_backButton setImage:[UIImage imageNamed:@"home_search_white_back"] forState:UIControlStateSelected];
|
||||
[_backButton addTarget:self action:@selector(backButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_backButton setEnlargeEdgeWithTop:10 right:5 bottom:10 left:8];
|
||||
}
|
||||
return _backButton;
|
||||
}
|
||||
|
||||
- (UIView *)inputBackView {
|
||||
if (!_inputBackView) {
|
||||
_inputBackView = [[UIView alloc] init];
|
||||
_inputBackView.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
_inputBackView.layer.masksToBounds = YES;
|
||||
_inputBackView.layer.cornerRadius = 15;
|
||||
}
|
||||
return _inputBackView;
|
||||
}
|
||||
|
||||
- (UIImageView *)searchImageView {
|
||||
if (!_searchImageView) {
|
||||
_searchImageView = [[UIImageView alloc] init];
|
||||
_searchImageView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _searchImageView;
|
||||
}
|
||||
|
||||
- (UITextField *)searchTextField {
|
||||
if (!_searchTextField) {
|
||||
_searchTextField = [[UITextField alloc] init];
|
||||
_searchTextField.layer.cornerRadius = 15;
|
||||
_searchTextField.layer.masksToBounds = YES;
|
||||
_searchTextField.tintColor = [ThemeColor secondTextColor];
|
||||
_searchTextField.textColor = [ThemeColor mainTextColor];
|
||||
_searchTextField.backgroundColor = [UIColor clearColor];
|
||||
_searchTextField.font = [UIFont systemFontOfSize:13];
|
||||
NSString *placeholder = [NSString stringWithFormat:@"搜索昵称/%@ID/房间名", AppName];
|
||||
_searchTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:13], NSForegroundColorAttributeName : [ThemeColor secondTextColor]}];
|
||||
_searchTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
|
||||
_searchTextField.returnKeyType = UIReturnKeySearch;
|
||||
_searchTextField.enablesReturnKeyAutomatically = YES;
|
||||
}
|
||||
return _searchTextField;
|
||||
}
|
||||
|
||||
- (UIButton *)cancleButton {
|
||||
if (!_cancleButton) {
|
||||
_cancleButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_cancleButton setTitle:@"搜索" forState:UIControlStateNormal];
|
||||
[_cancleButton setTitleColor:[ThemeColor secondTextColor] forState:UIControlStateNormal];
|
||||
_cancleButton.titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:16];
|
||||
[_cancleButton addTarget:self action:@selector(cancleButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_cancleButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:0];
|
||||
}
|
||||
return _cancleButton;
|
||||
}
|
||||
|
||||
|
||||
@end
|
28
xplan-ios/Main/Home/View/SubViews/XPHoneNavView.h
Normal file
28
xplan-ios/Main/Home/View/SubViews/XPHoneNavView.h
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// XPHoneNavView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class XPHoneNavView;
|
||||
@protocol XPHoneNavViewDelegate <NSObject>
|
||||
|
||||
///点击了搜索按钮
|
||||
- (void)xPHoneNavView:(XPHoneNavView *)view didClickSearch:(UIButton *)sender;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface XPHoneNavView : UIView
|
||||
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPHoneNavViewDelegate> delegat;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
101
xplan-ios/Main/Home/View/SubViews/XPHoneNavView.m
Normal file
101
xplan-ios/Main/Home/View/SubViews/XPHoneNavView.m
Normal file
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// XPHoneNavView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "XPHoneNavView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor+Home.h"
|
||||
#import "XPMacro.h"
|
||||
#import "UIImage+Utils.h"
|
||||
|
||||
@interface XPHoneNavView ()
|
||||
///搜索按钮
|
||||
@property (nonatomic,strong) UIButton *searchButton;
|
||||
///标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///背景色
|
||||
@property (nonatomic,strong) UIImageView *backImageView;
|
||||
@end
|
||||
|
||||
@implementation XPHoneNavView
|
||||
|
||||
- (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.backImageView];
|
||||
[self addSubview:self.searchButton];
|
||||
[self addSubview:self.titleLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
[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.searchButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(22, 22));
|
||||
make.left.mas_equalTo(14);
|
||||
make.centerY.mas_equalTo(self.titleLabel);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)searchButtonAction:(UIButton *)sender {
|
||||
if (self.delegat && [self.delegat respondsToSelector:@selector(xPHoneNavView:didClickSearch:)]) {
|
||||
[self.delegat xPHoneNavView:self didClickSearch:sender];
|
||||
}
|
||||
}
|
||||
|
||||
#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];
|
||||
}
|
||||
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;
|
||||
}
|
||||
- (UIImageView *)backImageView {
|
||||
if (!_backImageView) {
|
||||
_backImageView = [[UIImageView alloc] init];
|
||||
_backImageView.userInteractionEnabled = YES;
|
||||
_backImageView.image = [UIImage gradientColorImageFromColors:@[[ThemeColor homeNavGradientStart], [ThemeColor homeNavGradientEnd]] gradientType:GradientTypeTopToBottom imgSize:CGSizeMake(10, 10)];
|
||||
_backImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_backImageView.layer.masksToBounds = YES;
|
||||
}
|
||||
return _backImageView;
|
||||
}
|
||||
|
||||
@end
|
27
xplan-ios/Main/Home/View/SubViews/XPNoteView.h
Normal file
27
xplan-ios/Main/Home/View/SubViews/XPNoteView.h
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// XPNoteView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNoteView : UIView
|
||||
|
||||
///开始动画
|
||||
- (void)startAnimation;
|
||||
|
||||
///结束动画
|
||||
- (void) stopAnimation;
|
||||
|
||||
///柱子的宽度
|
||||
@property (assign, nonatomic) CGFloat pillarWidth;
|
||||
|
||||
///柱子的颜色
|
||||
@property (strong, nonatomic) UIColor * pillarColor;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
167
xplan-ios/Main/Home/View/SubViews/XPNoteView.m
Normal file
167
xplan-ios/Main/Home/View/SubViews/XPNoteView.m
Normal file
@@ -0,0 +1,167 @@
|
||||
//
|
||||
// XPNoteView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "XPNoteView.h"
|
||||
|
||||
@interface XPNoteView () {
|
||||
BOOL _isAnimatoning;
|
||||
NSArray *_animationLayers;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPNoteView
|
||||
|
||||
#pragma mark - Life cycle
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self commonInit];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithCoder:(NSCoder *)coder
|
||||
{
|
||||
self = [super initWithCoder:coder];
|
||||
if (self) {
|
||||
[self commonInit];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) commonInit {
|
||||
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.pillarWidth = 2;
|
||||
self.pillarColor = [UIColor redColor];
|
||||
_isAnimatoning = NO;
|
||||
|
||||
//添加4个柱状Layer
|
||||
NSMutableArray *animationLayers = [NSMutableArray arrayWithCapacity:3];
|
||||
for (int i = 0; i < 3; i ++) {
|
||||
CAShapeLayer *layer = [[CAShapeLayer alloc] init];
|
||||
layer.fillColor = [UIColor clearColor].CGColor;
|
||||
layer.strokeColor = self.pillarColor.CGColor;
|
||||
layer.masksToBounds = YES;
|
||||
layer.cornerRadius = 1;
|
||||
[self.layer addSublayer:layer];
|
||||
|
||||
[animationLayers addObject:layer];
|
||||
}
|
||||
_animationLayers = [NSArray arrayWithArray:animationLayers];
|
||||
}
|
||||
|
||||
- (void) layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
|
||||
//bounds改变后需要重设Layer的Frame和动画的Path
|
||||
for (CAShapeLayer *layer in _animationLayers) {
|
||||
layer.frame = self.bounds;
|
||||
}
|
||||
[self updateAnimationPath];
|
||||
}
|
||||
|
||||
#pragma mark - Update Path
|
||||
- (void) updateAnimationPath {
|
||||
|
||||
CGFloat height = CGRectGetHeight(self.frame);
|
||||
NSArray * pillarHeighs = @[@(height * 0.8),@(height),@(height*0.7),@(height*0.9)];
|
||||
NSInteger pillarNumber = pillarHeighs.count;
|
||||
NSInteger pillarWidth = self.pillarWidth;
|
||||
NSInteger margin = (CGRectGetWidth(self.frame) - pillarNumber * pillarWidth) / (pillarNumber - 1);
|
||||
|
||||
for (int i = 0; i < _animationLayers.count; i ++) {
|
||||
CAShapeLayer *layer = _animationLayers[i];
|
||||
CGFloat pillarHeight = [pillarHeighs[i] floatValue];
|
||||
CGFloat x = pillarWidth + (pillarWidth + margin) * i;
|
||||
CGPoint startPoint = CGPointMake(x, CGRectGetHeight(self.frame));
|
||||
CGPoint toPoint = CGPointMake(x, height - pillarHeight);
|
||||
|
||||
UIBezierPath * path = [UIBezierPath bezierPath];
|
||||
[path moveToPoint:startPoint];
|
||||
[path addLineToPoint:toPoint];
|
||||
|
||||
layer.path = path.CGPath;
|
||||
}
|
||||
|
||||
if (_isAnimatoning) {
|
||||
[self startAnimation];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Setter and getter
|
||||
- (void)setPillarWidth:(CGFloat)pillarWidth {
|
||||
if (_pillarWidth == pillarWidth) {
|
||||
return;
|
||||
}
|
||||
_pillarWidth = pillarWidth;
|
||||
for (CAShapeLayer * layer in _animationLayers) {
|
||||
layer.lineWidth = self.pillarWidth;
|
||||
layer.cornerRadius = self.pillarWidth/2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)setPillarColor:(UIColor *)pillarColor {
|
||||
if (_pillarColor == pillarColor) {
|
||||
return;
|
||||
}
|
||||
_pillarColor = pillarColor;
|
||||
for (CAShapeLayer * layer in _animationLayers) {
|
||||
layer.strokeColor = self.pillarColor.CGColor;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Public method
|
||||
- (void) startAnimation {
|
||||
|
||||
_isAnimatoning = YES;
|
||||
|
||||
//先移除所有动画
|
||||
for (CAShapeLayer * layer in _animationLayers) {
|
||||
[layer removeAllAnimations];
|
||||
}
|
||||
|
||||
/*通过这些数值来调整动画效果*/
|
||||
//每个Layer动画时切换的高度值(0~1)
|
||||
NSArray * values = @[
|
||||
@[@1.0, @0.5, @0.1, @0.4, @0.7, @0.9, @1.0],
|
||||
@[@1.0, @0.8, @0.5, @0.1, @0.5, @0.7, @1.0],
|
||||
@[@1.0, @0.7, @0.4, @0.4, @0.7, @0.9, @1.0]
|
||||
];
|
||||
//每个Layer的动画时长
|
||||
NSArray * dutions = @[@(0.8),@(0.9),@(1.0)];
|
||||
|
||||
int i = 0;
|
||||
for (CAShapeLayer * layer in _animationLayers) {
|
||||
CAKeyframeAnimation * animation = [CAKeyframeAnimation animationWithKeyPath:@"strokeEnd"];
|
||||
animation.values = values[i];
|
||||
animation.duration = [dutions[i] floatValue];
|
||||
animation.repeatCount = HUGE_VAL;
|
||||
animation.removedOnCompletion = NO;
|
||||
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
|
||||
[layer addAnimation:animation forKey:@"ESSEQAnimation"];
|
||||
i ++;
|
||||
}
|
||||
}
|
||||
|
||||
- (void) stopAnimation {
|
||||
_isAnimatoning = NO;
|
||||
//先移除所有动画
|
||||
for (CAShapeLayer * layer in _animationLayers) {
|
||||
[layer removeAllAnimations];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)dealloc{
|
||||
[self stopAnimation];
|
||||
}
|
||||
|
||||
@end
|
16
xplan-ios/Main/Home/View/XPHomeSearchViewController.h
Normal file
16
xplan-ios/Main/Home/View/XPHomeSearchViewController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPHomeSearchViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPHomeSearchViewController : MvpViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
125
xplan-ios/Main/Home/View/XPHomeSearchViewController.m
Normal file
125
xplan-ios/Main/Home/View/XPHomeSearchViewController.m
Normal file
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// XPHomeSearchViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "XPHomeSearchViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
///View
|
||||
#import "XPSearchListTableViewCell.h"
|
||||
#import "XPHomeSearchNavView.h"
|
||||
///P
|
||||
#import "XPHomeSearchPresenter.h"
|
||||
#import "XPHomeSearchProtocol.h"
|
||||
@interface XPHomeSearchViewController ()<UITableViewDelegate, UITableViewDataSource, XPHomeSearchNavViewDelegate,XPHomeSearchProtocol>
|
||||
///搜索
|
||||
@property (nonatomic,strong) XPHomeSearchNavView *searchView;
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSArray *datasource;
|
||||
@end
|
||||
|
||||
@implementation XPHomeSearchViewController
|
||||
|
||||
- (XPHomeSearchPresenter *)createPresenter {
|
||||
return [[XPHomeSearchPresenter alloc] init];
|
||||
}
|
||||
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
||||
[self.view endEditing:YES];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.searchView];
|
||||
[self.view addSubview:self.tableView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.searchView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(kNavigationHeight);
|
||||
}];
|
||||
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.searchView.mas_bottom).offset(10);
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 74;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.datasource.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPSearchListTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPSearchListTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPSearchListTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPSearchListTableViewCell class])];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
#pragma mark -XPHomeSearchNavViewDelegate
|
||||
- (void)xPHomeSearchNavView:(XPHomeSearchNavView *)view didClickSearch:(UIButton *)sender {
|
||||
[self.presenter searchRoomList:view.searchTextField.text];
|
||||
}
|
||||
|
||||
- (void)xPHomeSearchNavView:(XPHomeSearchNavView *)view didClickBack:(UIButton *)sender {
|
||||
[view.searchTextField resignFirstResponder];
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
- (void)searchRoomSuccess:(NSArray *)data {
|
||||
self.datasource = data;
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
|
||||
_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:[XPSearchListTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPSearchListTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (XPHomeSearchNavView *)searchView {
|
||||
if (!_searchView) {
|
||||
_searchView = [[XPHomeSearchNavView alloc] init];
|
||||
_searchView.delegate = self;
|
||||
}
|
||||
return _searchView;
|
||||
}
|
||||
|
||||
|
||||
@end
|
17
xplan-ios/Main/Home/View/XPHomeViewController.h
Normal file
17
xplan-ios/Main/Home/View/XPHomeViewController.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// XPHomeViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@interface XPHomeViewController : MvpViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
195
xplan-ios/Main/Home/View/XPHomeViewController.m
Normal file
195
xplan-ios/Main/Home/View/XPHomeViewController.m
Normal file
@@ -0,0 +1,195 @@
|
||||
//
|
||||
// XPHomeViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/11/29.
|
||||
//
|
||||
|
||||
#import "XPHomeViewController.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 "XPHoneNavView.h"
|
||||
///P
|
||||
#import "XPHomePresenter.h"
|
||||
#import "XPHomeProtocol.h"
|
||||
///VC
|
||||
#import "XPRoomViewController.h"
|
||||
#import "XPHomeSearchViewController.h"
|
||||
@interface XPHomeViewController ()<UICollectionViewDelegate, UICollectionViewDataSource, XPHomeProtocol, XPHoneNavViewDelegate>
|
||||
///导航栏
|
||||
@property (nonatomic,strong) XPHoneNavView *navView;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSMutableArray *datasource;
|
||||
///
|
||||
@property (nonatomic,strong) UIView * backView;
|
||||
///列表
|
||||
@property (nonatomic,strong) UICollectionView *collectionView;
|
||||
///当前的页数
|
||||
@property (nonatomic,assign) int page;
|
||||
///没有新的数据了
|
||||
@property (nonatomic,assign) BOOL hasNoMoreData;
|
||||
@end
|
||||
|
||||
@implementation XPHomeViewController
|
||||
|
||||
- (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.navView];
|
||||
[self.view addSubview:self.backView];
|
||||
[self.backView addSubview:self.collectionView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[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.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.backView);
|
||||
make.top.mas_equalTo(self.backView).offset(15);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (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;
|
||||
///加载第一页的数据
|
||||
[self headerRefresh];
|
||||
}
|
||||
|
||||
#pragma mark - 刷新的fangfa
|
||||
- (void)headerRefresh {
|
||||
self.page = 1;
|
||||
[self.presenter getRecommendRoomList:@"1" page:self.page pageSize:20 state:NO];
|
||||
}
|
||||
|
||||
- (void)footerRefresh {
|
||||
if (self.hasNoMoreData) {
|
||||
[self showErrorToast:@"没有更多房间了"];
|
||||
return;
|
||||
}
|
||||
self.page++;
|
||||
[self.presenter getRecommendRoomList:@"1" page:self.page pageSize:20 state:YES];
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDataSource
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.datasource.count;
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPHomeListCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeListCollectionViewCell class]) forIndexPath:indexPath];
|
||||
HomeRecommendRoomModel * model = [self.datasource objectAtIndex:indexPath.item];
|
||||
cell.roomModel = model;
|
||||
return cell;
|
||||
}
|
||||
#pragma mark - UICollectionViewDelegate
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
|
||||
HomeRecommendRoomModel * model = [self.datasource objectAtIndex:indexPath.item];
|
||||
[XPRoomViewController openRoom:model.roomUid viewController:self];
|
||||
}
|
||||
#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 - XPHoneNavViewDelegate
|
||||
- (void)xPHoneNavView:(XPHoneNavView *)view didClickSearch:(UIButton *)sender {
|
||||
XPHomeSearchViewController * searchVC = [[XPHomeSearchViewController alloc] init];
|
||||
[self.navigationController presentViewController:searchVC animated:YES completion:nil];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (UIView *)backView {
|
||||
if (!_backView) {
|
||||
_backView = [[UIView alloc] init];
|
||||
_backView.backgroundColor = [ThemeColor appBackgroundColor];
|
||||
_backView.layer.masksToBounds = YES;
|
||||
_backView.layer.cornerRadius = 15;
|
||||
}
|
||||
return _backView;
|
||||
}
|
||||
- (XPHoneNavView *)navView {
|
||||
if (!_navView) {
|
||||
_navView = [[XPHoneNavView alloc] init];
|
||||
_navView.delegat = self;
|
||||
}
|
||||
return _navView;
|
||||
}
|
||||
|
||||
- (UICollectionView *)collectionView{
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake((KScreenWidth - 15 * 3) / 2, 157 + 36);
|
||||
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])];
|
||||
}
|
||||
return _collectionView;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)datasource {
|
||||
if (!_datasource) {
|
||||
_datasource = [NSMutableArray array];
|
||||
}
|
||||
return _datasource;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -27,6 +27,7 @@
|
||||
#import "XplanFBFlutterViewContainer.h"
|
||||
#import "XPMineViewController.h"
|
||||
#import "SessionListViewController.h"
|
||||
#import "XPHomeViewController.h"
|
||||
///Present
|
||||
#import "MainPresenter.h"
|
||||
#import "MainProtocol.h"
|
||||
@@ -140,13 +141,14 @@
|
||||
}
|
||||
|
||||
- (void)initTabs:(BOOL)logined {
|
||||
NSArray *normalImageNames = @[@"tab_game_normal", @"tab_message_normal", @"tab_mine_normal"];
|
||||
NSArray *selectImageNames = @[@"tab_game_selected", @"tab_message_selected", @"tab_mine_selected"];
|
||||
NSArray *tabLabel = @[@"赛事", @"消息", @"我的"];
|
||||
NSArray *normalImageNames = @[@"tab_gameHome_normal",@"tab_game_normal",@"tab_message_normal", @"tab_mine_normal"];
|
||||
NSArray *selectImageNames = @[@"tab_gameHome_selected",@"tab_game_selected@",@"tab_message_selected", @"tab_mine_selected"];
|
||||
NSArray *tabLabel = @[@"派对",@"赛事",@"消息", @"我的"];
|
||||
|
||||
UIViewController *game;
|
||||
UIViewController *msg;
|
||||
UIViewController *me;
|
||||
UIViewController * home;
|
||||
if (logined) {
|
||||
XplanFBFlutterViewContainer *fvcGame = XplanFBFlutterViewContainer.new;
|
||||
#ifdef DEBUG
|
||||
@@ -157,18 +159,19 @@
|
||||
game = fvcGame;
|
||||
msg = [[SessionListViewController alloc] init];
|
||||
me = [[XPMineViewController alloc] init];
|
||||
|
||||
home = [[XPHomeViewController alloc] init];
|
||||
} else {
|
||||
game = [[BaseViewController alloc]init];
|
||||
msg = [[SessionListViewController alloc]init];
|
||||
me = [[BaseViewController alloc]init];
|
||||
home = [[BaseViewController alloc] init];
|
||||
}
|
||||
|
||||
[self createTabBarItem:game title:tabLabel[0] image:normalImageNames[0] selectedImage:selectImageNames[0]];
|
||||
[self createTabBarItem:msg title:tabLabel[1] image:normalImageNames[1] selectedImage:selectImageNames[1]];
|
||||
[self createTabBarItem:me title:tabLabel[2] image:normalImageNames[2] selectedImage:selectImageNames[2]];
|
||||
|
||||
self.viewControllers = @[game, msg, me];
|
||||
|
||||
[self createTabBarItem:home title:tabLabel[0] image:normalImageNames[0] selectedImage:selectImageNames[0]];
|
||||
[self createTabBarItem:game title:tabLabel[1] image:normalImageNames[1] selectedImage:selectImageNames[1]];
|
||||
[self createTabBarItem:msg title:tabLabel[2] image:normalImageNames[2] selectedImage:selectImageNames[2]];
|
||||
[self createTabBarItem:me title:tabLabel[3] image:normalImageNames[3] selectedImage:selectImageNames[3]];
|
||||
self.viewControllers = @[home,game,msg,me];
|
||||
self.selectedIndex = 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user