动态详情

This commit is contained in:
fengshuo
2022-06-22 20:38:57 +08:00
parent fe8747ce5e
commit 365b8aa2da
27 changed files with 1237 additions and 77 deletions

View File

@@ -341,13 +341,13 @@
E801275527E3326000BAC3F2 /* XPRoomPKUserView.m in Sources */ = {isa = PBXBuildFile; fileRef = E801275427E3326000BAC3F2 /* XPRoomPKUserView.m */; };
E801275827E347FD00BAC3F2 /* RoomPKRecordModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E801275727E347FD00BAC3F2 /* RoomPKRecordModel.m */; };
E80487652717DDD9008595F2 /* XPRoomMenuItem.m in Sources */ = {isa = PBXBuildFile; fileRef = E80487642717DDD9008595F2 /* XPRoomMenuItem.m */; };
E8098CB4282E97550090B9F0 /* XPMineBlackListPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8098CB3282E97550090B9F0 /* XPMineBlackListPresenter.m */; };
E80A086227F2AC190027B30C /* RoomPKDetailInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E80A086127F2AC190027B30C /* RoomPKDetailInfoModel.m */; };
E80A086527F318620027B30C /* XPRoomPKPlayingView.m in Sources */ = {isa = PBXBuildFile; fileRef = E80A086427F318620027B30C /* XPRoomPKPlayingView.m */; };
E8098CA7282E00920090B9F0 /* Api+Monents.m in Sources */ = {isa = PBXBuildFile; fileRef = E8098CA6282E00920090B9F0 /* Api+Monents.m */; };
E8098CAA282E03B40090B9F0 /* XPMonentsRecommendPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8098CA9282E03B40090B9F0 /* XPMonentsRecommendPresenter.m */; };
E8098CAE282E07C00090B9F0 /* XPMonentsEmptyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8098CAD282E07C00090B9F0 /* XPMonentsEmptyTableViewCell.m */; };
E8098CB1282E86EF0090B9F0 /* XPMonentsContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8098CB0282E86EF0090B9F0 /* XPMonentsContentView.m */; };
E8098CB4282E97550090B9F0 /* XPMineBlackListPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8098CB3282E97550090B9F0 /* XPMineBlackListPresenter.m */; };
E80A086227F2AC190027B30C /* RoomPKDetailInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E80A086127F2AC190027B30C /* RoomPKDetailInfoModel.m */; };
E80A086527F318620027B30C /* XPRoomPKPlayingView.m in Sources */ = {isa = PBXBuildFile; fileRef = E80A086427F318620027B30C /* XPRoomPKPlayingView.m */; };
E80B0712280D0A6700A79F63 /* FansInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E80B0711280D0A6700A79F63 /* FansInfoModel.m */; };
E80B0734280D740600A79F63 /* MessageContentGuildView.m in Sources */ = {isa = PBXBuildFile; fileRef = E80B0733280D740600A79F63 /* MessageContentGuildView.m */; };
E80B0737280D790400A79F63 /* GuildMessageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E80B0736280D790400A79F63 /* GuildMessageModel.m */; };
@@ -503,6 +503,13 @@
E851E46527FF1F53002F3ACB /* XPMineGuildSetNameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E851E46427FF1F52002F3ACB /* XPMineGuildSetNameViewController.m */; };
E851E46827FF2141002F3ACB /* XPGuildSetNamePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E851E46727FF2140002F3ACB /* XPGuildSetNamePresenter.m */; };
E852D7382862C615001465ED /* room_lucky_gift_bg.svga in Resources */ = {isa = PBXBuildFile; fileRef = E852D7372862C615001465ED /* room_lucky_gift_bg.svga */; };
E852D73B286317F0001465ED /* XPMonentsDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E852D73A286317F0001465ED /* XPMonentsDetailViewController.m */; };
E852D73E28631C18001465ED /* XPMonentsCommentTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E852D73D28631C18001465ED /* XPMonentsCommentTableViewCell.m */; };
E852D7412863249F001465ED /* XPMonentsReplyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E852D7402863249F001465ED /* XPMonentsReplyTableViewCell.m */; };
E852D74428633A08001465ED /* MonentsCommentModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E852D74328633A08001465ED /* MonentsCommentModel.m */; };
E852D74728633E92001465ED /* MonentsCommentReplyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E852D74628633E92001465ED /* MonentsCommentReplyModel.m */; };
E85410352864155A005CFD9F /* XPMonentDetailPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E85410342864155A005CFD9F /* XPMonentDetailPresenter.m */; };
E854103928646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E854103828646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.m */; };
E855514E2805152B005F293F /* XPGuildTimePickView.m in Sources */ = {isa = PBXBuildFile; fileRef = E855514D2805152B005F293F /* XPGuildTimePickView.m */; };
E855515128055581005F293F /* XPGuildTimeMonthPickerView.m in Sources */ = {isa = PBXBuildFile; fileRef = E855515028055581005F293F /* XPGuildTimeMonthPickerView.m */; };
E855515B280559FE005F293F /* NSDate+DateUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = E855515A280559FE005F293F /* NSDate+DateUtils.m */; };
@@ -846,8 +853,8 @@
E8D48256278D83AE003C1D08 /* XPAcrossRoomPKPanelUserView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8D48255278D83AE003C1D08 /* XPAcrossRoomPKPanelUserView.m */; };
E8D55C9D28113218006935A5 /* MessageMenuModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8D55C9C28113218006935A5 /* MessageMenuModel.m */; };
E8D55CA0281186D6006935A5 /* SessionAudioRecordView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8D55C9F281186D6006935A5 /* SessionAudioRecordView.m */; };
E8DAC5AC2858305A00012CFD /* XPRoomMessageBubbleView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8DAC5AB2858305A00012CFD /* XPRoomMessageBubbleView.m */; };
E8D7D74B282BA1EC0007D7BD /* XPMonentsTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8D7D74A282BA1EC0007D7BD /* XPMonentsTableViewCell.m */; };
E8DAC5AC2858305A00012CFD /* XPRoomMessageBubbleView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8DAC5AB2858305A00012CFD /* XPRoomMessageBubbleView.m */; };
E8DACCFB2766EDC60052092C /* MicroGiftValueView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8DACCFA2766EDC60052092C /* MicroGiftValueView.m */; };
E8DACCFE27673F870052092C /* GiftValueInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8DACCFD27673F870052092C /* GiftValueInfoModel.m */; };
E8DBB6F927B639A300AA285D /* LittleGameStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8DBB6F827B639A300AA285D /* LittleGameStageView.m */; };
@@ -1632,13 +1639,6 @@
E801275727E347FD00BAC3F2 /* RoomPKRecordModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomPKRecordModel.m; sourceTree = "<group>"; };
E80487632717DDD9008595F2 /* XPRoomMenuItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMenuItem.h; sourceTree = "<group>"; };
E80487642717DDD9008595F2 /* XPRoomMenuItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMenuItem.m; sourceTree = "<group>"; };
E8098CB2282E97550090B9F0 /* XPMineBlackListPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineBlackListPresenter.h; sourceTree = "<group>"; };
E8098CB3282E97550090B9F0 /* XPMineBlackListPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineBlackListPresenter.m; sourceTree = "<group>"; };
E8098CB6282E97AC0090B9F0 /* XPMineBlackListProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineBlackListProtocol.h; sourceTree = "<group>"; };
E80A086027F2AC190027B30C /* RoomPKDetailInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomPKDetailInfoModel.h; sourceTree = "<group>"; };
E80A086127F2AC190027B30C /* RoomPKDetailInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomPKDetailInfoModel.m; sourceTree = "<group>"; };
E80A086327F318620027B30C /* XPRoomPKPlayingView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKPlayingView.h; sourceTree = "<group>"; };
E80A086427F318620027B30C /* XPRoomPKPlayingView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomPKPlayingView.m; sourceTree = "<group>"; };
E8098CA5282E00920090B9F0 /* Api+Monents.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+Monents.h"; sourceTree = "<group>"; };
E8098CA6282E00920090B9F0 /* Api+Monents.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+Monents.m"; sourceTree = "<group>"; };
E8098CA8282E03B40090B9F0 /* XPMonentsRecommendPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsRecommendPresenter.h; sourceTree = "<group>"; };
@@ -1648,6 +1648,13 @@
E8098CAD282E07C00090B9F0 /* XPMonentsEmptyTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsEmptyTableViewCell.m; sourceTree = "<group>"; };
E8098CAF282E86EF0090B9F0 /* XPMonentsContentView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsContentView.h; sourceTree = "<group>"; };
E8098CB0282E86EF0090B9F0 /* XPMonentsContentView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsContentView.m; sourceTree = "<group>"; };
E8098CB2282E97550090B9F0 /* XPMineBlackListPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineBlackListPresenter.h; sourceTree = "<group>"; };
E8098CB3282E97550090B9F0 /* XPMineBlackListPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineBlackListPresenter.m; sourceTree = "<group>"; };
E8098CB6282E97AC0090B9F0 /* XPMineBlackListProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineBlackListProtocol.h; sourceTree = "<group>"; };
E80A086027F2AC190027B30C /* RoomPKDetailInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomPKDetailInfoModel.h; sourceTree = "<group>"; };
E80A086127F2AC190027B30C /* RoomPKDetailInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomPKDetailInfoModel.m; sourceTree = "<group>"; };
E80A086327F318620027B30C /* XPRoomPKPlayingView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKPlayingView.h; sourceTree = "<group>"; };
E80A086427F318620027B30C /* XPRoomPKPlayingView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomPKPlayingView.m; sourceTree = "<group>"; };
E80B0710280D0A6700A79F63 /* FansInfoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FansInfoModel.h; sourceTree = "<group>"; };
E80B0711280D0A6700A79F63 /* FansInfoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FansInfoModel.m; sourceTree = "<group>"; };
E80B0732280D740600A79F63 /* MessageContentGuildView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageContentGuildView.h; sourceTree = "<group>"; };
@@ -1964,6 +1971,21 @@
E851E46727FF2140002F3ACB /* XPGuildSetNamePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPGuildSetNamePresenter.m; sourceTree = "<group>"; };
E851E46927FF215A002F3ACB /* XPGuildSetNameProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPGuildSetNameProtocol.h; sourceTree = "<group>"; };
E852D7372862C615001465ED /* room_lucky_gift_bg.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = room_lucky_gift_bg.svga; sourceTree = "<group>"; };
E852D739286317F0001465ED /* XPMonentsDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsDetailViewController.h; sourceTree = "<group>"; };
E852D73A286317F0001465ED /* XPMonentsDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsDetailViewController.m; sourceTree = "<group>"; };
E852D73C28631C18001465ED /* XPMonentsCommentTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsCommentTableViewCell.h; sourceTree = "<group>"; };
E852D73D28631C18001465ED /* XPMonentsCommentTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsCommentTableViewCell.m; sourceTree = "<group>"; };
E852D73F2863249F001465ED /* XPMonentsReplyTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsReplyTableViewCell.h; sourceTree = "<group>"; };
E852D7402863249F001465ED /* XPMonentsReplyTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsReplyTableViewCell.m; sourceTree = "<group>"; };
E852D74228633A08001465ED /* MonentsCommentModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MonentsCommentModel.h; sourceTree = "<group>"; };
E852D74328633A08001465ED /* MonentsCommentModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MonentsCommentModel.m; sourceTree = "<group>"; };
E852D74528633E92001465ED /* MonentsCommentReplyModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MonentsCommentReplyModel.h; sourceTree = "<group>"; };
E852D74628633E92001465ED /* MonentsCommentReplyModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MonentsCommentReplyModel.m; sourceTree = "<group>"; };
E85410332864155A005CFD9F /* XPMonentDetailPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentDetailPresenter.h; sourceTree = "<group>"; };
E85410342864155A005CFD9F /* XPMonentDetailPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentDetailPresenter.m; sourceTree = "<group>"; };
E8541036286443D8005CFD9F /* XPMonentsDetailProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsDetailProtocol.h; sourceTree = "<group>"; };
E854103728646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsReplyMoreTableViewCell.h; sourceTree = "<group>"; };
E854103828646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsReplyMoreTableViewCell.m; sourceTree = "<group>"; };
E855514C2805152B005F293F /* XPGuildTimePickView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPGuildTimePickView.h; sourceTree = "<group>"; };
E855514D2805152B005F293F /* XPGuildTimePickView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPGuildTimePickView.m; sourceTree = "<group>"; };
E855514F28055581005F293F /* XPGuildTimeMonthPickerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPGuildTimeMonthPickerView.h; sourceTree = "<group>"; };
@@ -2653,10 +2675,10 @@
E8D55C9C28113218006935A5 /* MessageMenuModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageMenuModel.m; sourceTree = "<group>"; };
E8D55C9E281186D6006935A5 /* SessionAudioRecordView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SessionAudioRecordView.h; sourceTree = "<group>"; };
E8D55C9F281186D6006935A5 /* SessionAudioRecordView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SessionAudioRecordView.m; sourceTree = "<group>"; };
E8DAC5AA2858305A00012CFD /* XPRoomMessageBubbleView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageBubbleView.h; sourceTree = "<group>"; };
E8DAC5AB2858305A00012CFD /* XPRoomMessageBubbleView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMessageBubbleView.m; sourceTree = "<group>"; };
E8D7D749282BA1EC0007D7BD /* XPMonentsTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsTableViewCell.h; sourceTree = "<group>"; };
E8D7D74A282BA1EC0007D7BD /* XPMonentsTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsTableViewCell.m; sourceTree = "<group>"; };
E8DAC5AA2858305A00012CFD /* XPRoomMessageBubbleView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageBubbleView.h; sourceTree = "<group>"; };
E8DAC5AB2858305A00012CFD /* XPRoomMessageBubbleView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMessageBubbleView.m; sourceTree = "<group>"; };
E8DACCF92766EDC60052092C /* MicroGiftValueView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MicroGiftValueView.h; sourceTree = "<group>"; };
E8DACCFA2766EDC60052092C /* MicroGiftValueView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MicroGiftValueView.m; sourceTree = "<group>"; };
E8DACCFC27673F870052092C /* GiftValueInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiftValueInfoModel.h; sourceTree = "<group>"; };
@@ -4885,6 +4907,7 @@
E81A65382834E5F200F55894 /* XPMonentsLatestProtocol.h */,
E81A65392834E60A00F55894 /* XPMonentsAttentionProtocol.h */,
E81A65432835121000F55894 /* XPMonentsInteractiveProtocol.h */,
E8541036286443D8005CFD9F /* XPMonentsDetailProtocol.h */,
);
path = Protocol;
sourceTree = "<group>";
@@ -4902,6 +4925,8 @@
E81A65362834E5D200F55894 /* XPMonentsAttentionPresenter.m */,
E81A65402835120200F55894 /* XPMonentsInteractivePresenter.h */,
E81A65412835120200F55894 /* XPMonentsInteractivePresenter.m */,
E85410332864155A005CFD9F /* XPMonentDetailPresenter.h */,
E85410342864155A005CFD9F /* XPMonentDetailPresenter.m */,
);
path = Presenter;
sourceTree = "<group>";
@@ -4921,6 +4946,8 @@
E81A65302834E53600F55894 /* XPMonentsLatestViewController.m */,
E81A653D283511BE00F55894 /* XPMonentsInteractiveViewController.h */,
E81A653E283511BE00F55894 /* XPMonentsInteractiveViewController.m */,
E852D739286317F0001465ED /* XPMonentsDetailViewController.h */,
E852D73A286317F0001465ED /* XPMonentsDetailViewController.m */,
);
path = View;
sourceTree = "<group>";
@@ -4947,6 +4974,10 @@
E878B8572835F0D300E22DCF /* MonentsInteractiveModel.m */,
E878B85C283640A500E22DCF /* MonentsUnReadModel.h */,
E878B85D283640A500E22DCF /* MonentsUnReadModel.m */,
E852D74228633A08001465ED /* MonentsCommentModel.h */,
E852D74328633A08001465ED /* MonentsCommentModel.m */,
E852D74528633E92001465ED /* MonentsCommentReplyModel.h */,
E852D74628633E92001465ED /* MonentsCommentReplyModel.m */,
);
path = Model;
sourceTree = "<group>";
@@ -7063,6 +7094,12 @@
E81A654B28351D9900F55894 /* XPMonentsTopicCollectionViewCell.m */,
E878B8592835F3BF00E22DCF /* XPMonentsInteractiveTableViewCell.h */,
E878B85A2835F3BF00E22DCF /* XPMonentsInteractiveTableViewCell.m */,
E852D73C28631C18001465ED /* XPMonentsCommentTableViewCell.h */,
E852D73D28631C18001465ED /* XPMonentsCommentTableViewCell.m */,
E852D73F2863249F001465ED /* XPMonentsReplyTableViewCell.h */,
E852D7402863249F001465ED /* XPMonentsReplyTableViewCell.m */,
E854103728646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.h */,
E854103828646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.m */,
);
path = Cell;
sourceTree = "<group>";
@@ -7953,6 +7990,7 @@
E8998D7A2859784200C68558 /* XPSVGAPlayer.m in Sources */,
18E7B22626E8CDCF0064BC9B /* XplanFlutterBoostDelegate.m in Sources */,
9BD9A18427A0F128004186FE /* XPMineVisitorItemModel.m in Sources */,
E852D73E28631C18001465ED /* XPMonentsCommentTableViewCell.m in Sources */,
E80B0712280D0A6700A79F63 /* FansInfoModel.m in Sources */,
E8EEB8F326FC2050007C6EBA /* SDWaitingView.m in Sources */,
E8F9168B27EC940E00F10D8F /* XPHomeLittleGameTableViewCell.m in Sources */,
@@ -8029,6 +8067,7 @@
E81A652B2834E4F600F55894 /* XPMonentsAttentionViewController.m in Sources */,
E8E20BEC2816A5B90033B688 /* XPMineBlackListViewController.m in Sources */,
E8AC722F26F49610007D6E91 /* XPMineNotificationItemModel.m in Sources */,
E85410352864155A005CFD9F /* XPMonentDetailPresenter.m in Sources */,
9B1B72BC28003E06003FACE9 /* XPAnchorPKTableViewCell.m in Sources */,
E8E70D7A26F2F16600F03460 /* XPMinePresent.m in Sources */,
E81A653C2834E9AE00F55894 /* MonentsListInfoModel.m in Sources */,
@@ -8085,6 +8124,7 @@
9BD63FAB277EE885006EB744 /* Api+RoomRadio.m in Sources */,
E8A30BF328534B17003B4873 /* Api+FindNew.m in Sources */,
9BA8A48327C726E8000365A3 /* ThemeColor+SkillCard.m in Sources */,
E852D7412863249F001465ED /* XPMonentsReplyTableViewCell.m in Sources */,
E8AEAED6271412EC0017FCE0 /* XPRoomViewController.m in Sources */,
E8E5E1A327C3730B00F457D8 /* XPHomeSectionView.m in Sources */,
E80A086527F318620027B30C /* XPRoomPKPlayingView.m in Sources */,
@@ -8096,6 +8136,7 @@
E84BF7CA277AF79D00EF8877 /* XPRoomSettingTagCell.m in Sources */,
9BE9F0F927FED12D00667200 /* XPAnchorFansPrivilegeModel.m in Sources */,
E8B846CF26FDD96100A777FE /* XPMineRechageHeadView.m in Sources */,
E852D74728633E92001465ED /* MonentsCommentReplyModel.m in Sources */,
186A534926FC6ED900D67B2C /* TTAlertMessageAttributedConfig.m in Sources */,
E8B3E80C2848BA40009746AB /* NewUserGreetModel.m in Sources */,
E81C27AE26EF39AB0031E639 /* AppDelegate+ThirdConfig.m in Sources */,
@@ -8374,6 +8415,7 @@
9BE9F10527FF04CF00667200 /* XPAnchorFansTaskTableViewCell.m in Sources */,
E8E859D328264C2300EE4857 /* DDTTYLogger.m in Sources */,
9B92A33C2797E38100AD168F /* XPMineHeadItemTableViewCell.m in Sources */,
E854103928646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.m in Sources */,
189DD56526DE465A00AB55B1 /* LoginViewController.m in Sources */,
9B8DE0E1289CF02900FB6EC2 /* XPGiftCompoundModel.m in Sources */,
E8950186282CAC80007E459A /* XPMonentsTooBarView.m in Sources */,
@@ -8529,6 +8571,7 @@
E8A03DF62763367F0098D9EA /* XPCandyTreeEmptyableViewCell.m in Sources */,
E8AEAEED27141AE20017FCE0 /* XPRoomBackContainerView.m in Sources */,
E88B5CC126FB407B00DA9178 /* XPMineUserInfoViewController.m in Sources */,
E852D74428633A08001465ED /* MonentsCommentModel.m in Sources */,
E8C1CD6D27D8938C00376F83 /* XPRoomFaceTitleCollectionViewCell.m in Sources */,
E8C1CD7627D8AE3D00376F83 /* XPRoomFacePresenter.m in Sources */,
18F4043A275E20D900A6C548 /* TRTCRtcImpl.m in Sources */,
@@ -8588,6 +8631,7 @@
E8E859CF28264C2300EE4857 /* DDNumber.m in Sources */,
E84B0E422727EE0A008818C6 /* XPRoomMessageHeaderView.m in Sources */,
E8C6FFDD2754CF5D004DC9F0 /* HomeRecommendRoomModel.m in Sources */,
E852D73B286317F0001465ED /* XPMonentsDetailViewController.m in Sources */,
E8ACEFEC27C8C22C00F66D1A /* XPHomeHappyViewController.m in Sources */,
E890BC10273D23F00007C46B /* GiftInfoModel.m in Sources */,
E8A30BEB28534A96003B4873 /* XPSessionFindNewFiltrateView.m in Sources */,

View File

@@ -22,6 +22,9 @@ NS_ASSUME_NONNULL_BEGIN
///数字转化为万
+ (NSString *)getDealNumwithstring:(NSString *)string;
///时间戳转化为需要显示的内容
+ (NSString *)stringWithTimeStamp:(NSString *)timeStamp;
@end
NS_ASSUME_NONNULL_END

View File

@@ -56,4 +56,59 @@
return [NSString stringWithFormat:@"%@万", strResult];
}
+ (NSString *)stringWithTimeStamp:(NSString *)timeStamp {
//
NSTimeInterval second = timeStamp.longLongValue / 1000;
NSDate *date = [NSDate dateWithTimeIntervalSince1970:second];
//NSdate
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"YYYY-MM-dd HH:mm:ss"];
// 1010
NSDateFormatter *timeFormatter = [[NSDateFormatter alloc] init];
[timeFormatter setDateFormat:@"HH:mm"];
// 218
NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
[dayFormatter setDateFormat:@"MM月dd日"];
//
NSDateFormatter *yearFormatter = [[NSDateFormatter alloc] init];
[yearFormatter setDateFormat:@"YYYY年MM月dd日"];
//
NSTimeInterval timeInterval = [date timeIntervalSinceNow];
timeInterval = -timeInterval;
long temp = 0;
NSString *result;
BOOL isSameDay = [[NSCalendar currentCalendar] isDateInToday:date]; //
// A. timeInterval < 1
if (timeInterval < 60) {
return [NSString stringWithFormat:@"刚刚"];
// B. 1 timeInterval <60n
} else if((temp = timeInterval/60) < 60){
return [NSString stringWithFormat:@"%ld分钟前",temp];
// C. n60xx:xx
} else if((temp = temp/60) < 24 && isSameDay){
return [timeFormatter stringFromDate:date];
// C. n60xx:xx
} else if((temp = temp/60) < 24 && !isSameDay){
return [dayFormatter stringFromDate:date];
// D. mm-dd
} else if((temp = temp/30) < 30){
return [dayFormatter stringFromDate:date];
} else {
// E. yyyy-mm-dd
return [yearFormatter stringFromDate:date];
}
return result;
}
@end

View File

@@ -58,6 +58,30 @@ NS_ASSUME_NONNULL_BEGIN
/// @param worldId 动态的话题id
/// @param shareUid 分享者的uid
+ (void)userShareMonents:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId uid:(NSString *)uid worldId:(NSString *)worldId shareUid:(NSString *)shareUid;
/// 动态详情
/// @param completion 完成
/// @param dynamicId 动态的id
/// @param worldId 话题的id
/// @param uid 用户的uid
+ (void)monentsDetail:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId worldId:(NSString *)worldId uid:(NSString *)uid;
/// 请求评论列表
/// @param completion 完成
/// @param dynamicId 动态id
/// @param uid uid
/// @param pageSize 一页多少个
/// @param timestamp 上一个评论的时间戳
+ (void)monentsCommentList:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId uid:(NSString *)uid pageSize:(NSString *)pageSize timestamp:(NSString *)timestamp;
/// 评论回复列表
/// @param completion 完成
/// @param dynamicId 动态id
/// @param uid uid
/// @param pageSize 每页多少个
/// @param commentId 评论的id
/// @param timestamp 上条回复的时间
+ (void)monentsCommentReplyList:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId uid:(NSString *)uid pageSize:(NSString *)pageSize commentId:(NSString *)commentId timestamp:(NSString *)timestamp;
@end
NS_ASSUME_NONNULL_END

View File

@@ -76,4 +76,42 @@
[self makeRequest:@"dynamic/share" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, dynamicId, uid, worldId, shareUid, nil];
}
///
/// @param completion
/// @param dynamicId id
/// @param worldId id
/// @param uid uid
+ (void)monentsDetail:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId worldId:(NSString *)worldId uid:(NSString *)uid {
[self makeRequest:@"dynamic/detail" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, dynamicId, worldId, uid, nil];
}
///
/// @param completion
/// @param dynamicId id
/// @param uid uid
/// @param pageSize
/// @param timestamp
+ (void)monentsCommentList:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId uid:(NSString *)uid pageSize:(NSString *)pageSize timestamp:(NSString *)timestamp {
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
[dic setValue:dynamicId forKey:@"dynamicId"];
[dic setValue:uid forKey:@"uid"];
[dic setValue:pageSize forKey:@"pageSize"];
if (timestamp.length > 0) {
[dic setValue:timestamp forKey:@"timestamp"];
}
[HttpRequestHelper request:@"dynamic/comment/list" method:HttpRequestHelperMethodGET params:dic completion:completion];
}
///
/// @param completion
/// @param dynamicId id
/// @param uid uid
/// @param pageSize
/// @param commentId id
/// @param timestamp
+ (void)monentsCommentReplyList:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId uid:(NSString *)uid pageSize:(NSString *)pageSize commentId:(NSString *)commentId timestamp:(NSString *)timestamp {
[self makeRequest:@"dynamic/comment/reply/list" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, dynamicId, uid, pageSize, commentId, timestamp, nil];
}
@end

View File

@@ -0,0 +1,38 @@
//
// MonentsCommentModel.h
// xplan-ios
//
// Created by 冯硕 on 2022/6/22.
//
#import <Foundation/Foundation.h>
#import "MonentsCommentReplyModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface MonentsCommentModel : NSObject
///评论的高度
@property (nonatomic,assign) CGFloat commentRowHeight;
/// 昵称
@property (nonatomic,copy) NSString *nick;
/// 头像
@property (nonatomic,copy) NSString *avatar;
/// 用户 uid
@property (nonatomic,copy) NSString *uid;
///评论内容
@property (nonatomic,copy) NSString *content;
///时间
@property (nonatomic, copy) NSString *publishTime;
/// 当前评论id
@property (nonatomic, copy) NSString *commentId;
///回复的内容
@property (nonatomic,strong) MonentsCommentReplyModel *replyInfo;
@end
@interface MonentsCommentListModel : NSObject
///评论的列表
@property (nonatomic,strong) NSArray<MonentsCommentModel *> *commentList;
///下一个评论的时间戳
@property (nonatomic,copy) NSString *nextTimestamp;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,25 @@
//
// MonentsCommentModel.m
// xplan-ios
//
// Created by on 2022/6/22.
//
#import "MonentsCommentModel.h"
#import "NSString+Utils.h"
@implementation MonentsCommentModel
- (NSString *)publishTime {
return [NSString stringWithTimeStamp:_publishTime];
}
@end
@implementation MonentsCommentListModel
+ (NSDictionary *)objectClassInArray {
return @{@"commentList": MonentsCommentModel.class};
}
@end

View File

@@ -0,0 +1,51 @@
//
// MonentsCommentReplyModel.h
// xplan-ios
//
// Created by 冯硕 on 2022/6/22.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class MonentsReplyModel;
@interface MonentsCommentReplyModel : NSObject
@property (nonatomic, strong) NSMutableArray<MonentsReplyModel *> *replyList;// 剩余数量
///剩余多少可以展开
@property (nonatomic, assign) NSInteger leftCount;
///下一个时间
@property (nonatomic, copy) NSString *nextTimestamp;
@end
@interface MonentsReplyModel : NSObject
///回复的高度
@property (nonatomic,assign) CGFloat replyRowHeight;
/// 头像
@property (nonatomic,copy) NSString *avatar;
/// 用户uid
@property (nonatomic,copy) NSString *uid;
/// 用户昵称
@property (nonatomic,copy) NSString *nick;
/// 回复评论的评论id
@property (nonatomic,copy) NSString *toCommentId;
/// 回复评论的uid
@property (nonatomic,copy) NSString *toUid;
/// 回复评论的昵称
@property (nonatomic,copy) NSString *toNick;
/// 评论内容
@property (nonatomic,copy) NSString *content;
/// 发布时间
@property (nonatomic,copy) NSString *publishTime;
/// 是否是楼主
@property (nonatomic,assign) BOOL landLordFlag;
/// 回复评论的评论id
@property (nonatomic,copy) NSString *replyId;
///显示的富文本
@property (nonatomic,strong) NSAttributedString *contentAttribute;
- (void)createContentAttribute;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,36 @@
//
// MonentsCommentReplyModel.m
// xplan-ios
//
// Created by on 2022/6/22.
//
#import "MonentsCommentReplyModel.h"
#import "NSString+Utils.h"
#import "ThemeColor.h"
@implementation MonentsCommentReplyModel
+ (NSDictionary *)objectClassInArray {
return @{@"replyList": MonentsReplyModel.class};
}
@end
@implementation MonentsReplyModel
- (NSString *)publishTime {
return [NSString stringWithTimeStamp:_publishTime];
}
- (void)createContentAttribute {
if (self.contentAttribute == nil) {
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
[attribute appendAttributedString:[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"@%@", _toNick] attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15], NSForegroundColorAttributeName:[ThemeColor appMainColor]}]];
if (self.content.length > 0) {
[attribute appendAttributedString:[[NSMutableAttributedString alloc] initWithString:_content attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15], NSForegroundColorAttributeName:[ThemeColor mainTextColor]}]];
}
self.contentAttribute = attribute;
}
}
@end

View File

@@ -63,10 +63,11 @@ typedef NS_ENUM(NSInteger, MonentsContentType) {
///铭牌图片
@property (nonatomic, copy) NSString *nameplatePic;
///话题id
@property (nonatomic, assign) long topicId;
@property (nonatomic, assign) long worldId;
///话题名字
@property (nonatomic, copy) NSString *topicName;
@property (nonatomic, copy) NSString *worldName;
///动态的id
@property (nonatomic,copy) NSString *dynamicId;
///是否是折叠起来的
@property (nonatomic,assign) BOOL isFold;
///cell的高度

View File

@@ -6,8 +6,7 @@
//
#import "MonentsInfoModel.h"
#define aMinute 60
#import "NSString+Utils.h"
@implementation MonentsInfoModel
- (instancetype)init {
@@ -23,62 +22,7 @@
- (NSString *)publishTime {
return [self stringWithTimeStamp:_publishTime];
}
- (NSString *)stringWithTimeStamp:(NSString *)timeStamp {
//
NSTimeInterval second = timeStamp.longLongValue / 1000;
NSDate *date = [NSDate dateWithTimeIntervalSince1970:second];
//NSdate
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"YYYY-MM-dd HH:mm:ss"];
// 1010
NSDateFormatter *timeFormatter = [[NSDateFormatter alloc] init];
[timeFormatter setDateFormat:@"HH:mm"];
// 218
NSDateFormatter *dayFormatter = [[NSDateFormatter alloc] init];
[dayFormatter setDateFormat:@"MM月dd日"];
//
NSDateFormatter *yearFormatter = [[NSDateFormatter alloc] init];
[yearFormatter setDateFormat:@"YYYY年MM月dd日"];
//
NSTimeInterval timeInterval = [date timeIntervalSinceNow];
timeInterval = -timeInterval;
long temp = 0;
NSString *result;
BOOL isSameDay = [[NSCalendar currentCalendar] isDateInToday:date]; //
// A. timeInterval < 1
if (timeInterval < aMinute) {
return [NSString stringWithFormat:@"刚刚"];
// B. 1 timeInterval <60n
} else if((temp = timeInterval/aMinute) < 60){
return [NSString stringWithFormat:@"%ld分钟前",temp];
// C. n60xx:xx
} else if((temp = temp/60) < 24 && isSameDay){
return [timeFormatter stringFromDate:date];
// C. n60xx:xx
} else if((temp = temp/60) < 24 && !isSameDay){
return [dayFormatter stringFromDate:date];
// D. mm-dd
} else if((temp = temp/30) < 30){
return [dayFormatter stringFromDate:date];
} else {
// E. yyyy-mm-dd
return [yearFormatter stringFromDate:date];
}
return result;
return [NSString stringWithTimeStamp:_publishTime];
}
@end

View File

@@ -0,0 +1,20 @@
//
// XPMonentDetailPresenter.h
// xplan-ios
//
// Created by 冯硕 on 2022/6/23.
//
#import "BaseMvpPresenter.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMonentDetailPresenter : BaseMvpPresenter
/// 获取动态相亲
/// @param dynamicId 动态ID
- (void)getMonentsDetail:(NSString *)dynamicId;
- (void)getMonentsCommentList:(NSString *)dynamicId timestamp:(NSString *)timestamp status:(int)state;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,34 @@
//
// XPMonentDetailPresenter.m
// xplan-ios
//
// Created by on 2022/6/23.
//
#import "XPMonentDetailPresenter.h"
#import "Api+Monents.h"
#import "AccountInfoStorage.h"
#import "XPMonentsDetailProtocol.h"
#import "MonentsInfoModel.h"
#import "MonentsCommentModel.h"
@implementation XPMonentDetailPresenter
///
/// @param dynamicId ID
- (void)getMonentsDetail:(NSString *)dynamicId {
NSString * uid = [AccountInfoStorage instance].getUid;
[Api monentsDetail:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
MonentsInfoModel * monentsInfo = [MonentsInfoModel modelWithDictionary:data.data];
[[self getView] getMonentsDetailSuccess:monentsInfo];
}] dynamicId:dynamicId worldId:@"" uid:uid];
}
- (void)getMonentsCommentList:(NSString *)dynamicId timestamp:(NSString *)timestamp status:(int)state{
NSString * uid = [AccountInfoStorage instance].getUid;
[Api monentsCommentList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
MonentsCommentListModel * info = [MonentsCommentListModel modelWithDictionary:data.data];
[[self getView] getMonentsCommentListSuccess:info state:state];
}] dynamicId:dynamicId uid:uid pageSize:@"10" timestamp:timestamp];
}
@end

View File

@@ -18,11 +18,24 @@ NS_ASSUME_NONNULL_BEGIN
#define kMONENTS_CONTENT_SPACAE_HEIGHT 12 /// 每个内容之间下面的间隙的高度
#define kMONENTS_TEXT_TOPIC_HEIGHT 20 /// 话题的高度
#define kMONENTS_FOLD_HEIGHT 20 /// 展开 关闭的高度
@class MonentsInfoModel;
#pragma mark - 评论的配置
#define kMONENTS_COMMENT_LEFT_PADDING 15 ///评论左的间隙
#define kMONENTS_COMMENT_RIGHT_PADDING 25 ///评论右的间隙
#define kMONENTS_COMMENT_AVATAR_NICK_PADDING 10 ///头像昵称之间的间隙
#define KMONENTS_COMMENT_AVATAR_WIDTH 45 ///评论的头像大小
#define KMONENTS_COMMENT_MAX_WIDTH (KScreenWidth - KMONENTS_COMMENT_AVATAR_WIDTH - kMONENTS_COMMENT_LEFT_PADDING - kMONENTS_COMMENT_RIGHT_PADDING - kMONENTS_COMMENT_AVATAR_NICK_PADDING) ///评论内容的最大宽度
#pragma mark - 评论回复的配置
#define KMONENTS_COMMENT_REPLY_AVATAR_WIDTH 30 ///评论回复的头像大小
#define kMONENTS_COMMENT_REPLY_LEFT_PADDING (kMONENTS_COMMENT_LEFT_PADDING + kMONENTS_COMMENT_RIGHT_PADDING + kMONENTS_COMMENT_AVATAR_NICK_PADDING) ///回复这左边的间隙
#define KMONENTS_COMMENT_REPLY_MAX_WIDTH (KMONENTS_COMMENT_MAX_WIDTH - KMONENTS_COMMENT_REPLY_AVATAR_WIDTH - kMONENTS_COMMENT_AVATAR_NICK_PADDING) ///评论回复内容的最大宽度
@class MonentsInfoModel, MonentsCommentModel;
@interface XPMonentsLayoutConfig : NSObject
+ (void)layoutMonentsModel:(MonentsInfoModel *)monents;
+ (CGFloat)monentsPicHeight:(MonentsInfoModel *)monents;
+ (CGFloat)monentsContentHeight:(MonentsInfoModel *)monents;
///计算评论的高度
+ (CGFloat)commentCommentRowHeight:(MonentsCommentModel * )comment;
@end
NS_ASSUME_NONNULL_END

View File

@@ -10,6 +10,7 @@
#import "ThemeColor.h"
///Model
#import "MonentsInfoModel.h"
#import "MonentsCommentModel.h"
@implementation XPMonentsLayoutConfig
@@ -109,4 +110,51 @@
return realLayout.textBoundingSize.height + foldHeight;
}
///
+ (CGFloat)commentCommentRowHeight:(MonentsCommentModel * )comment {
if (comment.commentRowHeight > 0) {
return comment.commentRowHeight;
}
__block CGFloat rowHeight = 0;
CGFloat commentTopHeight = 10 + 15 + 10;///10 15
NSString * content = comment.content.length > 0 ? comment.content : @"";
CGFloat commentHeight = [content boundingRectWithSize:CGSizeMake(KMONENTS_COMMENT_MAX_WIDTH, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingTruncatesLastVisibleLine attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15]} context:nil].size.height + 5;
commentHeight = MAX(commentHeight, 15);
rowHeight += commentTopHeight;
rowHeight += commentHeight;
///
if (comment.replyInfo.leftCount > 0) {
rowHeight += 44;
}
if (comment.replyInfo.replyList.count > 0) {
rowHeight += 10 * 2;
} else {
rowHeight += 10;
}
///
[comment.replyInfo.replyList enumerateObjectsUsingBlock:^(MonentsReplyModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if (obj.content.length > 0) {
[obj createContentAttribute];
CGFloat replayHeight = 0;
CGFloat commentTopHeight = 10 + 15 + 10;///10 15
CGFloat commentBottomHeight = 10;
YYTextContainer *container = [YYTextContainer new];
container.size = CGSizeMake(KMONENTS_COMMENT_REPLY_MAX_WIDTH, CGFLOAT_MAX);
container.maximumNumberOfRows = 0;
YYTextLayout *realLayout = [YYTextLayout layoutWithContainer:container text:obj.contentAttribute];
CGFloat replyContentHeight = realLayout.textBoundingSize.height;
replayHeight += commentTopHeight;
replayHeight += replyContentHeight;
replayHeight += commentBottomHeight;
obj.replyRowHeight = replayHeight;
rowHeight += replayHeight;
}
}];
comment.commentRowHeight = rowHeight;
return rowHeight;
}
@end

View File

@@ -0,0 +1,21 @@
//
// XPMonentsDetailProtocol.h
// xplan-ios
//
// Created by 冯硕 on 2022/6/23.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class MonentsInfoModel, MonentsCommentListModel;
@protocol XPMonentsDetailProtocol <NSObject>
///获取动态详情成功
- (void)getMonentsDetailSuccess:(MonentsInfoModel *)commentInfo;
///获取动态 评论的列表
- (void)getMonentsCommentListSuccess:(MonentsCommentListModel *)replyList state:(int)state;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,16 @@
//
// XPMonentsCommentTableViewCell.h
// xplan-ios
//
// Created by 冯硕 on 2022/6/22.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class MonentsCommentModel;
@interface XPMonentsCommentTableViewCell : UITableViewCell
@property (nonatomic,strong) MonentsCommentModel *commentInfo;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,267 @@
//
// XPMonentsCommentTableViewCell.m
// xplan-ios
//
// Created by on 2022/6/22.
//
#import "XPMonentsCommentTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "NetImageView.h"
#import "ThemeColor.h"
#import "XPMonentsLayoutConfig.h"
///Model
#import "MonentsCommentModel.h"
///View
#import "XPMonentsReplyTableViewCell.h"
#import "XPMonentsReplyMoreTableViewCell.h"
@interface XPMonentsCommentTableViewCell ()<UITableViewDelegate, UITableViewDataSource>
///
@property (nonatomic,strong) UIStackView *stackView;
///
@property (nonatomic,strong) UIView * commentUserView;
///
@property (nonatomic,strong) NetImageView *commentAvatarView;
///
@property (nonatomic,strong) UILabel *commentNickLabel;
///
@property (nonatomic,strong) UILabel *commentLabel;
///
@property (nonatomic,strong) UILabel *commentDateLabel;
///
@property (nonatomic,strong) UITableView *tableView;
///
@property (nonatomic,strong) UIView * lineContainerView;
///线
@property (nonatomic,strong) UIView * lineView;
///
@property (nonatomic,strong) NSArray *datasource;
@end
@implementation XPMonentsCommentTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
self.backgroundColor = [ThemeColor appCellBackgroundColor];
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.stackView];
[self.stackView addArrangedSubview:self.commentUserView];
[self.stackView addArrangedSubview:self.tableView];
[self.stackView addArrangedSubview:self.lineContainerView];
[self.lineContainerView addSubview:self.lineView];
[self.commentUserView addSubview:self.commentAvatarView];
[self.commentUserView addSubview:self.commentNickLabel];
[self.commentUserView addSubview:self.commentLabel];
[self.commentUserView addSubview:self.commentDateLabel];
}
- (void)initSubViewConstraints {
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.left.mas_equalTo(self.contentView).inset(15);
make.top.bottom.mas_equalTo(self.contentView);
}];
[self.lineContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(1);
}];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.commentNickLabel);
make.top.bottom.right.mas_equalTo(self.lineContainerView);
}];
[self.commentAvatarView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(KMONENTS_COMMENT_AVATAR_WIDTH, KMONENTS_COMMENT_AVATAR_WIDTH));
make.left.mas_equalTo(self.commentUserView);
make.top.mas_equalTo(self.commentUserView).offset(10);
}];
[self.commentNickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.commentAvatarView.mas_right).offset(10);
make.top.mas_equalTo(self.commentUserView).offset(10);
make.height.mas_equalTo(15);
make.right.mas_lessThanOrEqualTo(self.commentDateLabel.mas_left).offset(-10);
}];
[self.commentDateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self.commentUserView);
make.centerY.mas_equalTo(self.commentNickLabel);
}];
[self.commentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.commentNickLabel);
make.top.mas_equalTo(self.commentNickLabel.mas_bottom).offset(10);
make.right.mas_equalTo(self.commentUserView).offset(-kMONENTS_COMMENT_RIGHT_PADDING);
}];
}
#pragma mark - UITableViewDelegate And UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section == 0) {
return self.datasource.count;
}
return self.commentInfo.replyInfo.leftCount > 0 ? 1 : 0;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
MonentsReplyModel * replayinfo = [self.datasource objectAtIndex:indexPath.row];
return replayinfo.replyRowHeight;
}
return 44;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
XPMonentsReplyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsReplyTableViewCell class])];
cell.replyInfo = [self.datasource objectAtIndex:indexPath.row];
return cell;
}
XPMonentsReplyMoreTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsReplyMoreTableViewCell class])];
cell.leftCount = self.commentInfo.replyInfo.leftCount;
return cell;
}
#pragma mark - Getters And Setters
- (void)setCommentInfo:(MonentsCommentModel *)commentInfo {
_commentInfo = commentInfo;
if (_commentInfo) {
self.commentAvatarView.imageUrl = _commentInfo.avatar;
NSString * nick = _commentInfo.nick;
if (nick.length > 8) {
nick = [nick substringToIndex:8];
}
self.commentLabel.text = _commentInfo.content;
self.commentNickLabel.text = nick;
self.commentDateLabel.text = _commentInfo.publishTime;
self.tableView.hidden = _commentInfo.replyInfo.replyList.count <=0;
self.datasource = _commentInfo.replyInfo.replyList;
[self.tableView reloadData];
if (_commentInfo.replyInfo.replyList.count > 0) {
NSString * content = _commentInfo.content.length > 0 ? _commentInfo.content : @"";
CGFloat commentHeight = [content boundingRectWithSize:CGSizeMake(KMONENTS_COMMENT_MAX_WIDTH, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingTruncatesLastVisibleLine attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15]} context:nil].size.height + 5;
commentHeight = MAX(commentHeight, 15);
[self.commentUserView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(commentHeight + 10 + 15 + 10);
}];
}
}
}
- (UIStackView *)stackView {
if (!_stackView) {
_stackView = [[UIStackView alloc] init];
_stackView.axis = UILayoutConstraintAxisVertical;
_stackView.distribution = UIStackViewDistributionFill;
_stackView.alignment = UIStackViewAlignmentFill;
_stackView.spacing = 10;
}
return _stackView;
}
- (UIView *)commentUserView {
if (!_commentUserView) {
_commentUserView = [[UIView alloc] init];
_commentUserView.backgroundColor = [UIColor clearColor];
}
return _commentUserView;
}
- (NetImageView *)commentAvatarView {
if (!_commentAvatarView) {
NetImageConfig * config = [[NetImageConfig alloc]init];
config.imageType = ImageTypeUserIcon;
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_commentAvatarView = [[NetImageView alloc] initWithConfig:config];
_commentAvatarView.layer.masksToBounds = YES;
_commentAvatarView.layer.cornerRadius = 45/2.0;
}
return _commentAvatarView;
}
- (UILabel *)commentNickLabel {
if (!_commentNickLabel) {
_commentNickLabel = [[UILabel alloc] init];
_commentNickLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
_commentNickLabel.textColor = [ThemeColor mainTextColor];
[_commentNickLabel sizeToFit];
}
return _commentNickLabel;
}
- (UILabel *)commentLabel {
if (!_commentLabel) {
_commentLabel = [[UILabel alloc] init];
_commentLabel.font = [UIFont systemFontOfSize:15];
_commentLabel.numberOfLines = 0;
_commentLabel.textColor = [ThemeColor secondTextColor];
}
return _commentLabel;
}
- (UILabel *)commentDateLabel {
if (!_commentDateLabel) {
_commentDateLabel = [[UILabel alloc] init];
_commentDateLabel.font = [UIFont systemFontOfSize:12];
_commentDateLabel.textColor = [ThemeColor textThirdColor];
}
return _commentDateLabel;
}
- (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];
_tableView.scrollEnabled = NO;
if (@available(iOS 11.0, *)) {
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
[_tableView registerClass:[XPMonentsReplyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMonentsReplyTableViewCell class])];
[_tableView registerClass:[XPMonentsReplyMoreTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMonentsReplyMoreTableViewCell class])];
}
return _tableView;
}
- (UIView *)lineView {
if (!_lineView) {
_lineView = [[UIView alloc] init];
_lineView.backgroundColor = [ThemeColor dividerColor];
}
return _lineView;
}
- (UIView *)lineContainerView {
if (!_lineContainerView) {
_lineContainerView = [[UIView alloc] init];
_lineContainerView.backgroundColor = [UIColor clearColor];
}
return _lineContainerView;
}
@end

View File

@@ -0,0 +1,25 @@
//
// XPMonentsReplyMoreTableViewCell.h
// xplan-ios
//
// Created by 冯硕 on 2022/6/23.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class XPMonentsReplyMoreTableViewCell;
@protocol XPMonentsReplyMoreTableViewCellDelegate <NSObject>
- (void)xPMonentsReplyMoreTableViewCellDidClickMoreReply:(XPMonentsReplyMoreTableViewCell *)view;
@end
@interface XPMonentsReplyMoreTableViewCell : UITableViewCell
///代理
@property (nonatomic,weak) id<XPMonentsReplyMoreTableViewCellDelegate> delegate;
///剩余的个数
@property (nonatomic,assign) NSInteger leftCount;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,70 @@
//
// XPMonentsReplyMoreTableViewCell.m
// xplan-ios
//
// Created by on 2022/6/23.
//
#import "XPMonentsReplyMoreTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "XPMonentsLayoutConfig.h"
@interface XPMonentsReplyMoreTableViewCell ()
///
@property (nonatomic,strong) UILabel *moreLabel;
@end
@implementation XPMonentsReplyMoreTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
self.backgroundColor = [UIColor clearColor];
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.moreLabel];
}
- (void)initSubViewConstraints {
[self.moreLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.top.bottom.mas_equalTo(self.contentView);
make.left.mas_equalTo(self.contentView).offset(kMONENTS_COMMENT_REPLY_LEFT_PADDING + KMONENTS_COMMENT_REPLY_AVATAR_WIDTH + kMONENTS_COMMENT_AVATAR_NICK_PADDING);
}];
}
#pragma mark - Event Response
- (void)moreLabelTapRecognizer {
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMonentsReplyMoreTableViewCellDidClickMoreReply:)]) {
[self.delegate xPMonentsReplyMoreTableViewCellDidClickMoreReply:self];
}
}
#pragma mark - Getters And Setters
- (void)setLeftCount:(NSInteger)leftCount {
_leftCount = leftCount;
if (_leftCount) {
self.moreLabel.text = [NSString stringWithFormat:@"展开%ld条回复", _leftCount];
}
}
- (UILabel *)moreLabel {
if (!_moreLabel) {
_moreLabel = [[UILabel alloc] init];
_moreLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightBold];
_moreLabel.textColor = [ThemeColor appEmphasizeColor];
_moreLabel.userInteractionEnabled = YES;
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(moreLabelTapRecognizer)];
[_moreLabel addGestureRecognizer:tap];
}
return _moreLabel;
}
@end

View File

@@ -0,0 +1,16 @@
//
// XPMonentsReplyTableViewCell.h
// xplan-ios
//
// Created by 冯硕 on 2022/6/22.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class MonentsReplyModel;
@interface XPMonentsReplyTableViewCell : UITableViewCell
@property (nonatomic,strong) MonentsReplyModel *replyInfo;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,153 @@
//
// XPMonentsReplyTableViewCell.m
// xplan-ios
//
// Created by on 2022/6/22.
//
#import "XPMonentsReplyTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
#import <YYText/YYLabel.h>
///Tool
#import "ThemeColor.h"
#import "NetImageView.h"
#import "XPMacro.h"
#import "XPMonentsLayoutConfig.h"
///Model
#import "MonentsCommentReplyModel.h"
@interface XPMonentsReplyTableViewCell ()
///
@property (nonatomic,strong) NetImageView *avatarImageView;
///
@property (nonatomic,strong) UILabel *nickLabel;
///
@property (nonatomic,strong) YYLabel *contentLabel;
///
@property (nonatomic,strong) UILabel *dateLabel;
///线
@property (nonatomic,strong) UIView * lineView;
@end
@implementation XPMonentsReplyTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
self.backgroundColor = [UIColor clearColor];
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.avatarImageView];
[self.contentView addSubview:self.nickLabel];
[self.contentView addSubview:self.contentLabel];
[self.contentView addSubview:self.dateLabel];
[self.contentView addSubview:self.lineView];
}
- (void)initSubViewConstraints {
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(KMONENTS_COMMENT_REPLY_AVATAR_WIDTH, KMONENTS_COMMENT_REPLY_AVATAR_WIDTH));
make.top.mas_equalTo(self.contentView).offset(10);
make.left.mas_equalTo(self.contentView).offset(kMONENTS_COMMENT_REPLY_LEFT_PADDING);
}];
[self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.avatarImageView.mas_right).offset(kMONENTS_COMMENT_AVATAR_NICK_PADDING);
make.top.mas_equalTo(self.contentView).offset(10);
make.height.mas_equalTo(15);
make.right.mas_lessThanOrEqualTo(self.dateLabel).offset(-5);
}];
[self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.nickLabel);
make.top.mas_equalTo(self.nickLabel.mas_bottom).offset(10);
make.right.mas_equalTo(self.contentView).offset(-15);
}];
[self.dateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self.contentView).offset(-10);
make.centerY.mas_equalTo(self.nickLabel);
}];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.nickLabel);
make.right.mas_equalTo(self.contentView).offset(-10);
make.height.mas_equalTo(0.5);
make.bottom.mas_equalTo(self.contentView);
}];
}
#pragma mark - Getters And Setters
- (void)setReplyInfo:(MonentsReplyModel *)replyInfo {
_replyInfo = replyInfo;
if (_replyInfo) {
self.avatarImageView.imageUrl = _replyInfo.avatar;
NSString * nick = _replyInfo.nick;
if (nick.length > 8) {
nick = [nick substringToIndex:8];
}
self.nickLabel.text = nick;
self.dateLabel.text = _replyInfo.publishTime;
self.contentLabel.attributedText = _replyInfo.contentAttribute;
}
}
- (NetImageView *)avatarImageView {
if (!_avatarImageView) {
NetImageConfig * config = [[NetImageConfig alloc]init];
config.imageType = ImageTypeUserIcon;
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
_avatarImageView.layer.masksToBounds = YES;
_avatarImageView.layer.cornerRadius = 30/2.0;
_avatarImageView.layer.borderColor = [ThemeColor appMainColor].CGColor;
}
return _avatarImageView;
}
- (UILabel *)nickLabel {
if (!_nickLabel) {
_nickLabel = [[UILabel alloc] init];
_nickLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
_nickLabel.textColor = [ThemeColor mainTextColor];
}
return _nickLabel;
}
- (YYLabel *)contentLabel {
if (!_contentLabel) {
_contentLabel = [[YYLabel alloc] init];
_contentLabel.preferredMaxLayoutWidth = KMONENTS_COMMENT_REPLY_MAX_WIDTH;
_contentLabel.numberOfLines = 0;
}
return _contentLabel;
}
- (UILabel *)dateLabel {
if (!_dateLabel) {
_dateLabel = [[UILabel alloc] init];
_dateLabel.font = [UIFont systemFontOfSize:12];
_dateLabel.textColor = [ThemeColor textThirdColor];
}
return _dateLabel;
}
- (UIView *)lineView {
if (!_lineView) {
_lineView = [[UIView alloc] init];
_lineView.backgroundColor = [ThemeColor dividerColor];
}
return _lineView;
}
@end

View File

@@ -71,9 +71,9 @@
- (void)setMonentsInfo:(MonentsInfoModel *)monentsInfo {
_monentsInfo = monentsInfo;
if (_monentsInfo) {
if (_monentsInfo.topicId > 0) {
if (_monentsInfo.worldId > 0) {
self.topicImageView.hidden = NO;
self.topicLabel.text = _monentsInfo.topicName;
self.topicLabel.text = _monentsInfo.worldName;
} else {
self.topicImageView.hidden = YES;
}

View File

@@ -0,0 +1,16 @@
//
// XPMonentsDetailViewController.h
// xplan-ios
//
// Created by 冯硕 on 2022/6/22.
//
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
@class MonentsInfoModel;
@interface XPMonentsDetailViewController : MvpViewController
@property (nonatomic,strong) MonentsInfoModel *monentsInfo;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,180 @@
//
// XPMonentsDetailViewController.m
// xplan-ios
//
// Created by on 2022/6/22.
//
#import "XPMonentsDetailViewController.h"
///Third
#import <Masonry/Masonry.h>
#import <MJRefresh/MJRefresh.h>
///Tool
#import "XPMonentsLayoutConfig.h"
#import "ThemeColor.h"
///Model
#import "MonentsInfoModel.h"
#import "MonentsCommentModel.h"
///View
#import "XPMonentsTableViewCell.h"
#import "XPMonentsCommentTableViewCell.h"
#import "XPMonentsEmptyTableViewCell.h"
///P
#import "XPMonentDetailPresenter.h"
#import "XPMonentsDetailProtocol.h"
@interface XPMonentsDetailViewController ()<UITableViewDelegate, UITableViewDataSource, XPMonentsDetailProtocol>
///
@property (nonatomic,strong) UITableView *tableView;
///
@property (nonatomic,strong) NSMutableArray *datasource;
@end
@implementation XPMonentsDetailViewController
- (__kindof id)createPresenter {
return [[XPMonentDetailPresenter alloc] init];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self initHeaderAndFooterRrfresh];
[self initSubViews];
[self initSubViewConstraints];
}
#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];
}
- (void)headerRefresh {
[self.presenter getMonentsDetail:self.monentsInfo.dynamicId];
[self.presenter getMonentsCommentList:self.monentsInfo.dynamicId timestamp:@"" status:0];
}
- (void)footerRefresh {
NSString *timestamp = @"";
if (self.datasource.count > 0) {
MonentsCommentModel * commentInfo = [self.datasource lastObject];
timestamp = commentInfo.publishTime;
}
[self.presenter getMonentsCommentList:self.monentsInfo.dynamicId timestamp:timestamp status:0];
}
#pragma mark - Private Method
- (void)initSubViews {
self.title = @"详情";
[self.view addSubview:self.tableView];
}
- (void)initSubViewConstraints {
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view);
}];
}
#pragma mark - UITableViewDelegate And UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section == 0) {
return 1;
}
return self.datasource.count > 0 ? self.datasource.count : 1;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
[XPMonentsLayoutConfig layoutMonentsModel:self.monentsInfo];
return self.monentsInfo.rowHeight;
} else if(indexPath.section == 1) {
if (self.datasource.count > 0) {
MonentsCommentModel * commentInfo = [self.datasource objectAtIndex:indexPath.row];
return [XPMonentsLayoutConfig commentCommentRowHeight:commentInfo];
} else {
return 400;
}
}
return 0;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section ==0) {
XPMonentsTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsTableViewCell class])];
cell.monentsInfo = self.monentsInfo;
return cell;
} else {
if (self.datasource.count > 0) {
XPMonentsCommentTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsCommentTableViewCell class])];
cell.commentInfo = [self.datasource objectAtIndex:indexPath.row];
return cell;
} else {
XPMonentsEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
return cell;
}
}
}
#pragma mark - XPMonentsDetailProtocol
- (void)getMonentsDetailSuccess:(MonentsInfoModel *)commentInfo {
self.monentsInfo = commentInfo;
[self.tableView reloadData];
}
- (void)getMonentsCommentListSuccess:(MonentsCommentListModel *)commentInfo state:(int)state{
if (state == 0) {
[self.datasource removeAllObjects];
[self.tableView.mj_header endRefreshing];
} else {
[self.tableView.mj_footer endRefreshing];
}
if (commentInfo.commentList.count > 0) {
[self.datasource addObjectsFromArray:commentInfo.commentList];
}
[self.tableView reloadData];
}
#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:[XPMonentsCommentTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMonentsCommentTableViewCell class])];
[_tableView registerClass:[XPMonentsEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
}
return _tableView;
}
- (NSMutableArray *)datasource {
if (!_datasource) {
_datasource = [NSMutableArray array];
}
return _datasource;
}
@end

View File

@@ -21,6 +21,7 @@
///View
#import "XPMonentsTableViewCell.h"
#import "XPMonentsEmptyTableViewCell.h"
#import "XPMonentsDetailViewController.h"
@interface XPMonentsLatestViewController ()<UITableViewDelegate, UITableViewDataSource,XPMonentsLatestProtocol>
///
@@ -120,6 +121,16 @@
XPMonentsEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if (self.datasource.count > 0) {
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.datasource objectAtIndex:indexPath.row];
detailVC.monentsInfo = monentsInfo;
[self.navigationController pushViewController:detailVC animated:YES];
}
}
#pragma mark -JXCategoryListContainerViewDelegate
- (UIView *)listView {
return self.view;

View File

@@ -22,6 +22,7 @@
#import "XPMonentsTableViewCell.h"
#import "XPMonentsEmptyTableViewCell.h"
#import "XPMonentsRecommendHeaderView.h"
#import "XPMonentsDetailViewController.h"
@interface XPMonentsRecommendViewController ()<UITableViewDelegate, UITableViewDataSource,XPMonentsRecommendProtocol>
///
@@ -123,6 +124,16 @@
XPMonentsEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMonentsEmptyTableViewCell class])];
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if (self.datasource.count > 0) {
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.datasource objectAtIndex:indexPath.row];
detailVC.monentsInfo = monentsInfo;
[self.navigationController pushViewController:detailVC animated:YES];
}
}
#pragma mark -JXCategoryListContainerViewDelegate
- (UIView *)listView {
return self.view;