关注和最新数据的处理
This commit is contained in:
@@ -369,6 +369,16 @@
|
||||
E81366F826F0C12A0076364C /* LoginFullInfoProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E81366F726F0C0F60076364C /* LoginFullInfoProtocol.h */; };
|
||||
E81366FC26F0D2980076364C /* UIButton+EnlargeTouchArea.m in Sources */ = {isa = PBXBuildFile; fileRef = E81366FA26F0D2980076364C /* UIButton+EnlargeTouchArea.m */; };
|
||||
E816C11527608A7500C84014 /* XPRoomMiniManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E816C11427608A7500C84014 /* XPRoomMiniManager.m */; };
|
||||
E81A652B2834E4F600F55894 /* XPMonentsAttentionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A652A2834E4F600F55894 /* XPMonentsAttentionViewController.m */; };
|
||||
E81A65312834E53600F55894 /* XPMonentsLatestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A65302834E53600F55894 /* XPMonentsLatestViewController.m */; };
|
||||
E81A65342834E58A00F55894 /* XPMonentsLatestPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A65332834E58A00F55894 /* XPMonentsLatestPresenter.m */; };
|
||||
E81A65372834E5D200F55894 /* XPMonentsAttentionPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A65362834E5D200F55894 /* XPMonentsAttentionPresenter.m */; };
|
||||
E81A653C2834E9AE00F55894 /* MonentsListInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A653B2834E9AE00F55894 /* MonentsListInfoModel.m */; };
|
||||
E81A653F283511BE00F55894 /* XPMonentsInteractiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A653E283511BE00F55894 /* XPMonentsInteractiveViewController.m */; };
|
||||
E81A65422835120200F55894 /* XPMonentsInteractivePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A65412835120200F55894 /* XPMonentsInteractivePresenter.m */; };
|
||||
E81A6546283519CA00F55894 /* MonentsTopicModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A6545283519CA00F55894 /* MonentsTopicModel.m */; };
|
||||
E81A654928351B9500F55894 /* XPMonentsRecommendHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A654828351B9500F55894 /* XPMonentsRecommendHeaderView.m */; };
|
||||
E81A654C28351D9900F55894 /* XPMonentsTopicCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A654B28351D9900F55894 /* XPMonentsTopicCollectionViewCell.m */; };
|
||||
E81AF31A27F19265003B9E43 /* XPHomeGradientLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = E81AF31927F19265003B9E43 /* XPHomeGradientLabel.m */; };
|
||||
E81AF32527F1D5B8003B9E43 /* XPRoomPKProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = E81AF32427F1D5B8003B9E43 /* XPRoomPKProgressView.m */; };
|
||||
E81AF32827F1EE69003B9E43 /* XPRoomPKPanelUserView.m in Sources */ = {isa = PBXBuildFile; fileRef = E81AF32727F1EE69003B9E43 /* XPRoomPKPanelUserView.m */; };
|
||||
@@ -393,7 +403,6 @@
|
||||
E81D58822720082A003063FE /* MicroWaveView.m in Sources */ = {isa = PBXBuildFile; fileRef = E81D58812720082A003063FE /* MicroWaveView.m */; };
|
||||
E81DCCCD282B63B40039E5C5 /* XPMonentsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E81DCCCC282B63B40039E5C5 /* XPMonentsViewController.m */; };
|
||||
E81DCCD0282B63FD0039E5C5 /* XPMonentsRecommendViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E81DCCCF282B63FD0039E5C5 /* XPMonentsRecommendViewController.m */; };
|
||||
E81DCCD3282B641A0039E5C5 /* XPMonentsAttentionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E81DCCD2282B641A0039E5C5 /* XPMonentsAttentionViewController.m */; };
|
||||
E81EF6DC279AB5CC00FF3EDE /* XPLittleGameRoomOpenView.m in Sources */ = {isa = PBXBuildFile; fileRef = E81EF6DB279AB5CC00FF3EDE /* XPLittleGameRoomOpenView.m */; };
|
||||
E81EF6E0279AB7D900FF3EDE /* XPCreateLittleGameCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E81EF6DF279AB7D900FF3EDE /* XPCreateLittleGameCollectionViewCell.m */; };
|
||||
E81EF6E4279AB92E00FF3EDE /* LittleGameInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E81EF6E3279AB92E00FF3EDE /* LittleGameInfoModel.m */; };
|
||||
@@ -1677,6 +1686,29 @@
|
||||
E81366FB26F0D2980076364C /* UIButton+EnlargeTouchArea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+EnlargeTouchArea.h"; sourceTree = "<group>"; };
|
||||
E816C11327608A7500C84014 /* XPRoomMiniManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMiniManager.h; sourceTree = "<group>"; };
|
||||
E816C11427608A7500C84014 /* XPRoomMiniManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMiniManager.m; sourceTree = "<group>"; };
|
||||
E81A65292834E4F600F55894 /* XPMonentsAttentionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsAttentionViewController.h; sourceTree = "<group>"; };
|
||||
E81A652A2834E4F600F55894 /* XPMonentsAttentionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsAttentionViewController.m; sourceTree = "<group>"; };
|
||||
E81A652F2834E53600F55894 /* XPMonentsLatestViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsLatestViewController.h; sourceTree = "<group>"; };
|
||||
E81A65302834E53600F55894 /* XPMonentsLatestViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsLatestViewController.m; sourceTree = "<group>"; };
|
||||
E81A65322834E58A00F55894 /* XPMonentsLatestPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = XPMonentsLatestPresenter.h; path = "xplan-ios/Main/Monents/View/XPMonentsLatestPresenter.h"; sourceTree = SOURCE_ROOT; };
|
||||
E81A65332834E58A00F55894 /* XPMonentsLatestPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = XPMonentsLatestPresenter.m; path = "xplan-ios/Main/Monents/View/XPMonentsLatestPresenter.m"; sourceTree = SOURCE_ROOT; };
|
||||
E81A65352834E5D200F55894 /* XPMonentsAttentionPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = XPMonentsAttentionPresenter.h; path = "xplan-ios/Main/Monents/View/XPMonentsAttentionPresenter.h"; sourceTree = SOURCE_ROOT; };
|
||||
E81A65362834E5D200F55894 /* XPMonentsAttentionPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = XPMonentsAttentionPresenter.m; path = "xplan-ios/Main/Monents/View/XPMonentsAttentionPresenter.m"; sourceTree = SOURCE_ROOT; };
|
||||
E81A65382834E5F200F55894 /* XPMonentsLatestProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = XPMonentsLatestProtocol.h; path = "xplan-ios/Main/Monents/View/XPMonentsLatestProtocol.h"; sourceTree = SOURCE_ROOT; };
|
||||
E81A65392834E60A00F55894 /* XPMonentsAttentionProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = XPMonentsAttentionProtocol.h; path = "xplan-ios/Main/Monents/View/XPMonentsAttentionProtocol.h"; sourceTree = SOURCE_ROOT; };
|
||||
E81A653A2834E9AE00F55894 /* MonentsListInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MonentsListInfoModel.h; path = "xplan-ios/Main/Monents/View/MonentsListInfoModel.h"; sourceTree = SOURCE_ROOT; };
|
||||
E81A653B2834E9AE00F55894 /* MonentsListInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MonentsListInfoModel.m; path = "xplan-ios/Main/Monents/View/MonentsListInfoModel.m"; sourceTree = SOURCE_ROOT; };
|
||||
E81A653D283511BE00F55894 /* XPMonentsInteractiveViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsInteractiveViewController.h; sourceTree = "<group>"; };
|
||||
E81A653E283511BE00F55894 /* XPMonentsInteractiveViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsInteractiveViewController.m; sourceTree = "<group>"; };
|
||||
E81A65402835120200F55894 /* XPMonentsInteractivePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsInteractivePresenter.h; sourceTree = "<group>"; };
|
||||
E81A65412835120200F55894 /* XPMonentsInteractivePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsInteractivePresenter.m; sourceTree = "<group>"; };
|
||||
E81A65432835121000F55894 /* XPMonentsInteractiveProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsInteractiveProtocol.h; sourceTree = "<group>"; };
|
||||
E81A6544283519CA00F55894 /* MonentsTopicModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MonentsTopicModel.h; sourceTree = "<group>"; };
|
||||
E81A6545283519CA00F55894 /* MonentsTopicModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MonentsTopicModel.m; sourceTree = "<group>"; };
|
||||
E81A654728351B9500F55894 /* XPMonentsRecommendHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsRecommendHeaderView.h; sourceTree = "<group>"; };
|
||||
E81A654828351B9500F55894 /* XPMonentsRecommendHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsRecommendHeaderView.m; sourceTree = "<group>"; };
|
||||
E81A654A28351D9900F55894 /* XPMonentsTopicCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsTopicCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
E81A654B28351D9900F55894 /* XPMonentsTopicCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsTopicCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
E81AF31827F19265003B9E43 /* XPHomeGradientLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeGradientLabel.h; sourceTree = "<group>"; };
|
||||
E81AF31927F19265003B9E43 /* XPHomeGradientLabel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeGradientLabel.m; sourceTree = "<group>"; };
|
||||
E81AF32327F1D5B8003B9E43 /* XPRoomPKProgressView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKProgressView.h; sourceTree = "<group>"; };
|
||||
@@ -1726,8 +1758,6 @@
|
||||
E81DCCCC282B63B40039E5C5 /* XPMonentsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsViewController.m; sourceTree = "<group>"; };
|
||||
E81DCCCE282B63FD0039E5C5 /* XPMonentsRecommendViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsRecommendViewController.h; sourceTree = "<group>"; };
|
||||
E81DCCCF282B63FD0039E5C5 /* XPMonentsRecommendViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsRecommendViewController.m; sourceTree = "<group>"; };
|
||||
E81DCCD1282B641A0039E5C5 /* XPMonentsAttentionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsAttentionViewController.h; sourceTree = "<group>"; };
|
||||
E81DCCD2282B641A0039E5C5 /* XPMonentsAttentionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsAttentionViewController.m; sourceTree = "<group>"; };
|
||||
E81EF6DA279AB5CC00FF3EDE /* XPLittleGameRoomOpenView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLittleGameRoomOpenView.h; sourceTree = "<group>"; };
|
||||
E81EF6DB279AB5CC00FF3EDE /* XPLittleGameRoomOpenView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPLittleGameRoomOpenView.m; sourceTree = "<group>"; };
|
||||
E81EF6DE279AB7D900FF3EDE /* XPCreateLittleGameCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCreateLittleGameCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
@@ -4843,6 +4873,9 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E8098CAB282E04870090B9F0 /* XPMonentsRecommendProtocol.h */,
|
||||
E81A65382834E5F200F55894 /* XPMonentsLatestProtocol.h */,
|
||||
E81A65392834E60A00F55894 /* XPMonentsAttentionProtocol.h */,
|
||||
E81A65432835121000F55894 /* XPMonentsInteractiveProtocol.h */,
|
||||
);
|
||||
path = Protocol;
|
||||
sourceTree = "<group>";
|
||||
@@ -4854,6 +4887,12 @@
|
||||
E8950188282CFFB1007E459A /* XPMonentsLayoutConfig.m */,
|
||||
E8098CA8282E03B40090B9F0 /* XPMonentsRecommendPresenter.h */,
|
||||
E8098CA9282E03B40090B9F0 /* XPMonentsRecommendPresenter.m */,
|
||||
E81A65322834E58A00F55894 /* XPMonentsLatestPresenter.h */,
|
||||
E81A65332834E58A00F55894 /* XPMonentsLatestPresenter.m */,
|
||||
E81A65352834E5D200F55894 /* XPMonentsAttentionPresenter.h */,
|
||||
E81A65362834E5D200F55894 /* XPMonentsAttentionPresenter.m */,
|
||||
E81A65402835120200F55894 /* XPMonentsInteractivePresenter.h */,
|
||||
E81A65412835120200F55894 /* XPMonentsInteractivePresenter.m */,
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
@@ -4867,8 +4906,12 @@
|
||||
E81DCCCC282B63B40039E5C5 /* XPMonentsViewController.m */,
|
||||
E81DCCCE282B63FD0039E5C5 /* XPMonentsRecommendViewController.h */,
|
||||
E81DCCCF282B63FD0039E5C5 /* XPMonentsRecommendViewController.m */,
|
||||
E81DCCD1282B641A0039E5C5 /* XPMonentsAttentionViewController.h */,
|
||||
E81DCCD2282B641A0039E5C5 /* XPMonentsAttentionViewController.m */,
|
||||
E81A65292834E4F600F55894 /* XPMonentsAttentionViewController.h */,
|
||||
E81A652A2834E4F600F55894 /* XPMonentsAttentionViewController.m */,
|
||||
E81A652F2834E53600F55894 /* XPMonentsLatestViewController.h */,
|
||||
E81A65302834E53600F55894 /* XPMonentsLatestViewController.m */,
|
||||
E81A653D283511BE00F55894 /* XPMonentsInteractiveViewController.h */,
|
||||
E81A653E283511BE00F55894 /* XPMonentsInteractiveViewController.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@@ -4887,6 +4930,10 @@
|
||||
children = (
|
||||
E88749B4282B8FC600C3C7DB /* MonentsInfoModel.h */,
|
||||
E88749B5282B8FC600C3C7DB /* MonentsInfoModel.m */,
|
||||
E81A653A2834E9AE00F55894 /* MonentsListInfoModel.h */,
|
||||
E81A653B2834E9AE00F55894 /* MonentsListInfoModel.m */,
|
||||
E81A6544283519CA00F55894 /* MonentsTopicModel.h */,
|
||||
E81A6545283519CA00F55894 /* MonentsTopicModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -6999,6 +7046,8 @@
|
||||
E8D7D74A282BA1EC0007D7BD /* XPMonentsTableViewCell.m */,
|
||||
E8098CAC282E07C00090B9F0 /* XPMonentsEmptyTableViewCell.h */,
|
||||
E8098CAD282E07C00090B9F0 /* XPMonentsEmptyTableViewCell.m */,
|
||||
E81A654A28351D9900F55894 /* XPMonentsTopicCollectionViewCell.h */,
|
||||
E81A654B28351D9900F55894 /* XPMonentsTopicCollectionViewCell.m */,
|
||||
);
|
||||
path = Cell;
|
||||
sourceTree = "<group>";
|
||||
@@ -7016,6 +7065,8 @@
|
||||
E8098CB0282E86EF0090B9F0 /* XPMonentsContentView.m */,
|
||||
E895018A282D0701007E459A /* XPMoentsTopicView.h */,
|
||||
E895018B282D0701007E459A /* XPMoentsTopicView.m */,
|
||||
E81A654728351B9500F55894 /* XPMonentsRecommendHeaderView.h */,
|
||||
E81A654828351B9500F55894 /* XPMonentsRecommendHeaderView.m */,
|
||||
);
|
||||
path = SubViews;
|
||||
sourceTree = "<group>";
|
||||
@@ -7824,7 +7875,6 @@
|
||||
E8AC723226F49710007D6E91 /* XPMineNotificationTableViewCell.m in Sources */,
|
||||
E8AC722926F488DA007D6E91 /* XPMineFeedbackProtocol.h in Sources */,
|
||||
E8950183282CAC6A007E459A /* XPMonentsPhotoView.m in Sources */,
|
||||
E81DCCD3282B641A0039E5C5 /* XPMonentsAttentionViewController.m in Sources */,
|
||||
9BCF58562798FE86008401A4 /* XPSkillCardPropModel.m in Sources */,
|
||||
E8AC721E26F472BF007D6E91 /* XPMineSettingProtocol.h in Sources */,
|
||||
9BC5C91F277C902B007C8719 /* XPReleaseRadioView.m in Sources */,
|
||||
@@ -7850,6 +7900,7 @@
|
||||
E80E900C27E0358900434B90 /* XPRoomTopicAlertView.m in Sources */,
|
||||
9BB54966278303EB0090CD26 /* XPNobleCenterNavView.m in Sources */,
|
||||
9B92A36327980DCC00AD168F /* Api+SkillCard.m in Sources */,
|
||||
E81A65342834E58A00F55894 /* XPMonentsLatestPresenter.m in Sources */,
|
||||
E88B5CB526FB20B800DA9178 /* XPMineTeenagerPwdView.m in Sources */,
|
||||
E8E859C128264C2300EE4857 /* MyHTTPConnection.m in Sources */,
|
||||
9BDA3E7A27FD43EF00517FE6 /* XPAnchorFansTeamEntranceView.m in Sources */,
|
||||
@@ -7960,10 +8011,12 @@
|
||||
E880B3B2278C1D1800A83B0D /* XPAcrossRoomPKRuleView.m in Sources */,
|
||||
E81C1B262770663B0020D1E4 /* XPArrangeMicTableViewCell.m in Sources */,
|
||||
E81AF31A27F19265003B9E43 /* XPHomeGradientLabel.m in Sources */,
|
||||
E81A652B2834E4F600F55894 /* XPMonentsAttentionViewController.m in Sources */,
|
||||
E8E20BEC2816A5B90033B688 /* XPMineBlackListViewController.m in Sources */,
|
||||
E8AC722F26F49610007D6E91 /* XPMineNotificationItemModel.m in Sources */,
|
||||
9B1B72BC28003E06003FACE9 /* XPAnchorPKTableViewCell.m in Sources */,
|
||||
E8E70D7A26F2F16600F03460 /* XPMinePresent.m in Sources */,
|
||||
E81A653C2834E9AE00F55894 /* MonentsListInfoModel.m in Sources */,
|
||||
E855516128059228005F293F /* XPMineGuildIncomeDetailViewController.m in Sources */,
|
||||
E8A1E45B27620F4900B294CA /* XPRoomHalfWebView.m in Sources */,
|
||||
9BFE992E288142FD009DA429 /* RoomClassifyModel.m in Sources */,
|
||||
@@ -7973,6 +8026,7 @@
|
||||
E800162C2803FE4900D6D17A /* GuildIncomeRecordModel.m in Sources */,
|
||||
9BE01ACE28925F7D00B50299 /* XPMineNewUserRechargeView.m in Sources */,
|
||||
E83ABF03280EC90C00322EE4 /* ContentApplicationShareModel.m in Sources */,
|
||||
E81A654928351B9500F55894 /* XPMonentsRecommendHeaderView.m in Sources */,
|
||||
E84B0E3F2727EDF6008818C6 /* XPRoomMessageTableViewCell.m in Sources */,
|
||||
E8E5E18B27C332EE00F457D8 /* XPHomeViewController.m in Sources */,
|
||||
E82325FC274E4735003A3332 /* XPUserCardItemModel.m in Sources */,
|
||||
@@ -8109,6 +8163,7 @@
|
||||
E80CBDED27D0D899001E1EC2 /* XPHomeLikeEmptyTableViewCell.m in Sources */,
|
||||
180806FB2729A354001FD836 /* ThemeColor+Room.m in Sources */,
|
||||
9BC8C83028090C9200C24F85 /* XPRoomAnchorRankBannerView.m in Sources */,
|
||||
E81A653F283511BE00F55894 /* XPMonentsInteractiveViewController.m in Sources */,
|
||||
E851E45827FF024B002F3ACB /* XPMineGuildSearchViewController.m in Sources */,
|
||||
E8395331276A03AE00CF2F24 /* Api+DressUp.m in Sources */,
|
||||
E8B3E8092848B871009746AB /* InviteUserInfoModel.m in Sources */,
|
||||
@@ -8297,6 +8352,7 @@
|
||||
E87A26F627587C48002DDC7A /* XPHomePartyContainerViewController.m in Sources */,
|
||||
9BA8A47D27C63E20000365A3 /* XPSkillCardUpdatePropDetailModel.m in Sources */,
|
||||
E8EEB90126FC31B6007C6EBA /* XPMineUserInfoPresenter.m in Sources */,
|
||||
E81A65312834E53600F55894 /* XPMonentsLatestViewController.m in Sources */,
|
||||
18F404BB2760982000A6C548 /* ChatLimitModel.m in Sources */,
|
||||
E8A30BE828534A63003B4873 /* XPSessionFindNewTableViewCell.m in Sources */,
|
||||
9BE9F10527FF04CF00667200 /* XPAnchorFansTaskTableViewCell.m in Sources */,
|
||||
@@ -8369,6 +8425,7 @@
|
||||
18C17A5D26F338F300C48E11 /* XplanFBFlutterViewContainer.m in Sources */,
|
||||
E8901CF628B38D89001E9A92 /* XPGraffitiGiftView.m in Sources */,
|
||||
E89DA67527009ACD008483C1 /* XPMineRechargeNavView.m in Sources */,
|
||||
E81A6546283519CA00F55894 /* MonentsTopicModel.m in Sources */,
|
||||
E8C1672A2806B1E500ECB15C /* XPGuildSuperAdminSetTableViewCell.m in Sources */,
|
||||
E8834E4528003A8F0029CCC1 /* XPMineMangerListViewController.m in Sources */,
|
||||
E86E79D028A4E0B2006DAF48 /* ContentRistAlertModel.m in Sources */,
|
||||
@@ -8432,6 +8489,7 @@
|
||||
E87A27032758BC81002DDC7A /* XPRoomSearchContainerViewController.m in Sources */,
|
||||
E884C3722743AEDE00E1EBED /* CustomAttachmentDecoder.m in Sources */,
|
||||
18EE3FEE2750CE6D00A452BF /* NIMMessageUtils.m in Sources */,
|
||||
E81A65372834E5D200F55894 /* XPMonentsAttentionPresenter.m in Sources */,
|
||||
E8DEC9AC2764A6CD0078CB70 /* XPRoomMoreMenuCollectionViewCell.m in Sources */,
|
||||
E81DCCD0282B63FD0039E5C5 /* XPMonentsRecommendViewController.m in Sources */,
|
||||
9B7D804A2753783D003DAC0C /* SessionViewController.m in Sources */,
|
||||
@@ -8577,10 +8635,12 @@
|
||||
E87E91522796A15500A7B3F2 /* MicroExtModel.m in Sources */,
|
||||
E8788948273A55D000BF1D57 /* XPGiftBarView.m in Sources */,
|
||||
9BA8A47227C5D590000365A3 /* XPVoiceCardCircleLayer.m in Sources */,
|
||||
E81A65422835120200F55894 /* XPMonentsInteractivePresenter.m in Sources */,
|
||||
9B33E3D427D8A1A4003B0E62 /* XPSkillCardPlayerManager.m in Sources */,
|
||||
E8664EE627E482EF000171BA /* RoomPKTeamModel.m in Sources */,
|
||||
9BAA5FF0277A23F4007453F3 /* XPPermissionsViewController.m in Sources */,
|
||||
E8C167332806CADF00ECB15C /* XPGuildSuperAdminMenuView.m in Sources */,
|
||||
E81A654C28351D9900F55894 /* XPMonentsTopicCollectionViewCell.m in Sources */,
|
||||
E800808527FD8FC20055A8AB /* ClanMemberDetailInfoModel.m in Sources */,
|
||||
E8412FA92779C2ED006E1101 /* XPRoomSettingItemModel.m in Sources */,
|
||||
9BE01AC828913D4C00B50299 /* XPNewUserRechargeViewController.m in Sources */,
|
||||
|
@@ -31,6 +31,21 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param types 类型 0,2
|
||||
+ (void)monentsFollowerList:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId pageSize:(NSString *)pageSize types:(NSString *)types;
|
||||
|
||||
/// 互动消息列表
|
||||
/// @param completion 完成
|
||||
/// @param dynamicId 动态的id
|
||||
/// @param pageSize 一页的个数
|
||||
/// @param uid 类型 uid
|
||||
+ (void)monentsInteractiveList:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId pageSize:(NSString *)pageSize uid:(NSString *)uid;
|
||||
|
||||
/// 获取话题列表
|
||||
/// @param completion 完成
|
||||
/// @param uid uid
|
||||
/// @param page 当前的页数
|
||||
/// @param pageSize 一页多少个
|
||||
/// @param worldTypeId 类型0
|
||||
+ (void)monentsTopicList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize worldTypeId:(NSString *)worldTypeId;
|
||||
|
||||
/// 分享动态
|
||||
/// @param completion 完成
|
||||
/// @param dynamicId 动态的id
|
||||
|
@@ -33,7 +33,30 @@
|
||||
/// @param pageSize 一页的个数
|
||||
/// @param types 类型 0,2
|
||||
+ (void)monentsFollowerList:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId pageSize:(NSString *)pageSize types:(NSString *)types {
|
||||
[self makeRequest:@"dynamic/square/latestDynamics" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, dynamicId, pageSize, types, nil];
|
||||
[self makeRequest:@"dynamic/square/followerDynamics" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, dynamicId, pageSize, types, nil];
|
||||
}
|
||||
|
||||
/// 互动消息列表
|
||||
/// @param completion 完成
|
||||
/// @param dynamicId 动态的id
|
||||
/// @param pageSize 一页的个数
|
||||
/// @param uid 类型 uid
|
||||
+ (void)monentsInteractiveList:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId pageSize:(NSString *)pageSize uid:(NSString *)uid {
|
||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||
[dic setValue:dynamicId forKey:@"id"];
|
||||
[dic setValue:pageSize forKey:@"pageSize"];
|
||||
[dic setValue:uid forKey:@"uid"];
|
||||
[HttpRequestHelper request:@"interactive/list" method:HttpRequestHelperMethodPOST params:dic completion:completion];
|
||||
}
|
||||
|
||||
/// 获取话题列表
|
||||
/// @param completion 完成
|
||||
/// @param uid uid
|
||||
/// @param page 当前的页数
|
||||
/// @param pageSize 一页多少个
|
||||
/// @param worldTypeId 类型0
|
||||
+ (void)monentsTopicList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize worldTypeId:(NSString *)worldTypeId {
|
||||
[self makeRequest:@"world/list" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, page, pageSize, worldTypeId, nil];
|
||||
}
|
||||
|
||||
/// 分享动态
|
||||
|
25
xplan-ios/Main/Monents/Model/MonentsTopicModel.h
Normal file
25
xplan-ios/Main/Monents/Model/MonentsTopicModel.h
Normal file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// MonentsTopicModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MonentsTopicModel : NSObject
|
||||
///创建人id
|
||||
@property (nonatomic, copy) NSString *ownerUid;
|
||||
///名称
|
||||
@property (nonatomic, copy) NSString *name;
|
||||
//convert from id
|
||||
@property (nonatomic, copy) NSString *tId;
|
||||
///封面
|
||||
@property (nonatomic, copy) NSString *icon;
|
||||
///描述 convert from description
|
||||
@property (nonatomic, copy) NSString *desc;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
16
xplan-ios/Main/Monents/Model/MonentsTopicModel.m
Normal file
16
xplan-ios/Main/Monents/Model/MonentsTopicModel.m
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// MonentsTopicModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "MonentsTopicModel.h"
|
||||
|
||||
@implementation MonentsTopicModel
|
||||
|
||||
+ (NSDictionary *)replacedKeyFromPropertyName {
|
||||
return @{@"tid":@"id", @"desc":@"description"};
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// XPMonentsInteractivePresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMonentsInteractivePresenter : BaseMvpPresenter
|
||||
|
||||
/// 获取互动消息
|
||||
/// @param dynamicId 动态的id
|
||||
/// @param pageSize 一页的个数
|
||||
/// @param state 状态
|
||||
- (void)getMonentsInteractiveList:(NSString *)dynamicId pageSize:(int)pageSize state:(int)state;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// XPMonentsInteractivePresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "XPMonentsInteractivePresenter.h"
|
||||
#import "Api+Monents.h"
|
||||
#import "XPMonentsInteractiveProtocol.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
|
||||
@implementation XPMonentsInteractivePresenter
|
||||
|
||||
|
||||
/// 获取互动消息
|
||||
/// @param dynamicId 动态的id
|
||||
/// @param pageSize 一页的个数
|
||||
/// @param state 状态
|
||||
- (void)getMonentsInteractiveList:(NSString *)dynamicId pageSize:(int)pageSize state:(int)state{
|
||||
NSString * pageSizeStr = [NSString stringWithFormat:@"%d", pageSize];
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[Api monentsInteractiveList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray * array;
|
||||
[[self getView] getMonentsInteractiveListSueccess:array state:state];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] getMonentsInteractiveListFail:msg state:state];
|
||||
}] dynamicId:dynamicId pageSize:pageSizeStr uid:uid];
|
||||
}
|
||||
|
||||
@end
|
@@ -15,6 +15,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param pageSize 一页的个数
|
||||
/// @param state 状态
|
||||
- (void)getMonentsRecommendList:(NSInteger)page pageSize:(NSInteger)pageSize state:(int)state;
|
||||
|
||||
/// 获取话题列表
|
||||
/// @param page 当前的页数
|
||||
/// @param pageSize 一页多少个
|
||||
- (void)getMonentsTopicList:(NSInteger)page pageSize:(NSInteger)pageSize;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -6,7 +6,9 @@
|
||||
//
|
||||
|
||||
#import "XPMonentsRecommendPresenter.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "Api+Monents.h"
|
||||
#import "MonentsTopicModel.h"
|
||||
#import "MonentsInfoModel.h"
|
||||
#import "XPMonentsRecommendProtocol.h"
|
||||
@implementation XPMonentsRecommendPresenter
|
||||
@@ -22,8 +24,24 @@
|
||||
[Api monentsRecommendList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray *array = [MonentsInfoModel modelsWithArray:data.data];
|
||||
[[self getView] getMonentsRecommendListSuccess:array state:state];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] getMonentsRecommendListFail:msg state:state];
|
||||
}] page:pageStr pageSize:pageSizeStr types:@"0,2"];
|
||||
}
|
||||
|
||||
|
||||
/// 获取话题列表
|
||||
/// @param page 当前的页数
|
||||
/// @param pageSize 一页多少个
|
||||
- (void)getMonentsTopicList:(NSInteger)page pageSize:(NSInteger)pageSize {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * pageStr = [NSString stringWithFormat:@"%ld", page];
|
||||
NSString * pageSizeStr = [NSString stringWithFormat:@"%ld", pageSize];
|
||||
[Api monentsTopicList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray * array = [MonentsTopicModel modelsWithArray:data.data[@"records"]];
|
||||
[[self getView] monentsTopicListSuccess:array];
|
||||
}] uid:uid page:pageStr pageSize:pageSizeStr worldTypeId:@"0"];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// XPMonentsInteractiveProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol XPMonentsInteractiveProtocol <NSObject>
|
||||
|
||||
- (void)getMonentsInteractiveListSueccess:(NSArray *)array state:(int)state;
|
||||
- (void)getMonentsInteractiveListFail:(NSString *)msg state:(int)state;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -13,6 +13,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
///获取推荐列表从成功
|
||||
- (void)getMonentsRecommendListSuccess:(NSArray *)array state:(int)state;
|
||||
///获取推荐列表失败
|
||||
- (void)getMonentsRecommendListFail:(NSString *)msg state:(int)state;
|
||||
///获取话题列表成功
|
||||
- (void)monentsTopicListSuccess:(NSArray *)array;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -6,18 +6,66 @@
|
||||
//
|
||||
|
||||
#import "XPMonentsEmptyTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "UIImageConstant.h"
|
||||
|
||||
@interface XPMonentsEmptyTableViewCell ()
|
||||
@property (nonatomic,strong) UIImageView *emptyImageView;
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
@end
|
||||
|
||||
@implementation XPMonentsEmptyTableViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
- (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.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.emptyImageView];
|
||||
[self.contentView addSubview:self.titleLabel];
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
- (void)initSubViewConstraints {
|
||||
[self.emptyImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contentView).offset(150);
|
||||
make.centerX.mas_equalTo(self.contentView);
|
||||
make.size.mas_equalTo(CGSizeMake(200, 200));
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.emptyImageView.mas_bottom).offset(20);
|
||||
make.left.right.mas_equalTo(self.contentView);
|
||||
}];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (UIImageView *)emptyImageView {
|
||||
if (!_emptyImageView) {
|
||||
_emptyImageView = [[UIImageView alloc] init];
|
||||
_emptyImageView.userInteractionEnabled = YES;
|
||||
_emptyImageView.image = [UIImageConstant defalutEmptyPlaceholder];
|
||||
_emptyImageView.layer.masksToBounds = YES;
|
||||
_emptyImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _emptyImageView;
|
||||
}
|
||||
|
||||
// Configure the view for the selected state
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.text = @"暂无数据";
|
||||
_titleLabel.font = [UIFont systemFontOfSize:16];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_titleLabel.textColor = [ThemeColor secondTextColor];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPMonentsTopicCollectionViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class MonentsTopicModel;
|
||||
@interface XPMonentsTopicCollectionViewCell : UICollectionViewCell
|
||||
@property (nonatomic,strong) MonentsTopicModel *topicInfo;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,98 @@
|
||||
//
|
||||
// XPMonentsTopicCollectionViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "XPMonentsTopicCollectionViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "UIImage+Utils.h"
|
||||
///Model
|
||||
#import "MonentsTopicModel.h"
|
||||
|
||||
@interface XPMonentsTopicCollectionViewCell ()
|
||||
|
||||
///背景
|
||||
@property (nonatomic,strong) UIImageView *topicImageView;
|
||||
///显示话题前面的#
|
||||
@property (nonatomic,strong) UIImageView *iconImageView;
|
||||
///显示话题
|
||||
@property (nonatomic,strong) UILabel *topicLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPMonentsTopicCollectionViewCell
|
||||
|
||||
- (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.topicImageView];
|
||||
[self.topicImageView addSubview:self.iconImageView];
|
||||
[self.topicImageView addSubview:self.topicLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.topicImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.topicImageView).offset(7);
|
||||
make.size.mas_equalTo(CGSizeMake(16, 16));
|
||||
make.centerY.mas_equalTo(self.topicImageView);
|
||||
}];
|
||||
|
||||
[self.topicLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.iconImageView.mas_right).offset(2);
|
||||
make.centerY.mas_equalTo(self.topicImageView);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setTopicInfo:(MonentsTopicModel *)topicInfo {
|
||||
_topicInfo = topicInfo;
|
||||
if (_topicInfo) {
|
||||
self.topicLabel.text = _topicInfo.name;
|
||||
}
|
||||
}
|
||||
|
||||
- (UIImageView *)topicImageView {
|
||||
if (!_topicImageView) {
|
||||
_topicImageView = [[UIImageView alloc] init];
|
||||
_topicImageView.userInteractionEnabled = YES;
|
||||
_topicImageView.image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xFFFCDD), UIColorFromRGB(0xDFF9FF), UIColorFromRGB(0xF4E5FF)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)];
|
||||
_topicImageView.layer.masksToBounds = YES;
|
||||
_topicImageView.layer.cornerRadius = 13;
|
||||
}
|
||||
return _topicImageView;
|
||||
}
|
||||
|
||||
- (UIImageView *)iconImageView {
|
||||
if (!_iconImageView) {
|
||||
_iconImageView = [[UIImageView alloc] init];
|
||||
_iconImageView.userInteractionEnabled = YES;
|
||||
_iconImageView.image = [UIImage imageNamed:@"monents_info_topic_icon"];
|
||||
}
|
||||
return _iconImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)topicLabel {
|
||||
if (!_topicLabel) {
|
||||
_topicLabel = [[UILabel alloc] init];
|
||||
_topicLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightBold];
|
||||
_topicLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _topicLabel;
|
||||
}
|
||||
@end
|
19
xplan-ios/Main/Monents/View/MonentsListInfoModel.h
Normal file
19
xplan-ios/Main/Monents/View/MonentsListInfoModel.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// MonentsListInfoModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MonentsInfoModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MonentsListInfoModel : NSObject
|
||||
///列表数据
|
||||
@property (nonatomic,strong) NSArray<MonentsInfoModel *> *dynamicList;
|
||||
///下一个动态的id
|
||||
@property (nonatomic,copy) NSString *nextDynamicId;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
16
xplan-ios/Main/Monents/View/MonentsListInfoModel.m
Normal file
16
xplan-ios/Main/Monents/View/MonentsListInfoModel.m
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// MonentsListInfoModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "MonentsListInfoModel.h"
|
||||
|
||||
@implementation MonentsListInfoModel
|
||||
|
||||
+ (NSDictionary *)objectClassInArray {
|
||||
return @{@"dynamicList":[MonentsInfoModel class]};
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPMonentsRecommendHeaderView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class MonentsTopicModel;
|
||||
@interface XPMonentsRecommendHeaderView : UIView
|
||||
@property (nonatomic,strong) NSArray<MonentsTopicModel *> *topicList;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,132 @@
|
||||
//
|
||||
// XPMonentsRecommendHeaderView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "XPMonentsRecommendHeaderView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
///Model
|
||||
#import "MonentsTopicModel.h"
|
||||
///View
|
||||
#import "XPMonentsTopicCollectionViewCell.h"
|
||||
|
||||
@interface XPMonentsRecommendHeaderView ()<UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
|
||||
///显示标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///显示箭头
|
||||
@property (nonatomic,strong) UIButton *arrowButton;
|
||||
///列表
|
||||
@property (nonatomic,strong) UICollectionView *collectionView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPMonentsRecommendHeaderView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
[self addSubview:self.titleLabel];
|
||||
[self addSubview:self.arrowButton];
|
||||
[self addSubview:self.collectionView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self).offset(15);
|
||||
make.top.mas_equalTo(self).offset(15);
|
||||
}];
|
||||
|
||||
[self.arrowButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(11, 20));
|
||||
make.centerY.mas_equalTo(self.titleLabel);
|
||||
make.right.mas_equalTo(self).offset(-15);
|
||||
}];
|
||||
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self);
|
||||
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(12);
|
||||
make.height.mas_equalTo(26);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDelegate And UICollectionViewDatasource
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.topicList.count;
|
||||
}
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
MonentsTopicModel * topicModel = [self.topicList objectAtIndex:indexPath.row];
|
||||
CGFloat itemWidth = [topicModel.name boundingRectWithSize:CGSizeMake(100, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingTruncatesLastVisibleLine attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightBold]} context:nil].size.width;
|
||||
return CGSizeMake(itemWidth +34, 26);
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPMonentsTopicCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPMonentsTopicCollectionViewCell class]) forIndexPath:indexPath];
|
||||
cell.topicInfo = [self.topicList objectAtIndex:indexPath.row];
|
||||
return cell;
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)arrowButtonAction:(UIButton *)sender {
|
||||
//TODO: 查看更多
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setTopicList:(NSArray<MonentsTopicModel *> *)topicList {
|
||||
_topicList = topicList;
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
_titleLabel.text = @"推荐话题";
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)arrowButton {
|
||||
if (!_arrowButton) {
|
||||
_arrowButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateNormal];
|
||||
[_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateSelected];
|
||||
[_arrowButton addTarget:self action:@selector(arrowButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _arrowButton;
|
||||
}
|
||||
|
||||
- (UICollectionView *)collectionView{
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 0);
|
||||
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||
layout.minimumLineSpacing = 8;
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
_collectionView.showsHorizontalScrollIndicator = NO;
|
||||
[_collectionView registerClass:[XPMonentsTopicCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPMonentsTopicCollectionViewCell class])];
|
||||
}
|
||||
return _collectionView;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
22
xplan-ios/Main/Monents/View/XPMonentsAttentionPresenter.h
Normal file
22
xplan-ios/Main/Monents/View/XPMonentsAttentionPresenter.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// XPMonentsAttentionPresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMonentsAttentionPresenter : BaseMvpPresenter
|
||||
|
||||
/// 获取朋友圈动态推荐列表
|
||||
/// @param dynamicId 当前的页数
|
||||
/// @param pageSize 一页的个数
|
||||
/// @param state 状态
|
||||
- (void)getMonentsAttentionListPageSize:(NSInteger)pageSize dynamicId:(NSString *)dynamicId state:(int)state;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
31
xplan-ios/Main/Monents/View/XPMonentsAttentionPresenter.m
Normal file
31
xplan-ios/Main/Monents/View/XPMonentsAttentionPresenter.m
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// XPMonentsAttentionPresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "XPMonentsAttentionPresenter.h"
|
||||
#import "Api+Monents.h"
|
||||
#import "MonentsListInfoModel.h"
|
||||
#import "XPMonentsAttentionProtocol.h"
|
||||
@implementation XPMonentsAttentionPresenter
|
||||
|
||||
/// 获取朋友圈动态推荐列表
|
||||
/// @param dynamicId 当前的页数
|
||||
/// @param pageSize 一页的个数
|
||||
/// @param state 状态
|
||||
- (void)getMonentsAttentionListPageSize:(NSInteger)pageSize dynamicId:(NSString *)dynamicId state:(int)state {
|
||||
if (dynamicId.integerValue <= 0) {
|
||||
dynamicId = @"";
|
||||
}
|
||||
NSString * pageSizeStr = [NSString stringWithFormat:@"%ld", pageSize];
|
||||
[Api monentsFollowerList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
MonentsListInfoModel *listInfo = [MonentsListInfoModel modelWithDictionary:data.data];
|
||||
[[self getView] getMonentsAttentionListSuccess:listInfo state:state];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] getMonentsAttentionListFail:msg state:state];
|
||||
}] dynamicId:dynamicId pageSize:pageSizeStr types:@"0,2"];
|
||||
}
|
||||
|
||||
@end
|
19
xplan-ios/Main/Monents/View/XPMonentsAttentionProtocol.h
Normal file
19
xplan-ios/Main/Monents/View/XPMonentsAttentionProtocol.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// XPMonentsAttentionProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class MonentsListInfoModel;
|
||||
@protocol XPMonentsAttentionProtocol <NSObject>
|
||||
///获取最新列表从成功
|
||||
- (void)getMonentsAttentionListSuccess:(MonentsListInfoModel *)listInfo state:(int)state;
|
||||
///获取最新列表失败
|
||||
- (void)getMonentsAttentionListFail:(NSString *)msg state:(int)state;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -2,14 +2,14 @@
|
||||
// XPMonentsAttentionViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/11.
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMonentsAttentionViewController : MvpViewController
|
||||
@interface XPMonentsAttentionViewController : MvpViewController<JXCategoryListContentViewDelegate>
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -2,20 +2,184 @@
|
||||
// XPMonentsAttentionViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/11.
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "XPMonentsAttentionViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "XPMonentsLayoutConfig.h"
|
||||
///Model
|
||||
#import "MonentsListInfoModel.h"
|
||||
///P
|
||||
#import "XPMonentsAttentionPresenter.h"
|
||||
#import "XPMonentsAttentionProtocol.h"
|
||||
///View
|
||||
#import "XPMonentsTableViewCell.h"
|
||||
#import "XPMonentsEmptyTableViewCell.h"
|
||||
|
||||
@interface XPMonentsAttentionViewController ()
|
||||
|
||||
@interface XPMonentsAttentionViewController ()<UITableViewDelegate, UITableViewDataSource,XPMonentsAttentionProtocol>
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSMutableArray<MonentsInfoModel *> *datasource;
|
||||
///当前的页数
|
||||
@property (nonatomic,assign) NSInteger page;
|
||||
///是否有更多的数据
|
||||
@property (nonatomic,assign) BOOL hasNoMoreData;
|
||||
///数据信息
|
||||
@property (nonatomic,strong) MonentsListInfoModel *listInfo;
|
||||
@end
|
||||
|
||||
@implementation XPMonentsAttentionViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (__kindof id)createPresenter {
|
||||
return [[XPMonentsAttentionPresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initHeaderAndFooterRrfresh];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.tableView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - 下拉刷新
|
||||
- (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.tableView.mj_header = header;
|
||||
|
||||
MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(footerRefresh)];
|
||||
footer.stateLabel.textColor = [ThemeColor secondTextColor];
|
||||
footer.stateLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
self.tableView.mj_footer = footer;
|
||||
|
||||
[self headerRefresh];
|
||||
}
|
||||
|
||||
#pragma mark - 刷新的fangfa
|
||||
- (void)headerRefresh {
|
||||
self.page = 1;
|
||||
[self.presenter getMonentsAttentionListPageSize:20 dynamicId:@"" state:0];
|
||||
}
|
||||
|
||||
- (void)footerRefresh {
|
||||
if (self.hasNoMoreData) {
|
||||
[self showErrorToast:@"没有更多数据了"];
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
return;
|
||||
}
|
||||
self.page++;
|
||||
[self.presenter getMonentsAttentionListPageSize:20 dynamicId:self.listInfo.nextDynamicId state:1];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.datasource.count > 0 ? self.datasource.count : 1;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count > 0) {
|
||||
MonentsInfoModel * monentInfo= [self.datasource objectAtIndex:indexPath.row];
|
||||
[XPMonentsLayoutConfig layoutMonentsModel:monentInfo];
|
||||
return monentInfo.rowHeight;
|
||||
}
|
||||
return KScreenHeight - kNavigationHeight - 49 - kSafeAreaBottomHeight;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count > 0) {
|
||||
XPMonentsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsTableViewCell class])];
|
||||
MonentsInfoModel * monentsInfo = [self.datasource objectAtIndex:indexPath.row];
|
||||
cell.monentsInfo = monentsInfo;
|
||||
return cell;
|
||||
}
|
||||
XPMonentsEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
|
||||
return cell;
|
||||
}
|
||||
#pragma mark -JXCategoryListContainerViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
}
|
||||
|
||||
#pragma mark - XPMonentsRecommendProtocol
|
||||
- (void)getMonentsAttentionListSuccess:(MonentsListInfoModel *)listInfo state:(int)state {
|
||||
self.listInfo = listInfo;
|
||||
if (state == 0) {
|
||||
[self.datasource removeAllObjects];
|
||||
}
|
||||
if (listInfo.dynamicList.count > 0) {
|
||||
[self.datasource addObjectsFromArray:listInfo.dynamicList];
|
||||
}
|
||||
|
||||
if (state == 0) {
|
||||
self.hasNoMoreData = NO;
|
||||
[self.tableView.mj_header endRefreshing];
|
||||
} else {
|
||||
if (listInfo.dynamicList.count > 0) {
|
||||
self.hasNoMoreData = NO;
|
||||
} else {
|
||||
self.hasNoMoreData = YES;
|
||||
}
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)getMonentsAttentionListFail:(NSString *)msg state:(int)state {
|
||||
if (state == 0) {
|
||||
[self.tableView.mj_header endRefreshing];
|
||||
} else {
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
}
|
||||
}
|
||||
|
||||
#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:[XPMonentsTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMonentsTableViewCell class])];
|
||||
[_tableView registerClass:[XPMonentsEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
|
||||
- (NSMutableArray<MonentsInfoModel *> *)datasource {
|
||||
if (!_datasource) {
|
||||
_datasource = [NSMutableArray array];
|
||||
}
|
||||
return _datasource;
|
||||
}
|
||||
@end
|
||||
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPMonentsInteractiveViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMonentsInteractiveViewController : MvpViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
180
xplan-ios/Main/Monents/View/XPMonentsInteractiveViewController.m
Normal file
180
xplan-ios/Main/Monents/View/XPMonentsInteractiveViewController.m
Normal file
@@ -0,0 +1,180 @@
|
||||
//
|
||||
// XPMonentsInteractiveViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "XPMonentsInteractiveViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "XPMonentsLayoutConfig.h"
|
||||
///Model
|
||||
#import "MonentsListInfoModel.h"
|
||||
///P
|
||||
#import "XPMonentsInteractivePresenter.h"
|
||||
#import "XPMonentsInteractiveProtocol.h"
|
||||
///View
|
||||
#import "XPMonentsTableViewCell.h"
|
||||
#import "XPMonentsEmptyTableViewCell.h"
|
||||
|
||||
@interface XPMonentsInteractiveViewController ()<UITableViewDelegate, UITableViewDataSource,XPMonentsInteractiveProtocol>
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSMutableArray<MonentsInfoModel *> *datasource;
|
||||
///当前的页数
|
||||
@property (nonatomic,assign) NSInteger page;
|
||||
///是否有更多的数据
|
||||
@property (nonatomic,assign) BOOL hasNoMoreData;
|
||||
///数据信息
|
||||
@property (nonatomic,strong) MonentsListInfoModel *listInfo;
|
||||
@end
|
||||
|
||||
@implementation XPMonentsInteractiveViewController
|
||||
|
||||
- (__kindof id)createPresenter {
|
||||
return [[XPMonentsInteractivePresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initHeaderAndFooterRrfresh];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.tableView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - 下拉刷新
|
||||
- (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.tableView.mj_header = header;
|
||||
|
||||
MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(footerRefresh)];
|
||||
footer.stateLabel.textColor = [ThemeColor secondTextColor];
|
||||
footer.stateLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
self.tableView.mj_footer = footer;
|
||||
|
||||
[self headerRefresh];
|
||||
}
|
||||
|
||||
#pragma mark - 刷新的fangfa
|
||||
- (void)headerRefresh {
|
||||
self.page = 1;
|
||||
[self.presenter getMonentsInteractiveList:@"0" pageSize:20 state:0];
|
||||
}
|
||||
|
||||
- (void)footerRefresh {
|
||||
if (self.hasNoMoreData) {
|
||||
[self showErrorToast:@"没有更多数据了"];
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
return;
|
||||
}
|
||||
self.page++;
|
||||
[self.presenter getMonentsInteractiveList:@"0" pageSize:20 state:1];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.datasource.count > 0 ? self.datasource.count : 1;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count > 0) {
|
||||
MonentsInfoModel * monentInfo= [self.datasource objectAtIndex:indexPath.row];
|
||||
[XPMonentsLayoutConfig layoutMonentsModel:monentInfo];
|
||||
return monentInfo.rowHeight;
|
||||
}
|
||||
return KScreenHeight - kNavigationHeight - 49 - kSafeAreaBottomHeight;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count > 0) {
|
||||
XPMonentsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsTableViewCell class])];
|
||||
MonentsInfoModel * monentsInfo = [self.datasource objectAtIndex:indexPath.row];
|
||||
cell.monentsInfo = monentsInfo;
|
||||
return cell;
|
||||
}
|
||||
XPMonentsEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
|
||||
return cell;
|
||||
}
|
||||
#pragma mark -JXCategoryListContainerViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
}
|
||||
|
||||
#pragma mark - XPMonentsLatestProtocol
|
||||
- (void)getMonentsInteractiveListSueccess:(NSArray *)array state:(int)state{
|
||||
if (state == 0) {
|
||||
[self.datasource removeAllObjects];
|
||||
}
|
||||
if (array.count > 0) {
|
||||
[self.datasource addObjectsFromArray:array];
|
||||
}
|
||||
|
||||
if (state == 0) {
|
||||
self.hasNoMoreData = NO;
|
||||
[self.tableView.mj_header endRefreshing];
|
||||
} else {
|
||||
if (array.count > 0) {
|
||||
self.hasNoMoreData = NO;
|
||||
} else {
|
||||
self.hasNoMoreData = YES;
|
||||
}
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)getMonentsInteractiveListFail:(NSString *)msg state:(int)state {
|
||||
if (state == 0) {
|
||||
[self.tableView.mj_header endRefreshing];
|
||||
} else {
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
}
|
||||
}
|
||||
|
||||
#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:[XPMonentsTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMonentsTableViewCell class])];
|
||||
[_tableView registerClass:[XPMonentsEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
|
||||
- (NSMutableArray<MonentsInfoModel *> *)datasource {
|
||||
if (!_datasource) {
|
||||
_datasource = [NSMutableArray array];
|
||||
}
|
||||
return _datasource;
|
||||
}
|
||||
@end
|
21
xplan-ios/Main/Monents/View/XPMonentsLatestPresenter.h
Normal file
21
xplan-ios/Main/Monents/View/XPMonentsLatestPresenter.h
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// XPMonentsLatestPresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMonentsLatestPresenter : BaseMvpPresenter
|
||||
|
||||
/// 获取朋友圈动态推荐列表
|
||||
/// @param dynamicId 当前的页数
|
||||
/// @param pageSize 一页的个数
|
||||
/// @param state 状态
|
||||
- (void)getMonentsLatestListPageSize:(NSInteger)pageSize dynamicId:(NSString *)dynamicId state:(int)state;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
32
xplan-ios/Main/Monents/View/XPMonentsLatestPresenter.m
Normal file
32
xplan-ios/Main/Monents/View/XPMonentsLatestPresenter.m
Normal file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// XPMonentsLatestPresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "XPMonentsLatestPresenter.h"
|
||||
#import "Api+Monents.h"
|
||||
#import "MonentsListInfoModel.h"
|
||||
#import "XPMonentsLatestProtocol.h"
|
||||
@implementation XPMonentsLatestPresenter
|
||||
|
||||
/// 获取朋友圈动态推荐列表
|
||||
/// @param dynamicId 当前的页数
|
||||
/// @param pageSize 一页的个数
|
||||
/// @param state 状态
|
||||
- (void)getMonentsLatestListPageSize:(NSInteger)pageSize dynamicId:(NSString *)dynamicId state:(int)state {
|
||||
if (dynamicId.length <= 0) {
|
||||
dynamicId = @"";
|
||||
}
|
||||
NSString * pageSizeStr = [NSString stringWithFormat:@"%ld", pageSize];
|
||||
[Api monentsLatestList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
MonentsListInfoModel *listInfo = [MonentsListInfoModel modelWithDictionary:data.data];
|
||||
[[self getView] getMonentsLatestListSuccess:listInfo state:state];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] getMonentsLatestListFail:msg state:state];
|
||||
}] dynamicId:dynamicId pageSize:pageSizeStr types:@"0,2"];
|
||||
}
|
||||
|
||||
|
||||
@end
|
19
xplan-ios/Main/Monents/View/XPMonentsLatestProtocol.h
Normal file
19
xplan-ios/Main/Monents/View/XPMonentsLatestProtocol.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// XPMonentsLatestProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class MonentsListInfoModel;
|
||||
@protocol XPMonentsLatestProtocol <NSObject>
|
||||
///获取最新列表从成功
|
||||
- (void)getMonentsLatestListSuccess:(MonentsListInfoModel *)listInfo state:(int)state;
|
||||
///获取最新列表从失败
|
||||
- (void)getMonentsLatestListFail:(NSString *)msg state:(int)state;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
16
xplan-ios/Main/Monents/View/XPMonentsLatestViewController.h
Normal file
16
xplan-ios/Main/Monents/View/XPMonentsLatestViewController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPMonentsLatestViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMonentsLatestViewController : MvpViewController<JXCategoryListContentViewDelegate>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
185
xplan-ios/Main/Monents/View/XPMonentsLatestViewController.m
Normal file
185
xplan-ios/Main/Monents/View/XPMonentsLatestViewController.m
Normal file
@@ -0,0 +1,185 @@
|
||||
//
|
||||
// XPMonentsLatestViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/18.
|
||||
//
|
||||
|
||||
#import "XPMonentsLatestViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "XPMonentsLayoutConfig.h"
|
||||
///Model
|
||||
#import "MonentsListInfoModel.h"
|
||||
///P
|
||||
#import "XPMonentsLatestPresenter.h"
|
||||
#import "XPMonentsLatestProtocol.h"
|
||||
///View
|
||||
#import "XPMonentsTableViewCell.h"
|
||||
#import "XPMonentsEmptyTableViewCell.h"
|
||||
|
||||
@interface XPMonentsLatestViewController ()<UITableViewDelegate, UITableViewDataSource,XPMonentsLatestProtocol>
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSMutableArray<MonentsInfoModel *> *datasource;
|
||||
///当前的页数
|
||||
@property (nonatomic,assign) NSInteger page;
|
||||
///是否有更多的数据
|
||||
@property (nonatomic,assign) BOOL hasNoMoreData;
|
||||
///数据信息
|
||||
@property (nonatomic,strong) MonentsListInfoModel *listInfo;
|
||||
@end
|
||||
|
||||
@implementation XPMonentsLatestViewController
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (__kindof id)createPresenter {
|
||||
return [[XPMonentsLatestPresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initHeaderAndFooterRrfresh];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.tableView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - 下拉刷新
|
||||
- (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.tableView.mj_header = header;
|
||||
|
||||
MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(footerRefresh)];
|
||||
footer.stateLabel.textColor = [ThemeColor secondTextColor];
|
||||
footer.stateLabel.font = [UIFont systemFontOfSize:10.0];
|
||||
self.tableView.mj_footer = footer;
|
||||
|
||||
[self headerRefresh];
|
||||
}
|
||||
|
||||
#pragma mark - 刷新的fangfa
|
||||
- (void)headerRefresh {
|
||||
self.page = 1;
|
||||
[self.presenter getMonentsLatestListPageSize:20 dynamicId:@"" state:0];
|
||||
}
|
||||
|
||||
- (void)footerRefresh {
|
||||
if (self.hasNoMoreData) {
|
||||
[self showErrorToast:@"没有更多数据了"];
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
return;
|
||||
}
|
||||
self.page++;
|
||||
[self.presenter getMonentsLatestListPageSize:20 dynamicId:self.listInfo.nextDynamicId state:1];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.datasource.count > 0 ? self.datasource.count : 1;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count > 0) {
|
||||
MonentsInfoModel * monentInfo= [self.datasource objectAtIndex:indexPath.row];
|
||||
[XPMonentsLayoutConfig layoutMonentsModel:monentInfo];
|
||||
return monentInfo.rowHeight;
|
||||
}
|
||||
return KScreenHeight - kNavigationHeight - 49 - kSafeAreaBottomHeight;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count > 0) {
|
||||
XPMonentsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsTableViewCell class])];
|
||||
MonentsInfoModel * monentsInfo = [self.datasource objectAtIndex:indexPath.row];
|
||||
cell.monentsInfo = monentsInfo;
|
||||
return cell;
|
||||
}
|
||||
XPMonentsEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
|
||||
return cell;
|
||||
}
|
||||
#pragma mark -JXCategoryListContainerViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
}
|
||||
|
||||
#pragma mark - XPMonentsLatestProtocol
|
||||
- (void)getMonentsLatestListSuccess:(MonentsListInfoModel *)listInfo state:(int)state{
|
||||
self.listInfo = listInfo;
|
||||
if (state == 0) {
|
||||
[self.datasource removeAllObjects];
|
||||
}
|
||||
if (listInfo.dynamicList.count > 0) {
|
||||
[self.datasource addObjectsFromArray:listInfo.dynamicList];
|
||||
}
|
||||
|
||||
if (state == 0) {
|
||||
self.hasNoMoreData = NO;
|
||||
[self.tableView.mj_header endRefreshing];
|
||||
} else {
|
||||
if (listInfo.dynamicList.count > 0) {
|
||||
self.hasNoMoreData = NO;
|
||||
} else {
|
||||
self.hasNoMoreData = YES;
|
||||
}
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)getMonentsLatestListFail:(NSString *)msg state:(int)state {
|
||||
if (state == 0) {
|
||||
[self.tableView.mj_header endRefreshing];
|
||||
} else {
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
}
|
||||
}
|
||||
|
||||
#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:[XPMonentsTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMonentsTableViewCell class])];
|
||||
[_tableView registerClass:[XPMonentsEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
|
||||
- (NSMutableArray<MonentsInfoModel *> *)datasource {
|
||||
if (!_datasource) {
|
||||
_datasource = [NSMutableArray array];
|
||||
}
|
||||
return _datasource;
|
||||
}
|
||||
@end
|
@@ -6,10 +6,10 @@
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMonentsRecommendViewController : MvpViewController
|
||||
@interface XPMonentsRecommendViewController : MvpViewController<JXCategoryListContentViewDelegate>
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -21,6 +21,7 @@
|
||||
///View
|
||||
#import "XPMonentsTableViewCell.h"
|
||||
#import "XPMonentsEmptyTableViewCell.h"
|
||||
#import "XPMonentsRecommendHeaderView.h"
|
||||
|
||||
@interface XPMonentsRecommendViewController ()<UITableViewDelegate, UITableViewDataSource,XPMonentsRecommendProtocol>
|
||||
///列表
|
||||
@@ -31,10 +32,16 @@
|
||||
@property (nonatomic,assign) NSInteger page;
|
||||
///是否有更多的数据
|
||||
@property (nonatomic,assign) BOOL hasNoMoreData;
|
||||
///顶部视图
|
||||
@property (nonatomic,strong) XPMonentsRecommendHeaderView *headerView;
|
||||
@end
|
||||
|
||||
@implementation XPMonentsRecommendViewController
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (__kindof id)createPresenter {
|
||||
return [[XPMonentsRecommendPresenter alloc] init];
|
||||
}
|
||||
@@ -49,6 +56,7 @@
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.tableView];
|
||||
self.tableView.tableHeaderView = self.headerView;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
@@ -78,6 +86,7 @@
|
||||
- (void)headerRefresh {
|
||||
self.page = 1;
|
||||
[self.presenter getMonentsRecommendList:self.page pageSize:20 state:0];
|
||||
[self.presenter getMonentsTopicList:self.page pageSize:30];
|
||||
}
|
||||
|
||||
- (void)footerRefresh {
|
||||
@@ -114,6 +123,10 @@
|
||||
XPMonentsEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
|
||||
return cell;
|
||||
}
|
||||
#pragma mark -JXCategoryListContainerViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
}
|
||||
|
||||
#pragma mark - XPMonentsRecommendProtocol
|
||||
- (void)getMonentsRecommendListSuccess:(NSArray *)array state:(int)state {
|
||||
@@ -138,6 +151,18 @@
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)getMonentsRecommendListFail:(NSString *)msg state:(int)state {
|
||||
if (state == 0) {
|
||||
[self.tableView.mj_header endRefreshing];
|
||||
} else {
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)monentsTopicListSuccess:(NSArray *)array {
|
||||
self.headerView.topicList = array;
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
@@ -164,4 +189,11 @@
|
||||
return _datasource;
|
||||
}
|
||||
|
||||
- (XPMonentsRecommendHeaderView *)headerView {
|
||||
if (!_headerView) {
|
||||
_headerView = [[XPMonentsRecommendHeaderView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 80)];
|
||||
}
|
||||
return _headerView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -6,26 +6,145 @@
|
||||
//
|
||||
|
||||
#import "XPMonentsViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <JXCategoryView/JXCategoryView.h>
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
///View
|
||||
#import "XPMonentsRecommendViewController.h"
|
||||
#import "XPMonentsAttentionViewController.h"
|
||||
#import "XPMonentsLatestViewController.h"
|
||||
|
||||
@interface XPMonentsViewController ()
|
||||
|
||||
@interface XPMonentsViewController ()<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate>
|
||||
///标题
|
||||
@property (nonatomic,strong) NSArray<NSString *> *titles;
|
||||
///导航栏
|
||||
@property (nonatomic,strong) UIView * navView;
|
||||
///消息的
|
||||
@property (nonatomic,strong) UIButton *messageButton;
|
||||
///滑块
|
||||
@property (nonatomic,strong) JXCategoryTitleView *titleView;
|
||||
@property (nonatomic, strong) JXCategoryListContainerView *listContainerView;
|
||||
@end
|
||||
|
||||
@implementation XPMonentsViewController
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
[super viewDidLoad];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.navView];
|
||||
[self.view addSubview:self.listContainerView];
|
||||
|
||||
[self.navView addSubview:self.titleView];
|
||||
[self.navView addSubview:self.messageButton];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(kNavigationHeight);
|
||||
}];
|
||||
|
||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.navView);
|
||||
make.height.mas_equalTo(20);
|
||||
make.top.mas_equalTo(self.navView).offset(kSafeAreaTopHeight + 40);
|
||||
}];
|
||||
|
||||
[self.messageButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.titleView);
|
||||
make.right.mas_equalTo(self.navView).offset(-15);
|
||||
make.size.mas_equalTo(CGSizeMake(22, 22));
|
||||
}];
|
||||
|
||||
[self.listContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.navView.mas_bottom);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryListContainerViewDelegate
|
||||
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView {
|
||||
return self.titles.count;
|
||||
}
|
||||
|
||||
// 根据下标 index 返回对应遵守并实现 `JXCategoryListContentViewDelegate` 协议的列表实例
|
||||
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
|
||||
if (index == 0) {
|
||||
XPMonentsAttentionViewController * attentionVC = [[XPMonentsAttentionViewController alloc] init];
|
||||
return attentionVC;
|
||||
}else if (index == 1) {
|
||||
XPMonentsRecommendViewController * recommendVC = [[XPMonentsRecommendViewController alloc] init];
|
||||
return recommendVC;
|
||||
} else if(index == 2) {
|
||||
XPMonentsLatestViewController * latestVC = [[XPMonentsLatestViewController alloc] init];
|
||||
return latestVC;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (JXCategoryListContainerView *)listContainerView {
|
||||
if (!_listContainerView) {
|
||||
_listContainerView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
|
||||
_listContainerView.listCellBackgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return _listContainerView;
|
||||
}
|
||||
|
||||
- (JXCategoryTitleView *)titleView {
|
||||
if (!_titleView) {
|
||||
_titleView = [[JXCategoryTitleView alloc] initWithFrame:CGRectZero];
|
||||
_titleView.backgroundColor =[UIColor clearColor];
|
||||
_titleView.delegate = self;
|
||||
_titleView.titleColor = [ThemeColor secondTextColor];
|
||||
_titleView.titleSelectedColor = [ThemeColor mainTextColor];
|
||||
_titleView.titleFont = [UIFont systemFontOfSize:15 weight:UIFontWeightSemibold];
|
||||
_titleView.titleSelectedFont = [UIFont systemFontOfSize:20 weight:UIFontWeightHeavy];
|
||||
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
|
||||
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
|
||||
_titleView.averageCellSpacingEnabled = NO;
|
||||
_titleView.defaultSelectedIndex = 0;
|
||||
_titleView.cellSpacing = 20;
|
||||
_titleView.titles = self.titles;
|
||||
_titleView.listContainer = self.listContainerView;
|
||||
_titleView.defaultSelectedIndex = 1;
|
||||
CGFloat itemWidth = [@"推荐" boundingRectWithSize:CGSizeMake(100, CGFLOAT_MAX) options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:20 weight:UIFontWeightHeavy]} context:nil].size.width;
|
||||
_titleView.cellWidth = itemWidth;
|
||||
_titleView.contentEdgeInsetLeft = (KScreenWidth - itemWidth * self.titles.count - 20 * (self.titles.count - 1))/ 2;
|
||||
}
|
||||
return _titleView;
|
||||
}
|
||||
|
||||
- (UIView *)navView {
|
||||
if (!_navView) {
|
||||
_navView = [[UIView alloc] init];
|
||||
_navView.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
}
|
||||
return _navView;
|
||||
}
|
||||
|
||||
- (NSArray<NSString *> *)titles {
|
||||
if (!_titles) {
|
||||
_titles = @[@"关注",@"推荐", @"最新"];
|
||||
}
|
||||
return _titles;
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
|
@@ -63,6 +63,7 @@
|
||||
#import "XPWebViewController.h"
|
||||
#import "XPMineUserInfoViewController.h"
|
||||
#import "XPMonentsRecommendViewController.h"
|
||||
#import "XPMonentsViewController.h"
|
||||
///Present
|
||||
#import "MainPresenter.h"
|
||||
#import "MainProtocol.h"
|
||||
@@ -394,7 +395,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
me = [[XPMineViewController alloc] init];
|
||||
|
||||
home = [[XPHomeViewController alloc] init];
|
||||
monents = [[XPMonentsRecommendViewController alloc] init];
|
||||
monents = [[XPMonentsViewController alloc] init];
|
||||
} else {
|
||||
game = [[BaseViewController alloc]init];
|
||||
msg = [[SessionListViewController alloc]init];
|
||||
|
Reference in New Issue
Block a user