提交修改部分文件名和属性名
This commit is contained in:
@@ -7,27 +7,27 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
23270C292B0E037300B9303B /* MessageConentAudioView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C272B0E037300B9303B /* MessageConentAudioView.m */; };
|
||||
23270C2C2B0E041300B9303B /* MessageAudioCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C2B2B0E041300B9303B /* MessageAudioCenter.m */; };
|
||||
23270C292B0E037300B9303B /* CHMessageConentAudioView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C272B0E037300B9303B /* CHMessageConentAudioView.m */; };
|
||||
23270C2C2B0E041300B9303B /* CHMessageAudioCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C2B2B0E041300B9303B /* CHMessageAudioCenter.m */; };
|
||||
23270C302B0E071B00B9303B /* MewPaymentAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23270C2F2B0E071B00B9303B /* MewPaymentAction.swift */; };
|
||||
23270C342B0EFD9A00B9303B /* NewEncryptTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C332B0EFD9A00B9303B /* NewEncryptTool.m */; };
|
||||
233757562B0CB577001D0B7F /* MessagePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757262B0CB577001D0B7F /* MessagePresenter.m */; };
|
||||
233757562B0CB577001D0B7F /* CHMessagePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757262B0CB577001D0B7F /* CHMessagePresenter.m */; };
|
||||
233757572B0CB577001D0B7F /* MessageMenuModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337572C2B0CB577001D0B7F /* MessageMenuModel.m */; };
|
||||
233757582B0CB577001D0B7F /* ChatLimitModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337572D2B0CB577001D0B7F /* ChatLimitModel.m */; };
|
||||
233757592B0CB577001D0B7F /* NIMBadgeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757312B0CB577001D0B7F /* NIMBadgeView.m */; };
|
||||
2337575A2B0CB577001D0B7F /* UITableView+NIMScrollToBottom.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757342B0CB577001D0B7F /* UITableView+NIMScrollToBottom.m */; };
|
||||
2337575B2B0CB577001D0B7F /* UIView+NIM.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757362B0CB577001D0B7F /* UIView+NIM.m */; };
|
||||
2337575C2B0CB577001D0B7F /* SessionMessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757392B0CB577001D0B7F /* SessionMessageCell.m */; };
|
||||
2337575D2B0CB577001D0B7F /* SessionToolbarView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337573B2B0CB577001D0B7F /* SessionToolbarView.m */; };
|
||||
2337575C2B0CB577001D0B7F /* CHSessionMessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757392B0CB577001D0B7F /* CHSessionMessageCell.m */; };
|
||||
2337575D2B0CB577001D0B7F /* CHSessionToolbarView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337573B2B0CB577001D0B7F /* CHSessionToolbarView.m */; };
|
||||
2337575E2B0CB577001D0B7F /* NIMMessageMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337573C2B0CB577001D0B7F /* NIMMessageMaker.m */; };
|
||||
2337575F2B0CB577001D0B7F /* SessionInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337573D2B0CB577001D0B7F /* SessionInfoViewController.m */; };
|
||||
2337575F2B0CB577001D0B7F /* CHSessionInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337573D2B0CB577001D0B7F /* CHSessionInfoViewController.m */; };
|
||||
233757602B0CB577001D0B7F /* SessionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337573E2B0CB577001D0B7F /* SessionViewController.m */; };
|
||||
233757612B0CB577001D0B7F /* MessageToolMenuCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757402B0CB577001D0B7F /* MessageToolMenuCollectionViewCell.m */; };
|
||||
233757622B0CB577001D0B7F /* MessageContentImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757412B0CB577001D0B7F /* MessageContentImage.m */; };
|
||||
233757632B0CB577001D0B7F /* MessageContentUnSupportView.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757472B0CB577001D0B7F /* MessageContentUnSupportView.m */; };
|
||||
233757642B0CB577001D0B7F /* MessageContentText.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757482B0CB577001D0B7F /* MessageContentText.m */; };
|
||||
233757652B0CB577001D0B7F /* SessionNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757492B0CB577001D0B7F /* SessionNavView.m */; };
|
||||
233757662B0CB577001D0B7F /* SessionAudioRecordView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337574F2B0CB577001D0B7F /* SessionAudioRecordView.m */; };
|
||||
233757612B0CB577001D0B7F /* CHMessageToolMenuCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757402B0CB577001D0B7F /* CHMessageToolMenuCollectionViewCell.m */; };
|
||||
233757622B0CB577001D0B7F /* CHMessageContentImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757412B0CB577001D0B7F /* CHMessageContentImage.m */; };
|
||||
233757632B0CB577001D0B7F /* CHMessageContentUnSupportView.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757472B0CB577001D0B7F /* CHMessageContentUnSupportView.m */; };
|
||||
233757642B0CB577001D0B7F /* CHMessageContentText.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757482B0CB577001D0B7F /* CHMessageContentText.m */; };
|
||||
233757652B0CB577001D0B7F /* CHSessionNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757492B0CB577001D0B7F /* CHSessionNavView.m */; };
|
||||
233757662B0CB577001D0B7F /* CHSessionAudioRecordView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337574F2B0CB577001D0B7F /* CHSessionAudioRecordView.m */; };
|
||||
233757672B0CB577001D0B7F /* Api+Message.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757512B0CB577001D0B7F /* Api+Message.m */; };
|
||||
233757682B0CB577001D0B7F /* NIMMessageUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757542B0CB577001D0B7F /* NIMMessageUtils.m */; };
|
||||
2337576B2B0CB630001D0B7F /* UIView+FilletCorner.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337576A2B0CB630001D0B7F /* UIView+FilletCorner.m */; };
|
||||
@@ -104,7 +104,7 @@
|
||||
8C9C841C2B0C697A00A601BC /* RoomInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C82F52B0C697A00A601BC /* RoomInfoModel.m */; };
|
||||
8C9C841D2B0C697A00A601BC /* ThemeColor+Room.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C82F92B0C697A00A601BC /* ThemeColor+Room.m */; };
|
||||
8C9C841E2B0C697A00A601BC /* YMRoomSendTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C82FB2B0C697A00A601BC /* YMRoomSendTextView.m */; };
|
||||
8C9C841F2B0C697A00A601BC /* StageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C82FE2B0C697A00A601BC /* StageView.m */; };
|
||||
8C9C841F2B0C697A00A601BC /* CHStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C82FE2B0C697A00A601BC /* CHStageView.m */; };
|
||||
8C9C84202B0C697A00A601BC /* MicroView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83022B0C697A00A601BC /* MicroView.m */; };
|
||||
8C9C84212B0C697A00A601BC /* MicroQueueModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83052B0C697A00A601BC /* MicroQueueModel.m */; };
|
||||
8C9C84222B0C697A00A601BC /* MicroExtModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83062B0C697A00A601BC /* MicroExtModel.m */; };
|
||||
@@ -114,7 +114,6 @@
|
||||
8C9C84262B0C697A00A601BC /* YMMessageRemoteExtModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83122B0C697A00A601BC /* YMMessageRemoteExtModel.m */; };
|
||||
8C9C84272B0C697A00A601BC /* YMNetImageYYLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83162B0C697A00A601BC /* YMNetImageYYLabel.m */; };
|
||||
8C9C84282B0C697A00A601BC /* YMRoomMessageParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C831A2B0C697A00A601BC /* YMRoomMessageParser.m */; };
|
||||
8C9C84292B0C697A00A601BC /* YMRoomMiniManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C831E2B0C697A00A601BC /* YMRoomMiniManager.m */; };
|
||||
8C9C842A2B0C697A00A601BC /* Api+Room.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83212B0C697A00A601BC /* Api+Room.m */; };
|
||||
8C9C84302B0C697A00A601BC /* MewSessionListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83342B0C697A00A601BC /* MewSessionListTableViewCell.m */; };
|
||||
8C9C84312B0C697A00A601BC /* MewSessionListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83352B0C697A00A601BC /* MewSessionListViewController.m */; };
|
||||
@@ -193,29 +192,27 @@
|
||||
8C9C84972B0D65E200A601BC /* YMRoomAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84962B0D65E200A601BC /* YMRoomAnimationView.m */; };
|
||||
8C9C849A2B0D675600A601BC /* YMRoomGiftAnimationParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84992B0D675600A601BC /* YMRoomGiftAnimationParser.m */; };
|
||||
8C9C849E2B0D6A5C00A601BC /* YMGiftStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C849D2B0D6A5C00A601BC /* YMGiftStorage.m */; };
|
||||
8C9C84A32B0D894100A601BC /* RoomFaceSendInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84A22B0D894100A601BC /* RoomFaceSendInfoModel.m */; };
|
||||
8C9C84A72B0D920700A601BC /* MicroWaveView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84A62B0D920700A601BC /* MicroWaveView.m */; };
|
||||
8C9C84AA2B0D930B00A601BC /* MicroNobleWaveView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84A92B0D930B00A601BC /* MicroNobleWaveView.m */; };
|
||||
8C9C84AD2B0D9AB900A601BC /* XPRoomMessageHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84AC2B0D9AB900A601BC /* XPRoomMessageHeaderView.m */; };
|
||||
8C9C84AD2B0D9AB900A601BC /* CHRoomMessageHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84AC2B0D9AB900A601BC /* CHRoomMessageHeaderView.m */; };
|
||||
8C9C84B12B0DEAE100A601BC /* YMIButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84B02B0DEAE100A601BC /* YMIButton.m */; };
|
||||
8C9C84B42B0E951200A601BC /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C9C84B32B0E951200A601BC /* StoreKit.framework */; };
|
||||
8C9C84BA2B0ECD2100A601BC /* MineRechargePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84B92B0ECD2100A601BC /* MineRechargePresenter.m */; };
|
||||
8CAB96F52B1AB15200ED8639 /* CHRoomAnimationGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CAB96F42B1AB15200ED8639 /* CHRoomAnimationGroup.m */; };
|
||||
FFDAAB800AD6BB4653B4427F /* Pods_yinmeng_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1797344FB85F47F60D0CC2A0 /* Pods_yinmeng_ios.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1797344FB85F47F60D0CC2A0 /* Pods_yinmeng_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_yinmeng_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
23270C272B0E037300B9303B /* MessageConentAudioView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageConentAudioView.m; sourceTree = "<group>"; };
|
||||
23270C282B0E037300B9303B /* MessageConentAudioView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageConentAudioView.h; sourceTree = "<group>"; };
|
||||
23270C2A2B0E041300B9303B /* MessageAudioCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageAudioCenter.h; sourceTree = "<group>"; };
|
||||
23270C2B2B0E041300B9303B /* MessageAudioCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageAudioCenter.m; sourceTree = "<group>"; };
|
||||
23270C272B0E037300B9303B /* CHMessageConentAudioView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMessageConentAudioView.m; sourceTree = "<group>"; };
|
||||
23270C282B0E037300B9303B /* CHMessageConentAudioView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageConentAudioView.h; sourceTree = "<group>"; };
|
||||
23270C2A2B0E041300B9303B /* CHMessageAudioCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageAudioCenter.h; sourceTree = "<group>"; };
|
||||
23270C2B2B0E041300B9303B /* CHMessageAudioCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMessageAudioCenter.m; sourceTree = "<group>"; };
|
||||
23270C2E2B0E071B00B9303B /* yinmeng-ios-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "yinmeng-ios-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
23270C2F2B0E071B00B9303B /* MewPaymentAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MewPaymentAction.swift; sourceTree = "<group>"; };
|
||||
23270C322B0EFD9A00B9303B /* NewEncryptTool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NewEncryptTool.h; sourceTree = "<group>"; };
|
||||
23270C332B0EFD9A00B9303B /* NewEncryptTool.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NewEncryptTool.m; sourceTree = "<group>"; };
|
||||
233757262B0CB577001D0B7F /* MessagePresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessagePresenter.m; sourceTree = "<group>"; };
|
||||
233757272B0CB577001D0B7F /* MessagePresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessagePresenter.h; sourceTree = "<group>"; };
|
||||
233757292B0CB577001D0B7F /* MessageProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageProtocol.h; sourceTree = "<group>"; };
|
||||
233757262B0CB577001D0B7F /* CHMessagePresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMessagePresenter.m; sourceTree = "<group>"; };
|
||||
233757272B0CB577001D0B7F /* CHMessagePresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessagePresenter.h; sourceTree = "<group>"; };
|
||||
233757292B0CB577001D0B7F /* CHMessageProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageProtocol.h; sourceTree = "<group>"; };
|
||||
2337572B2B0CB577001D0B7F /* ChatLimitModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatLimitModel.h; sourceTree = "<group>"; };
|
||||
2337572C2B0CB577001D0B7F /* MessageMenuModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageMenuModel.m; sourceTree = "<group>"; };
|
||||
2337572D2B0CB577001D0B7F /* ChatLimitModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatLimitModel.m; sourceTree = "<group>"; };
|
||||
@@ -226,29 +223,29 @@
|
||||
233757342B0CB577001D0B7F /* UITableView+NIMScrollToBottom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITableView+NIMScrollToBottom.m"; sourceTree = "<group>"; };
|
||||
233757352B0CB577001D0B7F /* NIMBadgeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMBadgeView.h; sourceTree = "<group>"; };
|
||||
233757362B0CB577001D0B7F /* UIView+NIM.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+NIM.m"; sourceTree = "<group>"; };
|
||||
233757382B0CB577001D0B7F /* SessionNavView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionNavView.h; sourceTree = "<group>"; };
|
||||
233757392B0CB577001D0B7F /* SessionMessageCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionMessageCell.m; sourceTree = "<group>"; };
|
||||
2337573A2B0CB577001D0B7F /* SessionAudioRecordView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionAudioRecordView.h; sourceTree = "<group>"; };
|
||||
2337573B2B0CB577001D0B7F /* SessionToolbarView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionToolbarView.m; sourceTree = "<group>"; };
|
||||
233757382B0CB577001D0B7F /* CHSessionNavView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHSessionNavView.h; sourceTree = "<group>"; };
|
||||
233757392B0CB577001D0B7F /* CHSessionMessageCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHSessionMessageCell.m; sourceTree = "<group>"; };
|
||||
2337573A2B0CB577001D0B7F /* CHSessionAudioRecordView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHSessionAudioRecordView.h; sourceTree = "<group>"; };
|
||||
2337573B2B0CB577001D0B7F /* CHSessionToolbarView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHSessionToolbarView.m; sourceTree = "<group>"; };
|
||||
2337573C2B0CB577001D0B7F /* NIMMessageMaker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NIMMessageMaker.m; sourceTree = "<group>"; };
|
||||
2337573D2B0CB577001D0B7F /* SessionInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionInfoViewController.m; sourceTree = "<group>"; };
|
||||
2337573D2B0CB577001D0B7F /* CHSessionInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHSessionInfoViewController.m; sourceTree = "<group>"; };
|
||||
2337573E2B0CB577001D0B7F /* SessionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionViewController.m; sourceTree = "<group>"; };
|
||||
233757402B0CB577001D0B7F /* MessageToolMenuCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageToolMenuCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
233757412B0CB577001D0B7F /* MessageContentImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageContentImage.m; sourceTree = "<group>"; };
|
||||
233757422B0CB577001D0B7F /* MessageContentText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageContentText.h; sourceTree = "<group>"; };
|
||||
233757432B0CB577001D0B7F /* MessageContentUnSupportView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageContentUnSupportView.h; sourceTree = "<group>"; };
|
||||
233757442B0CB577001D0B7F /* MessageToolMenuCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageToolMenuCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
233757452B0CB577001D0B7F /* MessageContentProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageContentProtocol.h; sourceTree = "<group>"; };
|
||||
233757462B0CB577001D0B7F /* MessageContentImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageContentImage.h; sourceTree = "<group>"; };
|
||||
233757472B0CB577001D0B7F /* MessageContentUnSupportView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageContentUnSupportView.m; sourceTree = "<group>"; };
|
||||
233757482B0CB577001D0B7F /* MessageContentText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageContentText.m; sourceTree = "<group>"; };
|
||||
233757492B0CB577001D0B7F /* SessionNavView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionNavView.m; sourceTree = "<group>"; };
|
||||
2337574A2B0CB577001D0B7F /* SessionMessageCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionMessageCell.h; sourceTree = "<group>"; };
|
||||
233757402B0CB577001D0B7F /* CHMessageToolMenuCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMessageToolMenuCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
233757412B0CB577001D0B7F /* CHMessageContentImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMessageContentImage.m; sourceTree = "<group>"; };
|
||||
233757422B0CB577001D0B7F /* CHMessageContentText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageContentText.h; sourceTree = "<group>"; };
|
||||
233757432B0CB577001D0B7F /* CHMessageContentUnSupportView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageContentUnSupportView.h; sourceTree = "<group>"; };
|
||||
233757442B0CB577001D0B7F /* CHMessageToolMenuCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageToolMenuCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
233757452B0CB577001D0B7F /* CHMessageContentProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageContentProtocol.h; sourceTree = "<group>"; };
|
||||
233757462B0CB577001D0B7F /* CHMessageContentImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHMessageContentImage.h; sourceTree = "<group>"; };
|
||||
233757472B0CB577001D0B7F /* CHMessageContentUnSupportView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMessageContentUnSupportView.m; sourceTree = "<group>"; };
|
||||
233757482B0CB577001D0B7F /* CHMessageContentText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHMessageContentText.m; sourceTree = "<group>"; };
|
||||
233757492B0CB577001D0B7F /* CHSessionNavView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHSessionNavView.m; sourceTree = "<group>"; };
|
||||
2337574A2B0CB577001D0B7F /* CHSessionMessageCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHSessionMessageCell.h; sourceTree = "<group>"; };
|
||||
2337574B2B0CB577001D0B7F /* SessionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionViewController.h; sourceTree = "<group>"; };
|
||||
2337574C2B0CB577001D0B7F /* SessionInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionInfoViewController.h; sourceTree = "<group>"; };
|
||||
2337574C2B0CB577001D0B7F /* CHSessionInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHSessionInfoViewController.h; sourceTree = "<group>"; };
|
||||
2337574D2B0CB577001D0B7F /* NIMMessageMaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMMessageMaker.h; sourceTree = "<group>"; };
|
||||
2337574E2B0CB577001D0B7F /* SessionToolbarView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionToolbarView.h; sourceTree = "<group>"; };
|
||||
2337574F2B0CB577001D0B7F /* SessionAudioRecordView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionAudioRecordView.m; sourceTree = "<group>"; };
|
||||
2337574E2B0CB577001D0B7F /* CHSessionToolbarView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHSessionToolbarView.h; sourceTree = "<group>"; };
|
||||
2337574F2B0CB577001D0B7F /* CHSessionAudioRecordView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHSessionAudioRecordView.m; sourceTree = "<group>"; };
|
||||
233757512B0CB577001D0B7F /* Api+Message.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Api+Message.m"; sourceTree = "<group>"; };
|
||||
233757522B0CB577001D0B7F /* Api+Message.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Api+Message.h"; sourceTree = "<group>"; };
|
||||
233757542B0CB577001D0B7F /* NIMMessageUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NIMMessageUtils.m; sourceTree = "<group>"; };
|
||||
@@ -408,7 +405,7 @@
|
||||
8C9C82F92B0C697A00A601BC /* ThemeColor+Room.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ThemeColor+Room.m"; sourceTree = "<group>"; };
|
||||
8C9C82FB2B0C697A00A601BC /* YMRoomSendTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YMRoomSendTextView.m; sourceTree = "<group>"; };
|
||||
8C9C82FC2B0C697A00A601BC /* YMRoomSendTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMRoomSendTextView.h; sourceTree = "<group>"; };
|
||||
8C9C82FE2B0C697A00A601BC /* StageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StageView.m; sourceTree = "<group>"; };
|
||||
8C9C82FE2B0C697A00A601BC /* CHStageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHStageView.m; sourceTree = "<group>"; };
|
||||
8C9C83002B0C697A00A601BC /* MicroView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicroView.h; sourceTree = "<group>"; };
|
||||
8C9C83012B0C697A00A601BC /* MicroViewProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicroViewProtocol.h; sourceTree = "<group>"; };
|
||||
8C9C83022B0C697A00A601BC /* MicroView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MicroView.m; sourceTree = "<group>"; };
|
||||
@@ -418,9 +415,8 @@
|
||||
8C9C83072B0C697A00A601BC /* MicroStateModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MicroStateModel.m; sourceTree = "<group>"; };
|
||||
8C9C83082B0C697A00A601BC /* MicroExtModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicroExtModel.h; sourceTree = "<group>"; };
|
||||
8C9C83092B0C697A00A601BC /* MicroQueueModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MicroQueueModel.h; sourceTree = "<group>"; };
|
||||
8C9C830A2B0C697A00A601BC /* StageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StageView.h; sourceTree = "<group>"; };
|
||||
8C9C830B2B0C697A00A601BC /* RoomGuestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomGuestDelegate.h; sourceTree = "<group>"; };
|
||||
8C9C830C2B0C697A00A601BC /* YMRoomMiniManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMRoomMiniManager.h; sourceTree = "<group>"; };
|
||||
8C9C830A2B0C697A00A601BC /* CHStageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHStageView.h; sourceTree = "<group>"; };
|
||||
8C9C830B2B0C697A00A601BC /* CHRoomGuestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHRoomGuestDelegate.h; sourceTree = "<group>"; };
|
||||
8C9C830E2B0C697A00A601BC /* YMRoomMessageContainerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YMRoomMessageContainerView.m; sourceTree = "<group>"; };
|
||||
8C9C830F2B0C697A00A601BC /* YMRoomMessageContainerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMRoomMessageContainerView.h; sourceTree = "<group>"; };
|
||||
8C9C83112B0C697A00A601BC /* YMMessageInfoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YMMessageInfoModel.m; sourceTree = "<group>"; };
|
||||
@@ -432,9 +428,7 @@
|
||||
8C9C83192B0C697A00A601BC /* YMRoomMessageParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMRoomMessageParser.h; sourceTree = "<group>"; };
|
||||
8C9C831A2B0C697A00A601BC /* YMRoomMessageParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YMRoomMessageParser.m; sourceTree = "<group>"; };
|
||||
8C9C831B2B0C697A00A601BC /* YMRoomMessageConstant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YMRoomMessageConstant.h; sourceTree = "<group>"; };
|
||||
8C9C831C2B0C697A00A601BC /* RoomHostDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomHostDelegate.h; sourceTree = "<group>"; };
|
||||
8C9C831D2B0C697A00A601BC /* ThemeColor+Room.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ThemeColor+Room.h"; sourceTree = "<group>"; };
|
||||
8C9C831E2B0C697A00A601BC /* YMRoomMiniManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YMRoomMiniManager.m; sourceTree = "<group>"; };
|
||||
8C9C83202B0C697A00A601BC /* Api+Room.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Api+Room.h"; sourceTree = "<group>"; };
|
||||
8C9C83212B0C697A00A601BC /* Api+Room.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Api+Room.m"; sourceTree = "<group>"; };
|
||||
8C9C83342B0C697A00A601BC /* MewSessionListTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewSessionListTableViewCell.m; sourceTree = "<group>"; };
|
||||
@@ -602,15 +596,9 @@
|
||||
8C9C84992B0D675600A601BC /* YMRoomGiftAnimationParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YMRoomGiftAnimationParser.m; sourceTree = "<group>"; };
|
||||
8C9C849C2B0D6A5C00A601BC /* YMGiftStorage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YMGiftStorage.h; sourceTree = "<group>"; };
|
||||
8C9C849D2B0D6A5C00A601BC /* YMGiftStorage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YMGiftStorage.m; sourceTree = "<group>"; };
|
||||
8C9C849F2B0D6BCF00A601BC /* RoomAnimationProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomAnimationProtocol.h; sourceTree = "<group>"; };
|
||||
8C9C84A12B0D894100A601BC /* RoomFaceSendInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomFaceSendInfoModel.h; sourceTree = "<group>"; };
|
||||
8C9C84A22B0D894100A601BC /* RoomFaceSendInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomFaceSendInfoModel.m; sourceTree = "<group>"; };
|
||||
8C9C84A52B0D920700A601BC /* MicroWaveView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MicroWaveView.h; sourceTree = "<group>"; };
|
||||
8C9C84A62B0D920700A601BC /* MicroWaveView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MicroWaveView.m; sourceTree = "<group>"; };
|
||||
8C9C84A82B0D930B00A601BC /* MicroNobleWaveView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MicroNobleWaveView.h; sourceTree = "<group>"; };
|
||||
8C9C84A92B0D930B00A601BC /* MicroNobleWaveView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MicroNobleWaveView.m; sourceTree = "<group>"; };
|
||||
8C9C84AB2B0D9AB900A601BC /* XPRoomMessageHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageHeaderView.h; sourceTree = "<group>"; };
|
||||
8C9C84AC2B0D9AB900A601BC /* XPRoomMessageHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMessageHeaderView.m; sourceTree = "<group>"; };
|
||||
8C9C849F2B0D6BCF00A601BC /* CHRoomAnimationProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CHRoomAnimationProtocol.h; sourceTree = "<group>"; };
|
||||
8C9C84AB2B0D9AB900A601BC /* CHRoomMessageHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CHRoomMessageHeaderView.h; sourceTree = "<group>"; };
|
||||
8C9C84AC2B0D9AB900A601BC /* CHRoomMessageHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CHRoomMessageHeaderView.m; sourceTree = "<group>"; };
|
||||
8C9C84AF2B0DEAE100A601BC /* YMIButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YMIButton.h; sourceTree = "<group>"; };
|
||||
8C9C84B02B0DEAE100A601BC /* YMIButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YMIButton.m; sourceTree = "<group>"; };
|
||||
8C9C84B22B0E94FA00A601BC /* yinmeng-ios.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "yinmeng-ios.entitlements"; sourceTree = "<group>"; };
|
||||
@@ -618,6 +606,9 @@
|
||||
8C9C84B82B0ECD2100A601BC /* MineRechargePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MineRechargePresenter.h; sourceTree = "<group>"; };
|
||||
8C9C84B92B0ECD2100A601BC /* MineRechargePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MineRechargePresenter.m; sourceTree = "<group>"; };
|
||||
8C9C84BE2B0ED1D000A601BC /* MineRechargeProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MineRechargeProtocol.h; sourceTree = "<group>"; };
|
||||
8CAB96F22B1A729300ED8639 /* CHRoomHostDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CHRoomHostDelegate.h; sourceTree = "<group>"; };
|
||||
8CAB96F32B1AB15200ED8639 /* CHRoomAnimationGroup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CHRoomAnimationGroup.h; sourceTree = "<group>"; };
|
||||
8CAB96F42B1AB15200ED8639 /* CHRoomAnimationGroup.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CHRoomAnimationGroup.m; sourceTree = "<group>"; };
|
||||
A22C3BCB2715A2E8FDECEA30 /* Pods-yinmeng-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-yinmeng-ios.release.xcconfig"; path = "Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios.release.xcconfig"; sourceTree = "<group>"; };
|
||||
E9E8A33E3FDD457C53D1E6D7 /* Pods-yinmeng-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-yinmeng-ios.debug.xcconfig"; path = "Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
@@ -672,8 +663,8 @@
|
||||
233757252B0CB577001D0B7F /* Presenter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
233757262B0CB577001D0B7F /* MessagePresenter.m */,
|
||||
233757272B0CB577001D0B7F /* MessagePresenter.h */,
|
||||
233757262B0CB577001D0B7F /* CHMessagePresenter.m */,
|
||||
233757272B0CB577001D0B7F /* CHMessagePresenter.h */,
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
@@ -681,7 +672,7 @@
|
||||
233757282B0CB577001D0B7F /* Protocol */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
233757292B0CB577001D0B7F /* MessageProtocol.h */,
|
||||
233757292B0CB577001D0B7F /* CHMessageProtocol.h */,
|
||||
);
|
||||
path = Protocol;
|
||||
sourceTree = "<group>";
|
||||
@@ -722,25 +713,25 @@
|
||||
233757372B0CB577001D0B7F /* Session */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
23270C2A2B0E041300B9303B /* MessageAudioCenter.h */,
|
||||
23270C2B2B0E041300B9303B /* MessageAudioCenter.m */,
|
||||
23270C282B0E037300B9303B /* MessageConentAudioView.h */,
|
||||
23270C272B0E037300B9303B /* MessageConentAudioView.m */,
|
||||
233757382B0CB577001D0B7F /* SessionNavView.h */,
|
||||
233757392B0CB577001D0B7F /* SessionMessageCell.m */,
|
||||
2337573A2B0CB577001D0B7F /* SessionAudioRecordView.h */,
|
||||
2337573B2B0CB577001D0B7F /* SessionToolbarView.m */,
|
||||
23270C2A2B0E041300B9303B /* CHMessageAudioCenter.h */,
|
||||
23270C2B2B0E041300B9303B /* CHMessageAudioCenter.m */,
|
||||
23270C282B0E037300B9303B /* CHMessageConentAudioView.h */,
|
||||
23270C272B0E037300B9303B /* CHMessageConentAudioView.m */,
|
||||
233757382B0CB577001D0B7F /* CHSessionNavView.h */,
|
||||
233757492B0CB577001D0B7F /* CHSessionNavView.m */,
|
||||
2337574A2B0CB577001D0B7F /* CHSessionMessageCell.h */,
|
||||
233757392B0CB577001D0B7F /* CHSessionMessageCell.m */,
|
||||
2337573A2B0CB577001D0B7F /* CHSessionAudioRecordView.h */,
|
||||
2337574F2B0CB577001D0B7F /* CHSessionAudioRecordView.m */,
|
||||
2337574E2B0CB577001D0B7F /* CHSessionToolbarView.h */,
|
||||
2337573B2B0CB577001D0B7F /* CHSessionToolbarView.m */,
|
||||
2337574D2B0CB577001D0B7F /* NIMMessageMaker.h */,
|
||||
2337573C2B0CB577001D0B7F /* NIMMessageMaker.m */,
|
||||
2337573D2B0CB577001D0B7F /* SessionInfoViewController.m */,
|
||||
2337574C2B0CB577001D0B7F /* CHSessionInfoViewController.h */,
|
||||
2337573D2B0CB577001D0B7F /* CHSessionInfoViewController.m */,
|
||||
2337574B2B0CB577001D0B7F /* SessionViewController.h */,
|
||||
2337573E2B0CB577001D0B7F /* SessionViewController.m */,
|
||||
2337573F2B0CB577001D0B7F /* Content */,
|
||||
233757492B0CB577001D0B7F /* SessionNavView.m */,
|
||||
2337574A2B0CB577001D0B7F /* SessionMessageCell.h */,
|
||||
2337574B2B0CB577001D0B7F /* SessionViewController.h */,
|
||||
2337574C2B0CB577001D0B7F /* SessionInfoViewController.h */,
|
||||
2337574D2B0CB577001D0B7F /* NIMMessageMaker.h */,
|
||||
2337574E2B0CB577001D0B7F /* SessionToolbarView.h */,
|
||||
2337574F2B0CB577001D0B7F /* SessionAudioRecordView.m */,
|
||||
);
|
||||
path = Session;
|
||||
sourceTree = "<group>";
|
||||
@@ -748,15 +739,15 @@
|
||||
2337573F2B0CB577001D0B7F /* Content */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
233757402B0CB577001D0B7F /* MessageToolMenuCollectionViewCell.m */,
|
||||
233757412B0CB577001D0B7F /* MessageContentImage.m */,
|
||||
233757422B0CB577001D0B7F /* MessageContentText.h */,
|
||||
233757432B0CB577001D0B7F /* MessageContentUnSupportView.h */,
|
||||
233757442B0CB577001D0B7F /* MessageToolMenuCollectionViewCell.h */,
|
||||
233757452B0CB577001D0B7F /* MessageContentProtocol.h */,
|
||||
233757462B0CB577001D0B7F /* MessageContentImage.h */,
|
||||
233757472B0CB577001D0B7F /* MessageContentUnSupportView.m */,
|
||||
233757482B0CB577001D0B7F /* MessageContentText.m */,
|
||||
233757442B0CB577001D0B7F /* CHMessageToolMenuCollectionViewCell.h */,
|
||||
233757402B0CB577001D0B7F /* CHMessageToolMenuCollectionViewCell.m */,
|
||||
233757462B0CB577001D0B7F /* CHMessageContentImage.h */,
|
||||
233757412B0CB577001D0B7F /* CHMessageContentImage.m */,
|
||||
233757422B0CB577001D0B7F /* CHMessageContentText.h */,
|
||||
233757482B0CB577001D0B7F /* CHMessageContentText.m */,
|
||||
233757432B0CB577001D0B7F /* CHMessageContentUnSupportView.h */,
|
||||
233757472B0CB577001D0B7F /* CHMessageContentUnSupportView.m */,
|
||||
233757452B0CB577001D0B7F /* CHMessageContentProtocol.h */,
|
||||
);
|
||||
path = Content;
|
||||
sourceTree = "<group>";
|
||||
@@ -1355,13 +1346,11 @@
|
||||
8C9C82F92B0C697A00A601BC /* ThemeColor+Room.m */,
|
||||
8C9C82FA2B0C697A00A601BC /* MenuContainerView */,
|
||||
8C9C82FD2B0C697A00A601BC /* StageView */,
|
||||
8C9C830B2B0C697A00A601BC /* RoomGuestDelegate.h */,
|
||||
8C9C830C2B0C697A00A601BC /* YMRoomMiniManager.h */,
|
||||
8C9C830B2B0C697A00A601BC /* CHRoomGuestDelegate.h */,
|
||||
8C9C830D2B0C697A00A601BC /* MessageContainerView */,
|
||||
8C9C831C2B0C697A00A601BC /* RoomHostDelegate.h */,
|
||||
8C9C831D2B0C697A00A601BC /* ThemeColor+Room.h */,
|
||||
8C9C831E2B0C697A00A601BC /* YMRoomMiniManager.m */,
|
||||
8C9C849F2B0D6BCF00A601BC /* RoomAnimationProtocol.h */,
|
||||
8C9C849F2B0D6BCF00A601BC /* CHRoomAnimationProtocol.h */,
|
||||
8CAB96F22B1A729300ED8639 /* CHRoomHostDelegate.h */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
@@ -1378,10 +1367,10 @@
|
||||
8C9C82FD2B0C697A00A601BC /* StageView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8C9C82FE2B0C697A00A601BC /* StageView.m */,
|
||||
8C9C82FF2B0C697A00A601BC /* MicroView */,
|
||||
8C9C83032B0C697A00A601BC /* Model */,
|
||||
8C9C830A2B0C697A00A601BC /* StageView.h */,
|
||||
8C9C830A2B0C697A00A601BC /* CHStageView.h */,
|
||||
8C9C82FE2B0C697A00A601BC /* CHStageView.m */,
|
||||
);
|
||||
path = StageView;
|
||||
sourceTree = "<group>";
|
||||
@@ -1389,7 +1378,6 @@
|
||||
8C9C82FF2B0C697A00A601BC /* MicroView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8C9C84A42B0D91F400A601BC /* Dating */,
|
||||
8C9C83002B0C697A00A601BC /* MicroView.h */,
|
||||
8C9C83012B0C697A00A601BC /* MicroViewProtocol.h */,
|
||||
8C9C83022B0C697A00A601BC /* MicroView.m */,
|
||||
@@ -1418,8 +1406,8 @@
|
||||
8C9C83102B0C697A00A601BC /* Model */,
|
||||
8C9C83152B0C697A00A601BC /* View */,
|
||||
8C9C83182B0C697A00A601BC /* Tool */,
|
||||
8C9C84AB2B0D9AB900A601BC /* XPRoomMessageHeaderView.h */,
|
||||
8C9C84AC2B0D9AB900A601BC /* XPRoomMessageHeaderView.m */,
|
||||
8C9C84AB2B0D9AB900A601BC /* CHRoomMessageHeaderView.h */,
|
||||
8C9C84AC2B0D9AB900A601BC /* CHRoomMessageHeaderView.m */,
|
||||
);
|
||||
path = MessageContainerView;
|
||||
sourceTree = "<group>";
|
||||
@@ -2114,7 +2102,6 @@
|
||||
8C9C84802B0D25C700A601BC /* ModuleKit */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8C9C84A02B0D892C00A601BC /* FaceView */,
|
||||
8C9C84812B0D25D700A601BC /* SendGiftView */,
|
||||
);
|
||||
path = ModuleKit;
|
||||
@@ -2167,6 +2154,8 @@
|
||||
8C9C84962B0D65E200A601BC /* YMRoomAnimationView.m */,
|
||||
8C9C84982B0D675600A601BC /* YMRoomGiftAnimationParser.h */,
|
||||
8C9C84992B0D675600A601BC /* YMRoomGiftAnimationParser.m */,
|
||||
8CAB96F32B1AB15200ED8639 /* CHRoomAnimationGroup.h */,
|
||||
8CAB96F42B1AB15200ED8639 /* CHRoomAnimationGroup.m */,
|
||||
);
|
||||
path = AnimationView;
|
||||
sourceTree = "<group>";
|
||||
@@ -2180,26 +2169,6 @@
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8C9C84A02B0D892C00A601BC /* FaceView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8C9C84A12B0D894100A601BC /* RoomFaceSendInfoModel.h */,
|
||||
8C9C84A22B0D894100A601BC /* RoomFaceSendInfoModel.m */,
|
||||
);
|
||||
path = FaceView;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8C9C84A42B0D91F400A601BC /* Dating */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8C9C84A52B0D920700A601BC /* MicroWaveView.h */,
|
||||
8C9C84A62B0D920700A601BC /* MicroWaveView.m */,
|
||||
8C9C84A82B0D930B00A601BC /* MicroNobleWaveView.h */,
|
||||
8C9C84A92B0D930B00A601BC /* MicroNobleWaveView.m */,
|
||||
);
|
||||
path = Dating;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8C9C84AE2B0DEA9600A601BC /* Button */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -2359,16 +2328,15 @@
|
||||
8C9C843B2B0C697A00A601BC /* TRTCRtcImpl.m in Sources */,
|
||||
8C9C82C32B0C695600A601BC /* YYUtility.m in Sources */,
|
||||
8C9C82C92B0C695600A601BC /* UploadFile.m in Sources */,
|
||||
2337575C2B0CB577001D0B7F /* SessionMessageCell.m in Sources */,
|
||||
2337575C2B0CB577001D0B7F /* CHSessionMessageCell.m in Sources */,
|
||||
8C9C821F2B0C694900A601BC /* AppDelegate.m in Sources */,
|
||||
8C92A8182B0EF3E9008F362C /* MineModifPayPwdView.m in Sources */,
|
||||
8C9C84462B0C697A00A601BC /* YMMineSettingViewController.m in Sources */,
|
||||
8C9C843D2B0C697A00A601BC /* YMMineCollectRoomPresenter.m in Sources */,
|
||||
8C9C82A92B0C695600A601BC /* BaseNavigationController.m in Sources */,
|
||||
8C9C84A72B0D920700A601BC /* MicroWaveView.m in Sources */,
|
||||
8C9C82BC2B0C695600A601BC /* UserInfoModel.m in Sources */,
|
||||
8C9C84602B0C697A00A601BC /* MewVoiceGuideView.m in Sources */,
|
||||
23270C292B0E037300B9303B /* MessageConentAudioView.m in Sources */,
|
||||
23270C292B0E037300B9303B /* CHMessageConentAudioView.m in Sources */,
|
||||
8C9C84312B0C697A00A601BC /* MewSessionListViewController.m in Sources */,
|
||||
8C9C82AB2B0C695600A601BC /* NetImageConfig.m in Sources */,
|
||||
8C9C84892B0D286F00A601BC /* Api+Gift.m in Sources */,
|
||||
@@ -2376,6 +2344,7 @@
|
||||
8C9C843A2B0C697A00A601BC /* BaseRtcImpl.m in Sources */,
|
||||
8C9C84672B0C697A00A601BC /* MewHeaderView.m in Sources */,
|
||||
8C9C84662B0C697A00A601BC /* MewUserIntroductionView.m in Sources */,
|
||||
8CAB96F52B1AB15200ED8639 /* CHRoomAnimationGroup.m in Sources */,
|
||||
8C9C82C42B0C695600A601BC /* YYUtility+Carrier.m in Sources */,
|
||||
8C9C84172B0C697A00A601BC /* YMWebViewController.m in Sources */,
|
||||
8C92A8232B0FE1DC008F362C /* MewHtmlUrl.m in Sources */,
|
||||
@@ -2387,10 +2356,10 @@
|
||||
8C9C84592B0C697A00A601BC /* TabbarViewController.m in Sources */,
|
||||
8C9C82BE2B0C695600A601BC /* LoginTicketInfo.m in Sources */,
|
||||
8C9C84542B0C697A00A601BC /* LoginInputView.m in Sources */,
|
||||
233757632B0CB577001D0B7F /* MessageContentUnSupportView.m in Sources */,
|
||||
233757632B0CB577001D0B7F /* CHMessageContentUnSupportView.m in Sources */,
|
||||
2337575E2B0CB577001D0B7F /* NIMMessageMaker.m in Sources */,
|
||||
8C9C82B92B0C695600A601BC /* NSObject+AutoCoding.m in Sources */,
|
||||
233757622B0CB577001D0B7F /* MessageContentImage.m in Sources */,
|
||||
233757622B0CB577001D0B7F /* CHMessageContentImage.m in Sources */,
|
||||
8C9C84772B0C697A00A601BC /* MewLoginPhoneView.m in Sources */,
|
||||
8C9C84692B0C697A00A601BC /* YMHomeFilterView.m in Sources */,
|
||||
8C9C84532B0C697A00A601BC /* LoginForgetPasswordViewController.m in Sources */,
|
||||
@@ -2403,7 +2372,7 @@
|
||||
8C9C843F2B0C697A00A601BC /* FansInfoModel.m in Sources */,
|
||||
8C9C84712B0C697A00A601BC /* MewPartyModel.m in Sources */,
|
||||
8C9C82BF2B0C695600A601BC /* AccountModel.m in Sources */,
|
||||
233757652B0CB577001D0B7F /* SessionNavView.m in Sources */,
|
||||
233757652B0CB577001D0B7F /* CHSessionNavView.m in Sources */,
|
||||
8C9C84722B0C697A00A601BC /* MewPartyListCollectionViewCell.m in Sources */,
|
||||
8C9C846F2B0C697A00A601BC /* MewRoomMessageTableCell.m in Sources */,
|
||||
8C9C84282B0C697A00A601BC /* YMRoomMessageParser.m in Sources */,
|
||||
@@ -2412,12 +2381,12 @@
|
||||
233757592B0CB577001D0B7F /* NIMBadgeView.m in Sources */,
|
||||
8C9C846D2B0C697A00A601BC /* MewRoomRightView.m in Sources */,
|
||||
8C9C84582B0C697A00A601BC /* MainPresenter.m in Sources */,
|
||||
233757562B0CB577001D0B7F /* MessagePresenter.m in Sources */,
|
||||
233757562B0CB577001D0B7F /* CHMessagePresenter.m in Sources */,
|
||||
8C9C84512B0C697A00A601BC /* LoginPasswordPresent.m in Sources */,
|
||||
8C9C841F2B0C697A00A601BC /* StageView.m in Sources */,
|
||||
8C9C841F2B0C697A00A601BC /* CHStageView.m in Sources */,
|
||||
8C9C844D2B0C697A00A601BC /* LoginForgetPasswordPresent.m in Sources */,
|
||||
8C9C82C12B0C695600A601BC /* Api.m in Sources */,
|
||||
23270C2C2B0E041300B9303B /* MessageAudioCenter.m in Sources */,
|
||||
23270C2C2B0E041300B9303B /* CHMessageAudioCenter.m in Sources */,
|
||||
8C9C844A2B0C697A00A601BC /* Api+Mine.m in Sources */,
|
||||
8C9C82A82B0C695600A601BC /* BaseViewController.m in Sources */,
|
||||
8C9C82C72B0C695600A601BC /* NSMutableDictionary+Safe.m in Sources */,
|
||||
@@ -2425,7 +2394,7 @@
|
||||
8C9C84782B0C697A00A601BC /* MewLoginPasswordView.m in Sources */,
|
||||
8C9C84622B0C697A00A601BC /* MewVoiceDiscView.m in Sources */,
|
||||
8C9C82AE2B0C695600A601BC /* TTPopup.m in Sources */,
|
||||
8C9C84AD2B0D9AB900A601BC /* XPRoomMessageHeaderView.m in Sources */,
|
||||
8C9C84AD2B0D9AB900A601BC /* CHRoomMessageHeaderView.m in Sources */,
|
||||
8C9C84442B0C697A00A601BC /* YMMineCollectRoomCell.m in Sources */,
|
||||
8C9C82B52B0C695600A601BC /* TTActionSheetView.m in Sources */,
|
||||
8C9C82B32B0C695600A601BC /* TTPopupManagerService.m in Sources */,
|
||||
@@ -2443,7 +2412,6 @@
|
||||
23270C342B0EFD9A00B9303B /* NewEncryptTool.m in Sources */,
|
||||
8C9C844F2B0C697A00A601BC /* LoginFullInfoPresenter.m in Sources */,
|
||||
8C9C82D22B0C695600A601BC /* YMIAPHelper.m in Sources */,
|
||||
8C9C84A32B0D894100A601BC /* RoomFaceSendInfoModel.m in Sources */,
|
||||
8C9C84222B0C697A00A601BC /* MicroExtModel.m in Sources */,
|
||||
8C9C843C2B0C697A00A601BC /* RtcManager.m in Sources */,
|
||||
8C9C84BA2B0ECD2100A601BC /* MineRechargePresenter.m in Sources */,
|
||||
@@ -2453,7 +2421,7 @@
|
||||
8C9C84732B0C697A00A601BC /* MewPartyViewController.m in Sources */,
|
||||
8C9C82D32B0C695600A601BC /* YYReachability.m in Sources */,
|
||||
8C4D53622AFD4CF700238AE6 /* main.m in Sources */,
|
||||
233757642B0CB577001D0B7F /* MessageContentText.m in Sources */,
|
||||
233757642B0CB577001D0B7F /* CHMessageContentText.m in Sources */,
|
||||
8C9C84242B0C697A00A601BC /* YMRoomMessageContainerView.m in Sources */,
|
||||
8C9C84612B0C697A00A601BC /* MewPushExclusiveVoiceView.m in Sources */,
|
||||
8C9C845D2B0C697A00A601BC /* MewHomePresenter.m in Sources */,
|
||||
@@ -2475,16 +2443,14 @@
|
||||
8C9C845E2B0C697A00A601BC /* AudioPlayerManager.m in Sources */,
|
||||
8C9C848C2B0D2B8500A601BC /* GiftReceiveInfoModel.m in Sources */,
|
||||
8C9C84572B0C697A00A601BC /* Api+Login.m in Sources */,
|
||||
2337575D2B0CB577001D0B7F /* SessionToolbarView.m in Sources */,
|
||||
2337575D2B0CB577001D0B7F /* CHSessionToolbarView.m in Sources */,
|
||||
8C9C82CB2B0C695600A601BC /* TimeIntervalUtils.m in Sources */,
|
||||
8C9C84192B0C697A00A601BC /* HomeRecommendRoomModel.m in Sources */,
|
||||
233757612B0CB577001D0B7F /* MessageToolMenuCollectionViewCell.m in Sources */,
|
||||
233757612B0CB577001D0B7F /* CHMessageToolMenuCollectionViewCell.m in Sources */,
|
||||
8C9C82B62B0C695600A601BC /* TTPopupService.m in Sources */,
|
||||
233757662B0CB577001D0B7F /* SessionAudioRecordView.m in Sources */,
|
||||
233757662B0CB577001D0B7F /* CHSessionAudioRecordView.m in Sources */,
|
||||
233757672B0CB577001D0B7F /* Api+Message.m in Sources */,
|
||||
8C9C841A2B0C697A00A601BC /* Api+Home.m in Sources */,
|
||||
8C9C84AA2B0D930B00A601BC /* MicroNobleWaveView.m in Sources */,
|
||||
8C9C84292B0C697A00A601BC /* YMRoomMiniManager.m in Sources */,
|
||||
8C9C82AD2B0C695600A601BC /* YMEmptyTableViewCell.m in Sources */,
|
||||
8C9C845F2B0C697A00A601BC /* MewHomeViewController.m in Sources */,
|
||||
8C9C84422B0C697A00A601BC /* RechargeListModel.m in Sources */,
|
||||
@@ -2525,7 +2491,7 @@
|
||||
8C9C84452B0C697A00A601BC /* YMMineCollectRoomViewController.m in Sources */,
|
||||
8C9C82AC2B0C695600A601BC /* NetImageView.m in Sources */,
|
||||
8C9C82C52B0C695600A601BC /* YYUtility+App.m in Sources */,
|
||||
2337575F2B0CB577001D0B7F /* SessionInfoViewController.m in Sources */,
|
||||
2337575F2B0CB577001D0B7F /* CHSessionInfoViewController.m in Sources */,
|
||||
8C9C82CE2B0C695600A601BC /* YMWeakTimer.m in Sources */,
|
||||
8C9C846B2B0C697A00A601BC /* MewSocialMicroView.m in Sources */,
|
||||
233757572B0CB577001D0B7F /* MessageMenuModel.m in Sources */,
|
||||
|
@@ -31,7 +31,7 @@
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Release"
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
|
@@ -48,9 +48,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 用户签名
|
||||
@property (nonatomic, copy) NSString *userDesc;
|
||||
///跟随的 本地添加的字段
|
||||
@property (nonatomic,copy) NSString *fromNick;
|
||||
@property (nonatomic,assign) UserEnterRoomFromType fromType;
|
||||
@property (nonatomic,copy) NSString *fromUid;
|
||||
//@property (nonatomic,copy) NSString *fromNick;
|
||||
//@property (nonatomic,assign) UserEnterRoomFromType fromType;
|
||||
//@property (nonatomic,copy) NSString *fromUid;
|
||||
|
||||
#pragma mark - 相亲房的字段
|
||||
///贵族信息
|
||||
|
@@ -16,10 +16,10 @@
|
||||
|
||||
#else
|
||||
/// http://h5.ymlive.fun
|
||||
#define API_HOST_H5_URL @"+q1JXmshk337bVXcYPsrJRAilYbIsStE4fh5dRzDj2k="
|
||||
#define API_HOST_H5_URL @"https://h5.ymlive.fun"
|
||||
|
||||
/// https://api.ymlive.fun
|
||||
#define API_HOST_URL @"Lk4rBT4xOjIVF9nPfBvRvyW9xx/sjOb0YbkCThRndxU="
|
||||
#define API_HOST_URL @"https://api.ymlive.fun"
|
||||
#endif
|
||||
|
||||
|
||||
|
@@ -30,17 +30,5 @@ typedef NS_ENUM(NSUInteger, GetSmsType) {
|
||||
GetSmsType_Unbind_Phone = 7, ///解绑手机
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSInteger, UserEnterRoomFromType) {
|
||||
///首页推荐
|
||||
UserEnterRoomFromType_Home_Recommend = 1,
|
||||
///跟随用户
|
||||
UserEnterRoomFromType_Follow_User = 2,
|
||||
///赛事详情
|
||||
UserEnterRoomFromType_Follow_Game_Detail = 8,
|
||||
///跨房PK
|
||||
UserEnterRoomFromType_Cross_Room_PK = 9,
|
||||
///新用户打招呼
|
||||
UserEnterRoomFromType_New_User_Greet = 10
|
||||
};
|
||||
|
||||
#endif /* YMEnum_h */
|
||||
|
@@ -11,19 +11,22 @@
|
||||
/// Tool
|
||||
#import "YMMacro.h"
|
||||
#import "ThemeColor.h"
|
||||
#import "NSArray+Safe.h"
|
||||
/// Third
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
///P
|
||||
#import "YMMineCollectRoomProtocol.h"
|
||||
#import "YMMineCollectRoomPresenter.h"
|
||||
#import "Api+Mine.h"
|
||||
/// Model
|
||||
#import "MineCollectRoomModel.h"
|
||||
|
||||
|
||||
@interface MewMineCollectionViewController () <UITableViewDelegate, UITableViewDataSource, YMMineCollectRoomProtocol>
|
||||
|
||||
@property (nonatomic, strong) UITableView *collectionTableView;
|
||||
/// 收藏数据
|
||||
@property (nonatomic, strong) NSMutableArray *collectionModels;
|
||||
@property (nonatomic, strong) NSMutableArray<MineCollectRoomModel *> *collectionModels;
|
||||
///当前页数
|
||||
@property (nonatomic,assign) int page;
|
||||
///更多数据
|
||||
@@ -43,6 +46,7 @@
|
||||
self.view.backgroundColor = UIColor.whiteColor;
|
||||
self.title = @"我的收藏";
|
||||
[self initView];
|
||||
[self initHeaderAndFooterRrfresh];
|
||||
}
|
||||
|
||||
#pragma mark - Init
|
||||
@@ -64,7 +68,7 @@
|
||||
|
||||
|
||||
MewMineCollectionTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([MewMineCollectionTableViewCell class])];
|
||||
|
||||
cell.roomInfo = [self.collectionModels safeObjectAtIndex1:indexPath.row];
|
||||
|
||||
return cell;
|
||||
}
|
||||
@@ -145,7 +149,7 @@
|
||||
return _collectionTableView;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)collectionModels {
|
||||
- (NSMutableArray<MineCollectRoomModel *> *)collectionModels {
|
||||
if (!_collectionModels) {
|
||||
_collectionModels = [NSMutableArray array];
|
||||
}
|
||||
|
@@ -242,7 +242,7 @@
|
||||
- (UILabel *)balanceMoneyLabel {
|
||||
if (!_balanceMoneyLabel) {
|
||||
_balanceMoneyLabel = [[UILabel alloc] init];
|
||||
_balanceMoneyLabel.text = @"1000004";
|
||||
// _balanceMoneyLabel.text = @"1000004";
|
||||
_balanceMoneyLabel.textColor = UIColor.whiteColor;
|
||||
_balanceMoneyLabel.font = kFontSemibold(34);
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@
|
||||
//
|
||||
|
||||
#import "MewPartyViewController.h"
|
||||
#import "MewMineCollectionViewController.h"
|
||||
/// View
|
||||
#import "MewPartyListCollectionViewCell.h"
|
||||
#import "MewRoomViewController.h"
|
||||
@@ -70,14 +71,9 @@
|
||||
#pragma mark - Load Data
|
||||
- (void)loadData {
|
||||
[self.presenter homeRecommendRoomList];
|
||||
// [self.presenter getRecommendRoomList:@"recommend" page:1 pageSize:20 state:0];
|
||||
}
|
||||
|
||||
#pragma mark - YMHomeProtocol
|
||||
- (void)getHomeRecommendRoomListSuccess:(NSArray *)list state:(BOOL)state {
|
||||
// self.homeRecommendModels = list;
|
||||
// [self.partyCollectionView reloadData];
|
||||
}
|
||||
|
||||
- (void)homeRecommendRoomListSuccess:(NSArray *)list {
|
||||
self.homeRecommendModels = list;
|
||||
@@ -103,6 +99,10 @@
|
||||
[MewRoomViewController openRoom:roomId viewController:self];
|
||||
}
|
||||
|
||||
- (void)gotoWithMineCollection:(UITapGestureRecognizer *)tap {
|
||||
MewMineCollectionViewController *controller = [[MewMineCollectionViewController alloc] init];
|
||||
[self.navigationController pushViewController:controller animated:NO];
|
||||
}
|
||||
|
||||
#pragma mark - Init
|
||||
- (void)initView {
|
||||
@@ -171,6 +171,9 @@
|
||||
if (!_collectBgImageView) {
|
||||
_collectBgImageView = [[UIImageView alloc] init];
|
||||
_collectBgImageView.image = [UIImage imageNamed:@"mew_party_collection_bg"];
|
||||
_collectBgImageView.userInteractionEnabled = YES;
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gotoWithMineCollection:)];
|
||||
[_collectBgImageView addGestureRecognizer:tap];
|
||||
}
|
||||
return _collectBgImageView;
|
||||
}
|
||||
|
@@ -24,18 +24,16 @@
|
||||
#import "GiftInfoModel.h"
|
||||
#import "GiftReceiveInfoModel.h"
|
||||
#import "YMMessageRemoteExtModel.h"
|
||||
#import "RoomFaceSendInfoModel.h"
|
||||
///Tool
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "YMHUDTool.h"
|
||||
#import "YMRoomMiniManager.h"
|
||||
#import "YMMacro.h"
|
||||
#import "NSArray+Safe.h"
|
||||
#import "RtcManager.h"
|
||||
///P
|
||||
#import "YMRoomPresenter.h"
|
||||
#import "YMRoomProtocol.h"
|
||||
#import "RoomHostDelegate.h"
|
||||
#import "CHRoomHostDelegate.h"
|
||||
/// Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
@@ -43,38 +41,28 @@
|
||||
|
||||
@interface MewRoomViewController ()<YMRoomProtocol,
|
||||
NIMChatroomManagerDelegate, NIMChatManagerDelegate, NIMConversationManagerDelegate, NIMLoginManagerDelegate,
|
||||
RoomHostDelegate, MewRoomRightViewDelegate, MewRoomHeaderViewDelegate>
|
||||
CHRoomHostDelegate, MewRoomRightViewDelegate, MewRoomHeaderViewDelegate>
|
||||
|
||||
// 背景
|
||||
@property (nonatomic, strong) UIImageView *roomBgImageView;
|
||||
@property (nonatomic, strong) MewRoomHeaderView *roomHeaderView;
|
||||
@property (nonatomic, strong) MewRoomRightView *roomRightView;
|
||||
@property (nonatomic, strong) StageView *stageView;
|
||||
@property (nonatomic, strong) YMRoomMessageContainerView *messageContainerView;
|
||||
@property (nonatomic, strong) CHStageView *roomStageView;
|
||||
@property (nonatomic, strong) YMRoomMessageContainerView *roomMessageView;
|
||||
///动画的view
|
||||
@property (nonatomic,strong) YMRoomAnimationView *animationView;
|
||||
@property (nonatomic,strong) YMRoomAnimationView *roomAnimationView;
|
||||
@property (nonatomic, strong) UIImageView *emojiImageView;
|
||||
|
||||
///输入框
|
||||
@property (nonatomic,strong) YMRoomSendTextView *inputTextView;
|
||||
|
||||
/// 房间的Uid
|
||||
@property (nonatomic, strong) NSString *roomUid;
|
||||
/// 跟随的
|
||||
@property (nonatomic, strong) NSString *fromNick;
|
||||
@property (nonatomic,assign) UserEnterRoomFromType fromType;
|
||||
@property (nonatomic,copy) NSString *fromUid;
|
||||
/// 用户信息
|
||||
@property (nonatomic, strong) UserInfoModel *userInfo;
|
||||
///房间信息
|
||||
@property (nonatomic, strong) RoomInfoModel *roomInfo;
|
||||
|
||||
/// emoji
|
||||
@property (nonatomic, assign) BOOL isPlayEmojiAnimation;
|
||||
@property (nonatomic, copy) NSArray<NSString *> *emojiArrays;
|
||||
@property (nonatomic, strong) NSMutableArray<NSString *> *playEmojiArrays;
|
||||
|
||||
///是否是最小化进房
|
||||
@property (nonatomic,assign) BOOL isMiniEnter;
|
||||
@end
|
||||
|
||||
@implementation MewRoomViewController
|
||||
@@ -95,13 +83,7 @@
|
||||
self.emojiArrays = @[@"mew_room_emoji_deyi",@"mew_room_emoji_happy",@"mew_room_emoji_sex",@"mew_room_emoji_suprise"];
|
||||
self.playEmojiArrays = [NSMutableArray array];
|
||||
self.isPlayEmojiAnimation = NO;
|
||||
|
||||
if (self.isMiniEnter) {
|
||||
//最小化进房
|
||||
|
||||
} else {
|
||||
[self.presenter initEnterRoom:self.roomUid user:[AccountInfoStorage instance].getUid];
|
||||
}
|
||||
[self.presenter initEnterRoom:self.roomUid user:[AccountInfoStorage instance].getUid];
|
||||
|
||||
//监听云信消息
|
||||
[[NIMSDK sharedSDK].chatroomManager addDelegate:self];
|
||||
@@ -125,23 +107,6 @@
|
||||
- (void)onRecvMessages:(NSArray<NIMMessage *> *)messages {
|
||||
for (NIMMessage * message in messages) {
|
||||
///房间内收到p2p的消息 比如升级消息
|
||||
if (message.session.sessionType == NIMSessionTypeP2P) {
|
||||
if(message.messageType == NIMMessageTypeCustom) {
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
AttachmentModel * attachment = obj.attachment;
|
||||
if (attachment.first == CustomMessageType_User_UpGrade) {
|
||||
// ContentLevelUpgradeModel * levelInfo = [ContentLevelUpgradeModel modelWithDictionary:attachment.data];
|
||||
// if (attachment.second == Custom_Message_Sub_User_UpGrade_Exper) {
|
||||
// self.userInfo.userLevelVo.experLevelSeq = levelInfo.levelSeq;
|
||||
// } else if(attachment.second == Custom_Message_Sub_User_UpGrade_Charm) {
|
||||
// self.userInfo.userLevelVo.charmLevelSeq = levelInfo.levelSeq;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 非房间内消息不处理
|
||||
if (message.session.sessionType != NIMSessionTypeChatroom) {
|
||||
continue;
|
||||
@@ -167,72 +132,8 @@
|
||||
{
|
||||
NSMutableDictionary *lastRoomInfoDic = [NSMutableDictionary dictionaryWithDictionary:[self.roomInfo model2dictionary]];
|
||||
[lastRoomInfoDic addEntriesFromDictionary: ((NSString *)data[@"roomInfo"]).toJSONObject];
|
||||
RoomInfoModel *newRoomInfo = [RoomInfoModel modelWithJSON:lastRoomInfoDic];
|
||||
// //TODO: 从小游戏房间切换到普通房间的话 mgid不会被清除掉
|
||||
// if (newRoomInfo.type != RoomType_MiniGame) {
|
||||
// newRoomInfo.mgId = 0;
|
||||
// }
|
||||
// newRoomInfo.hasAnimationEffect = self.hasAnimationEffect;
|
||||
// if (newRoomInfo.roomModeType == RoomModeType_Open_Blind && self.roomInfo.roomModeType != RoomModeType_Open_Blind) {
|
||||
// ///普通房 切换为相亲房
|
||||
// newRoomInfo.datingState = RoomDatingStateChangeType_Open;
|
||||
// } else if(newRoomInfo.roomModeType != RoomModeType_Open_Blind && self.roomInfo.roomModeType == RoomModeType_Open_Blind) {
|
||||
// ///关闭了相亲房
|
||||
// newRoomInfo.datingState = RoomDatingStateChangeType_Close;
|
||||
// } else {
|
||||
// newRoomInfo.datingState = RoomDatingStateChangeType_Normal;
|
||||
// }
|
||||
//房间类型是否变更了(从个播->普通,个播->小游戏等)
|
||||
// newRoomInfo.hadChangeRoomType = self.roomInfo.type != newRoomInfo.type;
|
||||
// BOOL anchorToOther = newRoomInfo.type != RoomType_Anchor && self.roomInfo.type == RoomType_Anchor;//个播变其他房
|
||||
self.roomInfo = newRoomInfo;
|
||||
// [self.backContainerView onRoomUpdate];
|
||||
// self.quickMessageContainerView.titleArray = self.roomInfo.speakTemplate;
|
||||
// if (self.roomInfo.type == RoomType_Anchor && self.roomInfo.hadChangeRoomType) {///从其他房变为个播房
|
||||
// [self handleInitAnchorRoom];
|
||||
// [self showAnchorScrollTipView];
|
||||
// } else if (anchorToOther) {
|
||||
// [self.anchorScrollView removeFromSuperview];
|
||||
// [self.backContainerView removeFromSuperview];
|
||||
// [self.stageView removeFromSuperview];
|
||||
// [self.messageContainerView removeFromSuperview];
|
||||
// [self.quickMessageContainerView removeFromSuperview];
|
||||
// [self.activityContainerView removeFromSuperview];
|
||||
// [self.roomHeaderView removeFromSuperview];
|
||||
// [self.functionView removeFromSuperview];
|
||||
// [self.menuContainerView removeFromSuperview];
|
||||
//
|
||||
// [self.view addSubview:self.backContainerView];
|
||||
// [self.view addSubview:self.stageView];
|
||||
// [self.view addSubview:self.messageContainerView];
|
||||
// [self.view addSubview:self.quickMessageContainerView];
|
||||
// [self.view addSubview:self.activityContainerView];
|
||||
// [self.view addSubview:self.roomHeaderView];
|
||||
// [self.view addSubview:self.functionView];
|
||||
// [self.view addSubview:self.menuContainerView];
|
||||
// [self.view bringSubviewToFront:self.menuContainerView];
|
||||
// [self.view bringSubviewToFront:self.animationView];
|
||||
// [self initSubViewConstraints];
|
||||
// [self changeStageViewOnRoomUpdate];
|
||||
// [self.stageView onRoomUpdate];
|
||||
// [self.menuContainerView onRoomUpdate];
|
||||
// [self.functionView onRoomUpdate];
|
||||
// [self.activityContainerView onRoomUpdate];
|
||||
// [self.messageContainerView onRoomUpdate];
|
||||
// [self.littleGameView onRoomUpdate];
|
||||
// } else {
|
||||
// if (self.roomInfo.type == RoomType_Anchor) {
|
||||
// [self changeStageViewOnAnchorRoom];
|
||||
// } else {
|
||||
// [self changeStageViewOnRoomUpdate];
|
||||
// }
|
||||
[self.stageView onRoomUpdate];
|
||||
// [self.menuContainerView onRoomUpdate];
|
||||
// [self.functionView onRoomUpdate];
|
||||
// [self.activityContainerView onRoomUpdate];
|
||||
[self.messageContainerView onRoomUpdate];
|
||||
// [self.littleGameView onRoomUpdate];
|
||||
// }
|
||||
[self.roomStageView onRoomUpdate];
|
||||
// [self.roomMessageView onRoomUpdate];
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -242,10 +143,6 @@
|
||||
if (content.source.userId.integerValue != [AccountInfoStorage instance].getUid.integerValue && self.userInfo.platformRole != 1) {
|
||||
// onLineNumber += 1;
|
||||
}else {///如果是自己的话 如果有坐骑的话
|
||||
// [self userEnterRoomSuccess];
|
||||
// ///在活动页面 判断是否显示 相亲加入的按钮 所以需要等用户进房成功之后才能获取 房间角色
|
||||
// [self.activityContainerView onRoomUpdate];
|
||||
// [self.menuContainerView onRoomUpdate];
|
||||
}
|
||||
break;
|
||||
case NIMChatroomEventTypeAddBlack:
|
||||
@@ -267,33 +164,22 @@
|
||||
break;
|
||||
}
|
||||
self.roomInfo.onlineNum = onLineNumber;
|
||||
// [self.roomHeaderView onRoomUpdate];
|
||||
[self.stageView handleNIMNotificationMessage:message];
|
||||
[self.animationView handleNIMNotificationMessage:message];
|
||||
[self.messageContainerView handleNIMNotificationMessage:message];
|
||||
// [self.roomHeaderView onRoomUpdate];
|
||||
[self.roomStageView handleNIMNotificationMessage:message];
|
||||
[self.roomAnimationView handleNIMNotificationMessage:message];
|
||||
[self.roomMessageView handleNIMNotificationMessage:message];
|
||||
} else if (message.messageType == NIMMessageTypeCustom) {
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
AttachmentModel * attachment = obj.attachment;
|
||||
[self.stageView handleNIMCustomMessage:message];
|
||||
[self.animationView handleNIMCustomMessage:message];
|
||||
if (attachment.first == CustomMessageType_Update_RoomInfo && attachment.second == Custom_Message_Sub_Update_RoomInfo_MessageState) {
|
||||
///兼容安卓和iOS 协议不同的问题
|
||||
NSDictionary * dic= attachment.data[@"roomInfo"];
|
||||
if (dic.allKeys.count <=0) {
|
||||
dic = attachment.data;
|
||||
}
|
||||
RoomInfoModel * roomInfo = [RoomInfoModel modelWithDictionary:dic];
|
||||
// self.roomInfo.isCloseScreen = roomInfo.isCloseScreen;
|
||||
// [self.menuContainerView onRoomUpdate];
|
||||
}
|
||||
[self.roomStageView handleNIMCustomMessage:message];
|
||||
[self.roomAnimationView handleNIMCustomMessage:message];
|
||||
|
||||
[self.messageContainerView handleNIMCustomMessage:message];
|
||||
[self.roomMessageView handleNIMCustomMessage:message];
|
||||
}
|
||||
} else if(message.messageType == NIMMessageTypeText) {
|
||||
[self.messageContainerView handleNIMTextMessage:message];
|
||||
[self.roomMessageView handleNIMTextMessage:message];
|
||||
} else if(message.messageType == NIMMessageTypeTip) {
|
||||
[self.messageContainerView handleNIMTextMessage:message];
|
||||
[self.roomMessageView handleNIMTextMessage:message];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -317,81 +203,42 @@
|
||||
if (message.messageType == NIMMessageTypeCustom) {
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
AttachmentModel * attachment = obj.attachment;
|
||||
[self.stageView handleNIMCustomMessage:message];
|
||||
[self.animationView handleNIMCustomMessage:message];
|
||||
[self.messageContainerView handleNIMCustomMessage:message];
|
||||
|
||||
// if (attachment.first == CustomMessageType_Face && attachment.second == Custom_Message_Sub_Face_Send) {
|
||||
// NSLog(@"发送的表情:%@", attachment.data);
|
||||
// }
|
||||
[self.roomStageView handleNIMCustomMessage:message];
|
||||
[self.roomAnimationView handleNIMCustomMessage:message];
|
||||
[self.roomMessageView handleNIMCustomMessage:message];
|
||||
}
|
||||
|
||||
|
||||
} else if(message.messageType == NIMMessageTypeText) {
|
||||
[self.messageContainerView handleNIMTextMessage:message];
|
||||
[self.roomMessageView handleNIMTextMessage:message];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - NIMLoginManagerDelegate
|
||||
- (void)onKickout:(NIMLoginKickoutResult *)result {
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - NIMConversationManagerDelegate
|
||||
/// 添加
|
||||
- (void)didAddRecentSession:(NIMRecentSession *)recentSession
|
||||
totalUnreadCount:(NSInteger)totalUnreadCount {
|
||||
[self.messageContainerView addNIMRecentSession:recentSession];
|
||||
}
|
||||
|
||||
/// 更新
|
||||
- (void)didUpdateRecentSession:(NIMRecentSession *)recentSession
|
||||
totalUnreadCount:(NSInteger)totalUnreadCount {
|
||||
[self.messageContainerView addNIMRecentSession:recentSession];
|
||||
}
|
||||
|
||||
/// 移除
|
||||
- (void)didRemoveRecentSession:(NIMRecentSession *)recentSession
|
||||
totalUnreadCount:(NSInteger)totalUnreadCount {
|
||||
[self.messageContainerView removeNIMRecentSession:recentSession];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#pragma mark - Public Method
|
||||
/// 进入房间
|
||||
+ (BOOL)openRoom:(NSString *)roomUid viewController:(UIViewController *)viewController {
|
||||
return [self openRoom:roomUid fromNick:nil fromType:0 fromUid:nil viewController:viewController];
|
||||
}
|
||||
|
||||
/// 跟随进房
|
||||
+ (BOOL)openRoom:(NSString *)roomUid fromNick:(NSString *)fromNick fromType:(UserEnterRoomFromType)fromType fromUid:(NSString *)fromUid viewController:(UIViewController *)viewController {
|
||||
MewRoomViewController *roomVC = [[self alloc] init];
|
||||
roomVC.roomUid = roomUid;
|
||||
roomVC.fromNick = fromNick;
|
||||
roomVC.fromType = fromType;
|
||||
roomVC.fromUid = fromUid;
|
||||
BaseNavigationController *baseNav = [[BaseNavigationController alloc] initWithRootViewController:roomVC];
|
||||
baseNav.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
[viewController presentViewController:baseNav animated:YES completion:nil];
|
||||
return YES;
|
||||
}
|
||||
|
||||
#pragma mark - RoomHostDelegate
|
||||
- (RoomInfoModel *)getRoomInfo {
|
||||
#pragma mark - CHRoomHostDelegate
|
||||
- (RoomInfoModel *)getRoomInformation {
|
||||
return self.roomInfo;
|
||||
}
|
||||
|
||||
- (UserInfoModel *)getUserInfo {
|
||||
- (UserInfoModel *)getUserInformation {
|
||||
return self.userInfo;
|
||||
}
|
||||
|
||||
/// 退出房间
|
||||
- (void)exitRoom {
|
||||
- (void)exitCurrentRoom {
|
||||
//其他模式下
|
||||
[self.animationView resumeTimer];
|
||||
[self.roomAnimationView resumeTimer];
|
||||
// 默认模式下
|
||||
[self.presenter exitNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]];
|
||||
[[RtcManager instance] exitRoom];
|
||||
@@ -400,17 +247,11 @@
|
||||
|
||||
}
|
||||
|
||||
- (UINavigationController *)getCurrentNav {
|
||||
- (UINavigationController *)getCurrentNavigationController {
|
||||
return self.navigationController;
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)onMicroQueueUpdate:(NSMutableDictionary<NSString *,MicroQueueModel *> *)queue {
|
||||
// [self.menuContainerView onMicroQueueUpdate:queue];
|
||||
// [self.functionView onRoomUpdate];
|
||||
// [self.functionView onMicroQueueUpdate:queue];
|
||||
|
||||
- (void)microQueueUpdate:(NSMutableDictionary<NSString *,MicroQueueModel *> *)queue {
|
||||
BOOL isOnMic = false;
|
||||
for (MicroQueueModel * info in queue.allValues) {
|
||||
if (info.userInfo.uid > 0 && [AccountInfoStorage instance].getUid.integerValue == info.userInfo.uid) {
|
||||
@@ -418,37 +259,20 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// if (isOnMic) {
|
||||
// self.anchorScrollView.scrollEnabled = NO;
|
||||
// } else {
|
||||
// self.anchorScrollView.scrollEnabled = YES;
|
||||
// }
|
||||
}
|
||||
|
||||
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid {
|
||||
return [self.stageView animationPointAtStageViewByUid:uid];
|
||||
return [self.roomStageView animationPointAtStageViewByUid:uid];
|
||||
}
|
||||
#pragma mark - YMRoomProtocol
|
||||
/// 进入房间成功
|
||||
- (void)initEnterRoomSuccess:(RoomInfoModel *)roomInfo user:(UserInfoModel *)userInfo {
|
||||
[YMHUDTool hideHUDInView:self.navigationController.view];
|
||||
userInfo.fromUid = self.fromUid;
|
||||
userInfo.fromType = self.fromType;
|
||||
userInfo.fromNick = self.fromNick;
|
||||
self.userInfo = userInfo;
|
||||
self.roomInfo = roomInfo;
|
||||
if (roomInfo.valid) {
|
||||
//// if (roomInfo.room)
|
||||
// //房间有密码
|
||||
//
|
||||
// //房间没有密码
|
||||
[self.roomHeaderView onRoomEntered];
|
||||
[self.presenter enterNIMRoom:[NSString stringWithFormat:@"%ld",self.roomInfo.roomId] user:self.userInfo];
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
} else {
|
||||
if ([self.roomUid isEqualToString:[NSString stringWithFormat:@"%ld", userInfo.uid]]) {
|
||||
//用户进入自己的房间
|
||||
@@ -479,7 +303,7 @@
|
||||
// IM进房成功
|
||||
- (void)enterRoomSuccess:(NIMChatroom *)chatRoom {
|
||||
[YMHUDTool hideHUDInView:self.navigationController.view];
|
||||
[self.stageView onRoomEntered];
|
||||
[self.roomStageView onRoomEntered];
|
||||
if (self.roomInfo != nil) {
|
||||
[self.presenter reportUserInterRoom:[NSString stringWithFormat:@"%zd", self.roomInfo.uid]];
|
||||
|
||||
@@ -505,7 +329,6 @@
|
||||
|
||||
/// 送礼物成功
|
||||
- (void)sendGiftSuccess:(GiftReceiveInfoModel *)receiveInfo originDic:(NSDictionary *)originDic uidCount:(NSInteger)uidCount {
|
||||
NSLog(@"送礼物成功:%@ --- dict:%@",receiveInfo, originDic);
|
||||
[YMHUDTool hideHUD];
|
||||
|
||||
[self sendCustomMessage:receiveInfo oringinDic:originDic];
|
||||
@@ -515,7 +338,7 @@
|
||||
/// 送礼物失败
|
||||
- (void)sendGiftFailWithCode:(NSInteger)code msg:(NSString *)msg {
|
||||
[YMHUDTool hideHUD];
|
||||
NSLog(@"送礼物失败:%@ --- code:%ld",msg, (long)code);
|
||||
|
||||
if (code == 31005) {// 余额不足
|
||||
[self showErrorToast:msg];
|
||||
} else {
|
||||
@@ -541,14 +364,13 @@
|
||||
}
|
||||
|
||||
- (void)sendCustomMessage:(AttachmentModel *)attachment {
|
||||
// MewSocialStageView *mewView = (MewSocialStageView *)self.stageView;
|
||||
NSString *sessionID = [NSString stringWithFormat:@"%ld", [self getRoomInfo].roomId];
|
||||
NSString *sessionID = [NSString stringWithFormat:@"%ld", [self getRoomInformation].roomId];
|
||||
NIMMessage *message = [[NIMMessage alloc] init];
|
||||
NIMCustomObject *object = [[NIMCustomObject alloc] init];
|
||||
object.attachment = attachment;
|
||||
message.messageObject = object;
|
||||
|
||||
UserInfoModel *userInfo = [self getUserInfo];
|
||||
UserInfoModel *userInfo = [self getUserInformation];
|
||||
YMMessageRemoteExtModel *extModel = [[YMMessageRemoteExtModel alloc] init];
|
||||
NSMutableDictionary *remoteExt = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[NSString stringWithFormat:@"%ld",userInfo.uid]];
|
||||
message.remoteExt = remoteExt;
|
||||
@@ -566,7 +388,7 @@
|
||||
|
||||
} else if (target == 1) {
|
||||
// 退出房间
|
||||
[self exitRoom];
|
||||
[self exitCurrentRoom];
|
||||
} else {
|
||||
// 举报房间
|
||||
[self reportButton];
|
||||
@@ -579,7 +401,7 @@
|
||||
- (void)didSelectMewRoomRightViewWithTarget:(NSInteger)target {
|
||||
if (target == 0) {
|
||||
// 聊天
|
||||
self.inputTextView = [YMRoomSendTextView showTextView:self.view.superview.superview delegate:self atUid:nil atNick:nil];
|
||||
[YMRoomSendTextView showTextView:self.view.superview.superview delegate:self];
|
||||
} else if (target == 1) {
|
||||
// 表情
|
||||
[self randomEmoji];
|
||||
@@ -609,16 +431,13 @@
|
||||
self.isPlayEmojiAnimation = YES;
|
||||
self.emojiImageView.hidden = NO;
|
||||
if (self.playEmojiArrays.count > 0) {
|
||||
|
||||
self.emojiImageView.image = [UIImage imageNamed:self.playEmojiArrays[0]];
|
||||
}
|
||||
|
||||
|
||||
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
self.isPlayEmojiAnimation = NO;
|
||||
self.emojiImageView.hidden = YES;
|
||||
|
||||
|
||||
if (self.playEmojiArrays.count > 0) {
|
||||
[self.playEmojiArrays removeObjectAtIndex:0];
|
||||
}
|
||||
@@ -629,33 +448,9 @@
|
||||
});
|
||||
}
|
||||
|
||||
- (void)sendFaceCustomMessage:(NSInteger)faceId {
|
||||
RoomFaceSendInfoModel *sendInfo = [[RoomFaceSendInfoModel alloc]init];
|
||||
NSMutableArray *resultIndexs = [NSMutableArray array];
|
||||
NSMutableArray *faceRecieveInfos = [NSMutableArray array];
|
||||
sendInfo.nick = self.userInfo.nick;
|
||||
sendInfo.faceId = faceId;
|
||||
sendInfo.uid = self.userInfo.uid;
|
||||
[faceRecieveInfos addObject:sendInfo.model2dictionary];
|
||||
AttachmentModel * attachment = [[AttachmentModel alloc] init];
|
||||
attachment.first = CustomMessageType_Face;
|
||||
attachment.second = Custom_Message_Sub_Face_Send;
|
||||
NSDictionary * dic = @{@"data":faceRecieveInfos, @"uid": @(self.userInfo.uid)};
|
||||
attachment.data = dic;
|
||||
NSString *sessionID = [NSString stringWithFormat:@"%ld",[self getRoomInfo].roomId];
|
||||
NIMMessage *message = [[NIMMessage alloc]init];
|
||||
NIMCustomObject *object = [[NIMCustomObject alloc] init];
|
||||
object.attachment = attachment;
|
||||
message.messageObject = object;
|
||||
//构造会话
|
||||
NIMSession *session = [NIMSession session:sessionID type:NIMSessionTypeChatroom];
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session error:nil];
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
/// 礼物
|
||||
- (void)sendRoomGift {
|
||||
MewSocialStageView *mewStageView = (MewSocialStageView *)self.stageView;
|
||||
MewSocialStageView *mewStageView = (MewSocialStageView *)self.roomStageView;
|
||||
NSString *selectId = mewStageView.selectUid;
|
||||
if (selectId == [AccountInfoStorage instance].getUid) {
|
||||
[self showErrorToast:@"不能赠送礼物给自己"];
|
||||
@@ -704,7 +499,7 @@
|
||||
[self showSuccessToast:@"举报成功"];
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action){
|
||||
[self showSuccessToast:@"举报成功"];
|
||||
// [self showSuccessToast:@"举报成功"];
|
||||
}]];
|
||||
[self presentViewController:alert animated:YES completion:nil];
|
||||
|
||||
@@ -714,11 +509,11 @@
|
||||
- (void)initView {
|
||||
[self.view addSubview:self.roomBgImageView];
|
||||
[self.view addSubview:self.roomHeaderView];
|
||||
[self.view addSubview:self.stageView];
|
||||
[self.view insertSubview:self.roomRightView aboveSubview:self.stageView];
|
||||
[self.view addSubview:self.messageContainerView];
|
||||
[self.view addSubview:self.roomStageView];
|
||||
[self.view insertSubview:self.roomRightView aboveSubview:self.roomStageView];
|
||||
[self.view addSubview:self.roomMessageView];
|
||||
[self.view insertSubview:self.emojiImageView aboveSubview:self.roomRightView];
|
||||
[self.view addSubview:self.animationView];
|
||||
[self.view addSubview:self.roomAnimationView];
|
||||
[self initLayout];
|
||||
}
|
||||
|
||||
@@ -737,24 +532,24 @@
|
||||
make.right.equalTo(self.view).offset(-32);
|
||||
}];
|
||||
|
||||
[self.stageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.roomStageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.roomRightView);
|
||||
make.left.right.equalTo(self.view);
|
||||
make.height.mas_equalTo(self.stageView.heightForStageView);
|
||||
make.height.mas_equalTo(self.roomStageView.heightForStageView);
|
||||
}];
|
||||
|
||||
[self.messageContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.stageView.mas_bottom);
|
||||
[self.roomMessageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.roomStageView.mas_bottom);
|
||||
make.left.right.equalTo(self.view);
|
||||
make.bottom.mas_equalTo(-kSafeAreaBottomHeight);
|
||||
}];
|
||||
|
||||
[self.emojiImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.equalTo(self.stageView);
|
||||
make.bottom.equalTo(self.stageView).offset(-60);
|
||||
make.centerX.equalTo(self.roomStageView);
|
||||
make.bottom.equalTo(self.roomStageView).offset(-60);
|
||||
}];
|
||||
|
||||
[self.animationView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.roomAnimationView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
@@ -786,18 +581,18 @@
|
||||
return _roomRightView;
|
||||
}
|
||||
|
||||
- (StageView *)stageView {
|
||||
if (!_stageView) {
|
||||
_stageView = [[MewSocialStageView alloc] initWithDelegate:self];
|
||||
- (CHStageView *)roomStageView {
|
||||
if (!_roomStageView) {
|
||||
_roomStageView = [[MewSocialStageView alloc] initWithDelegate:self];
|
||||
}
|
||||
return _stageView;
|
||||
return _roomStageView;
|
||||
}
|
||||
|
||||
- (YMRoomMessageContainerView *)messageContainerView {
|
||||
if (!_messageContainerView) {
|
||||
_messageContainerView = [[YMRoomMessageContainerView alloc] initWithDelegate:self];
|
||||
- (YMRoomMessageContainerView *)roomMessageView {
|
||||
if (!_roomMessageView) {
|
||||
_roomMessageView = [[YMRoomMessageContainerView alloc] initWithDelegate:self];
|
||||
}
|
||||
return _messageContainerView;
|
||||
return _roomMessageView;
|
||||
}
|
||||
|
||||
- (UIImageView *)emojiImageView {
|
||||
@@ -807,11 +602,11 @@
|
||||
return _emojiImageView;
|
||||
}
|
||||
|
||||
- (YMRoomAnimationView *)animationView {
|
||||
if (!_animationView) {
|
||||
_animationView = [[YMRoomAnimationView alloc] initWithDelegate:self];
|
||||
- (YMRoomAnimationView *)roomAnimationView {
|
||||
if (!_roomAnimationView) {
|
||||
_roomAnimationView = [[YMRoomAnimationView alloc] initWithDelegate:self];
|
||||
}
|
||||
return _animationView;
|
||||
return _roomAnimationView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -6,8 +6,8 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RoomHostDelegate.h"
|
||||
#import "RoomGuestDelegate.h"
|
||||
#import "CHRoomHostDelegate.h"
|
||||
#import "CHRoomGuestDelegate.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// index : 1 - 退出房间 2-举报房间
|
||||
@@ -23,9 +23,9 @@ typedef void(^selectFilterClouse)(NSInteger index);
|
||||
- (void)didSelectMewRoomHeaderViewTarget:(NSInteger)target;
|
||||
@end
|
||||
|
||||
@interface MewRoomHeaderView : UIView<RoomGuestDelegate>
|
||||
@interface MewRoomHeaderView : UIView<CHRoomGuestDelegate>
|
||||
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
|
||||
- (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate;
|
||||
@property (nonatomic, weak) id<MewRoomHeaderViewDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
@@ -17,7 +17,6 @@
|
||||
#import "UserInfoModel.h"
|
||||
|
||||
#pragma mark - 过滤view(举报和退出)
|
||||
|
||||
@interface MewRoomHeaderFilterView()
|
||||
@property (nonatomic, strong) UIButton *exitButton;
|
||||
@property (nonatomic, strong) UIButton *reportButton;
|
||||
@@ -144,7 +143,7 @@ static MewRoomHeaderFilterView *_filterView = nil;
|
||||
/// 退出房间
|
||||
@property (nonatomic, strong) UIButton *filterButton;
|
||||
|
||||
@property (nonatomic, weak) id<RoomHostDelegate> hostDelegate;
|
||||
@property (nonatomic, weak) id<CHRoomHostDelegate> hostDelegate;
|
||||
///是否已发送过收藏房间公屏消息
|
||||
@property (nonatomic, assign) BOOL hadShowCollectInScreen;
|
||||
|
||||
@@ -153,7 +152,7 @@ static MewRoomHeaderFilterView *_filterView = nil;
|
||||
@implementation MewRoomHeaderView
|
||||
|
||||
#pragma mark - Init
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate {
|
||||
- (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_hostDelegate = delegate;
|
||||
@@ -162,9 +161,9 @@ static MewRoomHeaderFilterView *_filterView = nil;
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - RoomGuestDelegate
|
||||
#pragma mark - CHRoomGuestDelegate
|
||||
- (void)onRoomEntered {
|
||||
RoomInfoModel* roomInfo = self.hostDelegate.getRoomInfo;
|
||||
RoomInfoModel* roomInfo = self.hostDelegate.getRoomInformation;
|
||||
|
||||
if (roomInfo) {
|
||||
self.roomTitleLabel.text = roomInfo.title;
|
||||
@@ -183,37 +182,12 @@ static MewRoomHeaderFilterView *_filterView = nil;
|
||||
- (void)roomCollectButtonAction:(UIButton *)sender {
|
||||
NSString *type = sender.selected ? @"2" : @"1";
|
||||
NSString *uid = [AccountInfoStorage instance].getUid;
|
||||
NSString *roomUid = [NSString stringWithFormat:@"%ld",self.hostDelegate.getRoomInfo.uid];
|
||||
NSString *roomUid = [NSString stringWithFormat:@"%ld",self.hostDelegate.getRoomInformation.uid];
|
||||
[Api collectRoom:^(BaseModel * _Nonnull data, NSInteger code, NSString * _Nonnull msg) {
|
||||
if (code == 200) {
|
||||
sender.selected = !sender.selected;
|
||||
if ([type isEqualToString:@"1"]) {///收藏的话
|
||||
[YMHUDTool showSuccessWithMessage:@"收藏成功"];
|
||||
sender.selected = YES;
|
||||
if (self.hadShowCollectInScreen) {
|
||||
return;
|
||||
}
|
||||
self.hadShowCollectInScreen = YES;
|
||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||
[dic safeSetObject:[AccountInfoStorage instance].getUid forKey:@"uid"];
|
||||
[dic safeSetObject:self.hostDelegate.getUserInfo.nick forKey:@"nick"];
|
||||
[dic safeSetObject:[NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid] forKey:@"targetUid"];
|
||||
[dic safeSetObject:self.hostDelegate.getRoomInfo.nick forKey:@"targetNick"];
|
||||
|
||||
NSMutableDictionary * data = [@{@"data":dic} mutableCopy];
|
||||
[data safeSetObject:[AccountInfoStorage instance].getUid forKey:@"uid"];
|
||||
AttachmentModel *attachment = [[AttachmentModel alloc]init];
|
||||
attachment.first = CustomMessageType_Collection_Room;
|
||||
attachment.second = Custom_Message_Sub_Collect_Room_Tips;
|
||||
attachment.data = data;
|
||||
NIMMessage *message = [[NIMMessage alloc]init];
|
||||
NIMCustomObject *object = [[NIMCustomObject alloc] init];
|
||||
object.attachment = attachment;
|
||||
message.messageObject = object;
|
||||
NSString *sessionId = [NSString stringWithFormat:@"%ld",self.hostDelegate.getRoomInfo.roomId];
|
||||
//构造会话
|
||||
NIMSession *session = [NIMSession session:sessionId type:NIMSessionTypeChatroom];
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session error:nil];
|
||||
}
|
||||
} else {
|
||||
[YMHUDTool showErrorWithMessage:msg];
|
||||
@@ -228,7 +202,6 @@ static MewRoomHeaderFilterView *_filterView = nil;
|
||||
|
||||
// 退出
|
||||
- (void)filterButtonAction:(UIButton *)sender {
|
||||
|
||||
[MewRoomHeaderFilterView showMewRoomHeadrFilterViewOrigin:CGPointMake(KScreenWidth - 97 - 20, CGRectGetMaxY(self.frame)) selectFilterClouseEvent:^(NSInteger index) {
|
||||
if (self.delegate) {
|
||||
[self.delegate didSelectMewRoomHeaderViewTarget:index];
|
||||
@@ -271,7 +244,6 @@ static MewRoomHeaderFilterView *_filterView = nil;
|
||||
- (UILabel *)roomTitleLabel {
|
||||
if (!_roomTitleLabel) {
|
||||
_roomTitleLabel = [[UILabel alloc] init];
|
||||
_roomTitleLabel.text = @"房间名称";
|
||||
_roomTitleLabel.textColor = UIColor.whiteColor;
|
||||
_roomTitleLabel.font = kFontMedium(18);
|
||||
}
|
||||
@@ -283,8 +255,6 @@ static MewRoomHeaderFilterView *_filterView = nil;
|
||||
_roomCollectButton = [[UIButton alloc] init];
|
||||
[_roomCollectButton setImage:[UIImage imageNamed:@"mew_room_collect"] forState:UIControlStateNormal];
|
||||
[_roomCollectButton setImage:[UIImage imageNamed:@"mew_room_collected"] forState:UIControlStateSelected];
|
||||
// [_roomCollectButton setTitle:@"收藏" forState:UIControlStateNormal];
|
||||
// [_roomCollectButton setTitle:@"已收藏" forState:UIControlStateSelected];
|
||||
_roomCollectButton.selected = NO;
|
||||
[_roomCollectButton addTarget:self action:@selector(roomCollectButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
|
@@ -5,11 +5,11 @@
|
||||
// Created by 触海 on 2023/11/14.
|
||||
//
|
||||
|
||||
#import "StageView.h"
|
||||
#import "CHStageView.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MewSocialStageView : StageView
|
||||
@interface MewSocialStageView : CHStageView
|
||||
|
||||
|
||||
|
||||
|
@@ -33,10 +33,6 @@
|
||||
#define secondRowTop (firstRowTop + mcHeight + marginV2)
|
||||
|
||||
@interface MewSocialStageView()
|
||||
//// 是否选中了坑位上的用户
|
||||
//@property (nonatomic, assign) BOOL isSelectMicUser;
|
||||
//// 选中坑位上用户的id
|
||||
//@property (nonatomic, strong) NSString *selectUid;
|
||||
|
||||
@end
|
||||
|
||||
@@ -91,44 +87,11 @@
|
||||
return ownerTopMargin + ownerHeight + marginV1 + mcHeight + marginV2 + mcHeight + marginV2;
|
||||
}
|
||||
|
||||
|
||||
//- (void)didSelectAtIndex:(NSInteger)index {
|
||||
// [super didSelectAtIndex:index];
|
||||
// self.isSelectMicUser = !self.isSelectMicUser;
|
||||
// NSArray<UIView<MicroViewProtocol> *> *microViews = [self getAllMicroViewArray];
|
||||
// for (UIView<MicroViewProtocol> *view in microViews) {
|
||||
// view.layer.borderColor = UIColor.clearColor.CGColor;
|
||||
// view.layer.borderWidth = 0.0;
|
||||
// }
|
||||
//
|
||||
// MicroQueueModel* micModel = [[self getMicroQueue] objectForKey:[self indexToPosition:index]];
|
||||
// if (micModel.userInfo && micModel.userInfo.uid > 0) {
|
||||
// self.selectUid = [NSString stringWithFormat:@"%ld",micModel.userInfo.uid];
|
||||
// //麦上有人
|
||||
// UIView<MicroViewProtocol> *selectMicroView = [self findMicroViewByIndex:index];
|
||||
// UIColor *color = self.isSelectMicUser ? [ThemeColor colorWithHexString:@"#9552FF"] : UIColor.clearColor;
|
||||
// CGFloat border = self.isSelectMicUser ? 2.0 : 0.0;
|
||||
// selectMicroView.layer.borderColor = color.CGColor;
|
||||
// selectMicroView.layer.borderWidth = border;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
|
||||
//- (NSString *)mewMicroSelectUid {
|
||||
// return self.selectUid;
|
||||
//}
|
||||
|
||||
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid {
|
||||
NSInteger index = [self getIndexByUid:uid];
|
||||
|
||||
CGPoint point = CGPointZero;
|
||||
// if (index == -1 && self.hostDelegate.getRoomInfo.leaveMode && self.hostDelegate.getRoomInfo.uid == uid.integerValue) {
|
||||
// point = CGPointMake(KScreenWidth / 2, ownerWidth / 2 - 10 + ownerTopMargin);
|
||||
// }
|
||||
|
||||
if (index == 0) {
|
||||
// CGRectMake(paddingH, ownerTopMargin, ownerWidth, ownerHeight);
|
||||
point = CGPointMake(paddingH + ownerWidth/2, ownerHeight / 2 - 10 + ownerTopMargin);
|
||||
}
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
self.position = model.microState.position;
|
||||
[super configMicroView:model];
|
||||
MicroStateModel *micState = model.microState;
|
||||
UserInfoModel *userInfo = model.userInfo;
|
||||
// UserInfoModel *userInfo = model.userInfo;
|
||||
|
||||
UIImage *image = [UIImage imageNamed:@"mew_room_position_empty"];
|
||||
if (micState.position == -1) {
|
||||
|
@@ -182,13 +182,8 @@ NSString * const kCancelAccount = @"cancelAccount";
|
||||
if (![_url hasPrefix:@"http"] && ![_url hasPrefix:@"https"]){
|
||||
_url = [NSString stringWithFormat:@"%@/%@", [NewEncryptTool MEW_aesDecrypt:API_HOST_H5_URL], _url];
|
||||
}
|
||||
if (![_url containsString:@"alipayh5"]) {
|
||||
if (![_url containsString:@"?"]) {
|
||||
_url = [NSString stringWithFormat:@"%@?platform=%@", _url, [YYUtility appName]];
|
||||
} else {
|
||||
_url = [NSString stringWithFormat:@"%@&platform=%@", _url, [YYUtility appName]];
|
||||
}
|
||||
}
|
||||
|
||||
_url = [NSString stringWithFormat:@"%@?platform=%@", _url, [YYUtility appName]];
|
||||
|
||||
// 去掉 urlString 中的空格。
|
||||
NSString *noSpaceTextUrl = [_url stringByReplacingOccurrencesOfString:@" " withString:@""];
|
||||
|
@@ -14,98 +14,18 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) {
|
||||
CustomMessageType_Room_Tip = 2,
|
||||
///送礼物的接口
|
||||
CustomMessageType_Gift = 3,
|
||||
///账户更新
|
||||
CustomMessageType_Account = 5,
|
||||
///关注的主播上线
|
||||
CustomMessageType_Member_Online = 6,
|
||||
///队列操作
|
||||
CustomMessageType_Queue = 8,
|
||||
///表情
|
||||
CustomMessageType_Face = 9,
|
||||
///推文
|
||||
CustomMessageType_Tweet = 10,
|
||||
///全麦送
|
||||
CustomMessageType_AllMicroSend = 12,
|
||||
///座驾进房动画
|
||||
CustomMessageType_Car_Notify = 15,
|
||||
///踢出房间
|
||||
CustomMessageType_Kick_User = 18,
|
||||
///小秘书消息
|
||||
CustomMessageType_Secretary = 19,
|
||||
///房间信息更新
|
||||
CustomMessageType_Update_RoomInfo = 20,
|
||||
///应用内分享
|
||||
CustomMessageType_Application_Share = 22,
|
||||
///系统通知,自定义布局消息(带确认、取消)
|
||||
CustomMessageType_Message_Handle = 23,
|
||||
///用户升级
|
||||
CustomMessageType_User_UpGrade = 24,
|
||||
///糖果树
|
||||
CustomMessageType_Candy_Tree = 26,
|
||||
///排麦
|
||||
CustomMessageType_Arrange_Mic = 30,
|
||||
///房间内PK
|
||||
CustomMessageType_Room_PK = 31,
|
||||
///家族
|
||||
CustomMessageType_Hall = 32,
|
||||
///房间礼物值
|
||||
CustomMessageType_Room_GiftValue = 42,
|
||||
///版本升级
|
||||
CustomMessageType_Version_Update = 49,
|
||||
///公会超管
|
||||
CustomMessageType_Hall_Super_Admin = 50,
|
||||
///动态
|
||||
CustomMessageType_Monents = 52,
|
||||
///欢迎Ta
|
||||
CustomMessageType_Room_Welcome = 56,
|
||||
///收藏房间
|
||||
CustomMessageType_Collection_Room = 59,
|
||||
///房间红包
|
||||
CustomMessageType_RedPacket = 60,
|
||||
///福袋消息
|
||||
CustomMessageType_LuckyBag = 61,
|
||||
///发现萌新
|
||||
CustomMessageType_FindNew = 62,
|
||||
///塔罗
|
||||
CustomMessageType_Tarot = 71,
|
||||
///相亲
|
||||
CustomMessageType_RoomPlay_Dating = 72,
|
||||
///私聊风险提醒
|
||||
CustomMessageType_Chat_Risk_Alert = 75,
|
||||
///首充奖励
|
||||
CustomMessageType_First_Recharge_Reward = 76,
|
||||
///访客记录
|
||||
CustomMessageType_First_VisitorRecord = 78,
|
||||
///航海
|
||||
CustomMessageType_Room_Sailing = 81,
|
||||
///跨房PK
|
||||
CustomMessageType_Across_Room_PK = 83,
|
||||
///贵族VIP
|
||||
CustomMessageType_Noble_VIP = 85,
|
||||
///个播房观众点击空坑位,房主收到请求上麦提示
|
||||
CustomMessageType_AnchorRoom_AudienceUpMic = 86,
|
||||
///技能卡
|
||||
CustomMessageType_Skill_Card = 87,
|
||||
///个播小时榜
|
||||
CustomMessageType_Anchor_Hour_Rank = 89,
|
||||
///个播粉丝团
|
||||
CustomMessageType_Anchor_FansTeam = 90,
|
||||
///牌照房小时榜
|
||||
CustomMessageType_Licnese_Hour_Rank = 91,
|
||||
///任务完成通知
|
||||
CustomMessageType_Task_Complete = 92,
|
||||
///礼物合成
|
||||
CustomMessageType_Gift_Compound = 93,
|
||||
///涂鸦礼物
|
||||
CustomMessageType_Graffiti_Gift = 94,
|
||||
///心愿礼物
|
||||
CustomMessageType_Wish_Gift = 95,
|
||||
///星级厨房
|
||||
CustomMessageType_Starred_Kitchen = 96,
|
||||
///特权卡
|
||||
CustomMessageType_Privilege_Card = 102,
|
||||
///发起邀请
|
||||
CustomMessageType_Initiat_Invitation = 103,
|
||||
};
|
||||
|
||||
|
||||
@@ -127,22 +47,8 @@ typedef NS_ENUM(NSUInteger, CustomMessageSubGift) {
|
||||
Custom_Message_Sub_Gift_LuckySend = 34,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Account
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubAccount) {
|
||||
//账户余额钻石变更
|
||||
Custom_Message_Sub_Account_Changed = 51,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Member_Online
|
||||
typedef NS_ENUM(NSInteger, CustomMessageSubOnLine) {
|
||||
///房主的主播上线了
|
||||
Custom_Message_Type_Attention_Member_Online = 61
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Queue
|
||||
typedef NS_ENUM(NSInteger, CustomMessageSubQueue) {
|
||||
///邀请上麦
|
||||
Custom_Message_Sub_Queue_Invite = 81,
|
||||
///踢下麦
|
||||
Custom_Message_Sub_Queue_Kick = 82,
|
||||
};
|
||||
@@ -153,12 +59,6 @@ typedef NS_ENUM(NSUInteger, CustomMessageSubFace) {
|
||||
Custom_Message_Sub_Face_Send = 91,
|
||||
};
|
||||
|
||||
///first == CustomMessageType_Tweet
|
||||
typedef NS_ENUM(NSInteger, CustomMessageSubTweet) {
|
||||
///推文的内容
|
||||
Custom_Message_Sub_Tweet_News = 101,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_ALLMicroSend
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubAllMicroSend) {
|
||||
///全麦送礼物
|
||||
@@ -171,10 +71,6 @@ typedef NS_ENUM(NSUInteger, CustomMessageSubAllMicroSend) {
|
||||
Custom_Message_Sub_AllMicroLuckySend = 125,
|
||||
};
|
||||
|
||||
///first == CustomMessageType_Car_Notify
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubCar) {
|
||||
Custom_Message_Sub_Car_EnterRoom = 159, //进房动画
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Kick_User
|
||||
typedef NS_ENUM(NSUInteger, CustomNotificationSubKick) {
|
||||
@@ -185,377 +81,12 @@ typedef NS_ENUM(NSUInteger, CustomNotificationSubKick) {
|
||||
};
|
||||
|
||||
|
||||
///first = CustomMessageType_Secretary
|
||||
typedef NS_ENUM(NSUInteger, CustomNotificationSecretary) {
|
||||
///跳转页面
|
||||
Custom_Message_Sub_Secretary_Router = 191,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Update_RoomInfo
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubUpdateRoomInfo) {
|
||||
///动画开关状态更新
|
||||
Custom_Message_Sub_Update_RoomInfo_AnimateEffect = 201,
|
||||
///公屏开关更新
|
||||
Custom_Message_Sub_Update_RoomInfo_MessageState = 203,
|
||||
///通用公屏提示文案, 公屏纯文本展示消息 data[@"tip"]
|
||||
Custom_Message_Sub_Update_RoomInfo_Notice = 204,
|
||||
///红包开关通知
|
||||
Custom_Message_Sub_Update_RoomInfo_RedPacket = 205,
|
||||
///清空公屏
|
||||
Custom_Message_Sub_Update_RoomInfo_CleanScreen = 206,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Application_Share
|
||||
typedef NS_ENUM(NSInteger, CustomMessageSubApplicationShare) {
|
||||
///分享房间
|
||||
Custom_Message_Sub_Application_Share_Room = 221,
|
||||
};
|
||||
|
||||
|
||||
///first = CustomMessageType_Applica
|
||||
typedef NS_ENUM(NSInteger, CustomMessageSubMessageHandle) {
|
||||
Custom_Message_Sub_Message_Handle_Content = 231, //文本
|
||||
Custom_Message_Sub_Message_Handle_Bussiness = 232, //业务
|
||||
};
|
||||
|
||||
///first = CustomMessageType_User_UpGrade
|
||||
typedef NS_ENUM(NSInteger, CustomMessageSubUserUpgrade) {
|
||||
///用户等级
|
||||
Custom_Message_Sub_User_UpGrade_Exper = 241,
|
||||
///魅力等级
|
||||
Custom_Message_Sub_User_UpGrade_Charm = 242
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Candy_Tree
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubCandyTree) {
|
||||
//.自己可见 一级礼物(最小)
|
||||
Custom_Message_Sub_Candy_Tree_Me = 261,
|
||||
///当前房间可见 二级礼物
|
||||
Custom_Message_Sub_Candy_Tree_InRoom = 262,
|
||||
///所有房间可见 三级礼物
|
||||
Custom_Message_Sub_Candy_Tree_AllRoom = 263,
|
||||
///所有房间可见+小秘书 四级礼物
|
||||
Custom_Message_Sub_Candy_Tree_AllRoom_Notify = 264,
|
||||
///五级礼物
|
||||
Custom_Message_Sub_Candy_Tree_InRoom_NeedAllMicSend = 265,
|
||||
//暴击的没用 不写了
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Arrange_Mic
|
||||
typedef NS_ENUM(NSUInteger, CustomNotiHeaderArrangeMic) {
|
||||
///队列从无人排麦到有人排麦
|
||||
Custom_Message_Sub_Arrange_Mic_Non_Empty= 301,
|
||||
///队列从有人排麦到无人排麦
|
||||
Custom_Message_Sub_Arrange_Mic_Empty= 302,
|
||||
///开启排麦
|
||||
Custom_Message_Sub_Arrange_Mic_Mode_Open= 303,
|
||||
///关闭排麦
|
||||
Custom_Message_Sub_Arrange_Mic_Mode_Close= 304,
|
||||
///将坑位设置成自由麦
|
||||
Custom_Message_Sub_Arrange_Mic_Free_Mic_Open= 305,
|
||||
///将坑位设置为排麦
|
||||
Custom_Message_Sub_Arrange_Mic_Free_Mic_Close= 306,
|
||||
};
|
||||
|
||||
///first =CustomMessageType_Room_PK
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubRoomPK){
|
||||
///从无人报名pk排麦到有人报名pk排麦
|
||||
Custom_Message_Sub_Room_PK_Non_Empty = 311,
|
||||
///从有人报名pk排麦到无人报名pk排麦
|
||||
Custom_Message_Sub_Room_PK_Empty = 312,
|
||||
///创建了pk模式
|
||||
Custom_Message_Sub_Room_PK_Mode_Open = 313,
|
||||
///关闭pk模式
|
||||
Custom_Message_Sub_Room_PK_Mode_Close = 314,
|
||||
///pk开始
|
||||
Custom_Message_Sub_Room_PK_Start = 315,
|
||||
///pk结果
|
||||
Custom_Message_Sub_Room_PK_Result = 316,
|
||||
///重新开始
|
||||
Custom_Message_Sub_Room_PK_Re_Start= 317,
|
||||
///管理员邀请上麦(只用在客户端)
|
||||
Custom_Message_Sub_Room_PK_Manager_Up_Mic = 318,
|
||||
};
|
||||
|
||||
///first=CustomMessageType_Hall
|
||||
typedef NS_ENUM(NSUInteger, Custom_Noti_Sub_HALL) {
|
||||
///申请加入厅
|
||||
Custom_Message_Sub_Hall_Apply_Join = 321,
|
||||
///管理邀请入厅
|
||||
Custom_Message_Sub_Hall_Manager_Invite = 322,
|
||||
///申请退出厅
|
||||
Custom_Message_Sub_Hall_Apply_Exit = 323,
|
||||
///模厅普通通知
|
||||
Custom_Message_Sub_Hall_Notice = 324,
|
||||
///设置为模厅
|
||||
Custom_Message_Sub_Hall_Become_Hall = 325,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Room_GiftValue
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubRoomGiftValue) {
|
||||
///礼物值同步
|
||||
Custom_Message_Sub_Room_GiftValue_Sync = 421
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Version_Update)
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageVersionUpdateValue) {
|
||||
///版本升级
|
||||
Custom_Message_Version_Update_Value = 491
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Hall_Super_Admin
|
||||
typedef NS_ENUM(NSInteger, CustomMessageSubHallSuperAdmin) {
|
||||
///超管解除陪伴房的进房限制
|
||||
Custom_Message_Sub_Hall_Super_Admin_Remove_CP_Room_Limit = 501,
|
||||
///超管解除多人房的房间密码
|
||||
Custom_Message_Sub_Hall_Super_Admin_Remove_Room_Pwd = 502,
|
||||
///锁麦
|
||||
Custom_Message_Sub_Hall_Super_Admin_Lock_Mic = 503,
|
||||
///闭麦
|
||||
Custom_Message_Sub_Hall_Super_Admin_Mute_Mic = 504,
|
||||
///踢人下麦
|
||||
Custom_Message_Sub_Hall_Super_Admin_Kick_Down_Mic = 505,
|
||||
///拉黑
|
||||
Custom_Message_Sub_Hall_Super_Admin_Mark_Black = 506,
|
||||
///踢出房间
|
||||
Custom_Message_Sub_Hall_Super_Admin_Kick_Out_Room = 507,
|
||||
///踢管理员出房间
|
||||
Custom_Message_Sub_Hall_Super_Admin_Kick_Manager_Out_Room = 508,
|
||||
};
|
||||
|
||||
/// first == CustomMessageType_Monents
|
||||
typedef NS_ENUM(NSUInteger, Custom_Noti_Sub_Dynamic) {
|
||||
///未读更新
|
||||
Custom_Message_Sub_Monents_Unread_Update = 521,
|
||||
/// 违禁删除
|
||||
Custom_Message_Sub_Monents_Ban_Delete = 522,
|
||||
/// 动态审核通过
|
||||
Custom_Message_Sub_Monents_Approved = 523,
|
||||
/// app内分享动态
|
||||
Custom_Message_Sub_Monents_Share = 524,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Room_Welcome
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubRoomWelcome) {
|
||||
///欢迎Ta
|
||||
Custom_Message_Sub_Room_Welcome = 561,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_RedPacket
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubRedPacket) {
|
||||
Custom_Message_Sub_RoomGiftRedPacket = 601, //房间礼物红包
|
||||
Custom_Message_Sub_RoomDiamandRedPacket = 602, //房间钻石红包
|
||||
Custom_Message_Sub_AllGiftRedPacket = 603, //全服礼物红包
|
||||
Custom_Message_Sub_AllDiamandRedPacket = 604, //全服钻石红包
|
||||
Custom_Message_Sub_OpenRedPacketSuccess = 605,//抢红包成功
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Collection_Room
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubCollectRoom) {
|
||||
/// 福袋礼物房间飘屏通知
|
||||
Custom_Message_Sub_Room_Gift_LuckBag= 610,
|
||||
/// 福袋礼物全服飘屏通知
|
||||
Custom_Message_Sub_Room_Gift_LuckBag_Server = 611,
|
||||
};
|
||||
|
||||
///first == CustomMessageType_FindNew 发现萌新
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageFindNewUserGreet) {
|
||||
/// 打招呼
|
||||
Custom_Message_Find_New_Greet_New_User = 621,
|
||||
};
|
||||
///跳转类型
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageRouter) {
|
||||
/// 跳转H5
|
||||
Custom_Message_Router_H5 = 2,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_LuckyBag
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubLuckyBag) {
|
||||
///收藏房间公屏提示消息
|
||||
Custom_Message_Sub_Collect_Room_Tips = 591,
|
||||
/// 提醒用户收藏房间
|
||||
Custom_Message_Sub_Collect_Room_Remind_User = 592,
|
||||
};
|
||||
|
||||
///CustomMessageType_Tarot
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubTarot) {
|
||||
/// 塔罗中奖消息
|
||||
Custom_Message_Sub_Tarot = 711,
|
||||
};
|
||||
|
||||
///CustomMessageType_RoomPlay_Dating
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubRoomPlayDating){
|
||||
///选择心动用户
|
||||
Custom_Message_Sub_Room_Play_Dating_Pick_Heart= 721,
|
||||
///公布结果
|
||||
Custom_Message_Sub_Room_Play_Dating_Public_Result = 722,
|
||||
///选择了对象 但不是互选 客户端收到结果之后自动加到 公屏上
|
||||
Custom_Message_Sub_Room_Play_Dating_Result_Not_Mutual = 723,
|
||||
///互选的 客户端收到结果之后自动加到 公屏上
|
||||
Custom_Message_Sub_Room_Play_Dating_Result_Mutual = 724,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Chat_Risk_Alert
|
||||
/// 访客记录
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubChatRiskAlert) {
|
||||
/// 私聊风险提醒
|
||||
Custom_Message_Sub_Chat_Risk_Alert= 751,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_First_Recharge_Reward
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubFirstRecharge) {
|
||||
/// 首充完成
|
||||
Custom_Message_Sub_Room_First_Recharge_Reward= 761,
|
||||
/// 新用户专享优惠充值完成
|
||||
Custom_Message_Sub_New_User_Recharge_Reward = 762,
|
||||
};
|
||||
|
||||
/// 访客记录
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubVisitorRecord) {
|
||||
/// 访客记录
|
||||
Custom_Message_Sub_Visitor_Record = 781,
|
||||
};
|
||||
|
||||
///first == CustomMessageType_Room_Sailing
|
||||
typedef NS_ENUM(NSInteger, CustomMessageSubSailing) {
|
||||
//自己可见 一级礼物(最小)
|
||||
Custom_Message_Sub_Sailing_Me = 811,
|
||||
//当前房间可见 二级礼物
|
||||
Custom_Message_Sub_Sailing_InRoom = 812,
|
||||
//所有房间可见 三级礼物
|
||||
Custom_Message_Sub_Sailing_AllRoom = 813,
|
||||
//所有房间可见+小秘书 四级礼物(最大)
|
||||
Custom_Message_Sub_Sailing_AllRoom_Notify = 814,
|
||||
//开箱子开到全麦送 (服务端发)
|
||||
Custom_Message_Sub_Sailing_InRoom_NeedAllMicSend = 815,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Across_Room_PK
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubAcrossRoomPK) {
|
||||
/// 收到跨房PK邀请
|
||||
Custom_Message_Sub_AcrossRoomPK_Invite = 831,
|
||||
/// 拒绝跨房PK
|
||||
Custom_Message_Sub_AcrossRoomPK_Reject = 832,
|
||||
/// 接受跨房PK
|
||||
Custom_Message_Sub_AcrossRoomPK_Accept = 833,
|
||||
/// 面板消息
|
||||
Custom_Message_Sub_AcrossRoomPK_Panel = 834,
|
||||
/// 跨房PK结束通知
|
||||
Custom_Message_Sub_AcrossRoomPK_End = 835,
|
||||
/// 跨房PK结束飘屏
|
||||
Custom_Message_Sub_AcrossRoomPK_Result = 836,
|
||||
|
||||
///收到个播PK邀请
|
||||
Custom_Message_Sub_AnchorPK_Invite = 837,
|
||||
///拒绝个播pk
|
||||
Custom_Message_Sub_AnchorPK_Reject = 838,
|
||||
///接收个播PK
|
||||
Custom_Message_Sub_AnchorPK_Accept = 839,
|
||||
///个播PK面板消息
|
||||
Custom_Message_Sub_AnchorPK_Panel = 8310,
|
||||
///个播PK结束通知(收到后进入惩罚阶段)
|
||||
Custom_Message_Sub_AnchorPK_End = 8311,
|
||||
///个播PK结束飘屏
|
||||
Custom_Message_Sub_AnchorPK_Result = 8312,
|
||||
///个播PK完成
|
||||
Custom_Message_Sub_AnchorPK_Finish = 8313,
|
||||
///收到预约PK倒计时
|
||||
Custom_Message_Sub_PK_BeginTime = 8314,
|
||||
///匹配个播随机PK等待超时
|
||||
Custom_Message_Sub_AnchorPK_Match_TimeOut = 8315,
|
||||
///个播pk禁用对方麦克风
|
||||
Custom_Message_Sub_AnchorPK_MuteOtherMic = 8316,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Noble_VIP
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubNobleVIP) {
|
||||
/// 开通贵族房内消息(公屏显示)
|
||||
Custom_Message_Sub_Room_Open_Noble_VIP = 851,
|
||||
/// 开通贵族成功通知消息
|
||||
Custom_Message_Sub_Open_Noble_Success = 852,
|
||||
/// 贵族升级房内消息(公屏显示)
|
||||
Custom_Message_Sub_Room_Noble_LevelUp = 853,
|
||||
/// 贵族升级用户通知消息(弹窗)
|
||||
Custom_Message_Sub_Noble_LevelUp_User = 854,
|
||||
/// 贵族升级全服飘屏通知消息
|
||||
Custom_Message_Sub_Room_Noble_LevelUp_Suspend = 855,
|
||||
/// 贵族升级全服房间公屏通知消息
|
||||
Custom_Message_Sub_AllRoom_Noble_LevelUp_Suspend = 856,
|
||||
/// 贵族小喇叭房间消息
|
||||
Custom_Message_Sub_Room_Trumpet = 857,
|
||||
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Anchor_Hour_Rank
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageAnchorHourRank) {
|
||||
///个播小时榜
|
||||
Custom_Message_Sub_Anchor_Hour_Rank = 891,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Anchor_FansTeam
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageAnchorFansTeam) {
|
||||
///开通粉丝团成功
|
||||
Custom_Message_Sub_FansTeam_Open_Success = 901,
|
||||
///开通粉丝团失败
|
||||
Custom_Message_Sub_FansTeam_Open_Fail = 902,
|
||||
///用户加入粉丝团成功
|
||||
Custom_Message_Sub_FansTeam_Join_Success = 903,
|
||||
///用户退出粉丝团成功
|
||||
Custom_Message_Sub_FansTeam_Out_Success = 904,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Licnese_Hour_Rank
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageLicneseHourRank) {
|
||||
///牌照房小时榜
|
||||
Custom_Message_Sub_Licnese_Hour_Rank = 911,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Task_Complete
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageTaskComplete) {
|
||||
///任务完成通知
|
||||
Custom_Message_Sub_TaskComplete = 921,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Gift_Compound
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageGiftCompound) {
|
||||
///礼物合成通知
|
||||
Custom_Message_Sub_Gift_Compound = 931,
|
||||
};
|
||||
|
||||
///first = CustomMessageType_Graffiti_Gift
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageGraffitiGift) {
|
||||
///涂鸦礼物
|
||||
Custom_Message_Sub_Graffiti_Gift = 941,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSInteger, CustomMessageWishGift) {
|
||||
///开启心愿礼物
|
||||
Custom_Message_Sub_Wish_Gift_Open = 951,
|
||||
///心愿礼物完成
|
||||
Custom_Message_Sub_Wish_Gift_Finish = 952,
|
||||
///心愿礼物庆祝动效
|
||||
Custom_Message_Sub_Wish_Gift_Gelebrate = 953,
|
||||
///心愿礼物进度更新
|
||||
Custom_Message_Sub_Wish_Gift_Update = 954,
|
||||
///心愿礼物进度关闭
|
||||
Custom_Message_Sub_Wish_Gift_Close = 955,
|
||||
};
|
||||
|
||||
///星级厨房 CustomMessageType_Starred_Kitchen = 96,
|
||||
typedef NS_ENUM(NSInteger, CustomMessageStarredKitchen) {
|
||||
///星级厨房礼物房间飘屏通知(静态)
|
||||
Custom_Message_Sub_Starred_Kitchen_Banner_Static = 960,
|
||||
///星级厨房礼物房间飘屏通知动态)
|
||||
Custom_Message_Sub_Starred_Kitchen_Banner_Dynamic = 961 ,
|
||||
};
|
||||
///发起邀请 CustomMessageType_Initiat_Invitation
|
||||
|
||||
typedef NS_ENUM(NSInteger, CustomMessageTypeInitiatInvitation) {
|
||||
///发起用户或接单用户
|
||||
Custom_Message_Sub_Initiat_Invitation_Initiating_User = 1030,
|
||||
|
||||
|
||||
};
|
||||
@interface AttachmentModel : NSObject<NIMCustomAttachment>
|
||||
@property (nonatomic,assign) int first;
|
||||
@property (nonatomic,assign) int second;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// MessagePresenter.h
|
||||
// CHMessagePresenter.h
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MessagePresenter : BaseMvpPresenter
|
||||
@interface CHMessagePresenter : BaseMvpPresenter
|
||||
- (void)getChatLimitReceiverUid:(NSString *)receiverUid;
|
||||
|
||||
/// 获取用户信息
|
@@ -1,11 +1,11 @@
|
||||
//
|
||||
// MessagePresenter.m
|
||||
// CHMessagePresenter.m
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
//
|
||||
|
||||
#import "MessagePresenter.h"
|
||||
#import "CHMessagePresenter.h"
|
||||
#import "Api+Mine.h"
|
||||
#import "Api+Message.h"
|
||||
//Model
|
||||
@@ -13,9 +13,9 @@
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "ChatLimitModel.h"
|
||||
//Protocol
|
||||
#import "MessageProtocol.h"
|
||||
#import "CHMessageProtocol.h"
|
||||
|
||||
@implementation MessagePresenter
|
||||
@implementation CHMessagePresenter
|
||||
- (void)getChatLimitReceiverUid:(NSString *)receiverUid {
|
||||
[Api getChatLimit:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
ChatLimitModel *chatLimit = [ChatLimitModel modelWithJSON:data.data];
|
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// MessageProtocol.h
|
||||
// CHMessageProtocol.h
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol MessageProtocol <NSObject>
|
||||
@protocol CHMessageProtocol <NSObject>
|
||||
|
||||
- (void)onGetLimitChat:(ChatLimitModel *)chatLimit;
|
||||
///获取用户信息成功
|
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// MessageAudioCenter.h
|
||||
// CHMessageAudioCenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/4/22.
|
||||
@@ -9,10 +9,10 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class NIMMessage;
|
||||
@interface MessageAudioCenter : NSObject
|
||||
@interface CHMessageAudioCenter : NSObject
|
||||
+ (instancetype)shareInstance;
|
||||
@property (nonatomic,strong, readonly) NIMMessage *currentPlayingMessage;
|
||||
- (void)play:(NIMMessage *)message;
|
||||
- (void)playAudioMessage:(NIMMessage *)message;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,25 +1,25 @@
|
||||
//
|
||||
// MessageAudioCenter.m
|
||||
// CHMessageAudioCenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/4/22.
|
||||
//
|
||||
|
||||
#import "MessageAudioCenter.h"
|
||||
#import "CHMessageAudioCenter.h"
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
|
||||
@interface MessageAudioCenter ()<NIMMediaManagerDelegate>
|
||||
@interface CHMessageAudioCenter ()<NIMMediaManagerDelegate>
|
||||
@property (nonatomic,assign) NSInteger retryCount;
|
||||
@property (nonatomic,strong,nullable) NIMMessage *currentPlayingMessage;
|
||||
@end
|
||||
|
||||
@implementation MessageAudioCenter
|
||||
@implementation CHMessageAudioCenter
|
||||
|
||||
+ (instancetype)shareInstance {
|
||||
static MessageAudioCenter *instance;
|
||||
static CHMessageAudioCenter *instance;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
instance = [[MessageAudioCenter alloc] init];
|
||||
instance = [[CHMessageAudioCenter alloc] init];
|
||||
});
|
||||
return instance;
|
||||
}
|
||||
@@ -37,7 +37,7 @@
|
||||
_retryCount = 3;
|
||||
}
|
||||
|
||||
- (void)play:(NIMMessage *)message {
|
||||
- (void)playAudioMessage:(NIMMessage *)message {
|
||||
NIMAudioObject *audioObject = (NIMAudioObject *)message.messageObject;
|
||||
if ([audioObject isKindOfClass:[NIMAudioObject class]]) {
|
||||
self.currentPlayingMessage = message;
|
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// CHMessageConentAudioView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/4/22.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "CHMessageContentProtocol.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface CHMessageConentAudioView : UIView<CHMessageContentProtocol>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,18 +1,18 @@
|
||||
//
|
||||
// MessageConentAudioView.m
|
||||
// CHMessageConentAudioView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/4/22.
|
||||
//
|
||||
|
||||
#import "MessageConentAudioView.h"
|
||||
#import "CHMessageConentAudioView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "MessageAudioCenter.h"
|
||||
@interface MessageConentAudioView ()<NIMMediaManagerDelegate>
|
||||
#import "CHMessageAudioCenter.h"
|
||||
@interface CHMessageConentAudioView ()<NIMMediaManagerDelegate>
|
||||
///背景
|
||||
@property (nonatomic,strong) UIView * backView;
|
||||
///显示语音的时长
|
||||
@@ -25,7 +25,7 @@
|
||||
@property (nonatomic,assign) BOOL isPlaying;
|
||||
@end
|
||||
|
||||
@implementation MessageConentAudioView
|
||||
@implementation CHMessageConentAudioView
|
||||
|
||||
- (void)dealloc {
|
||||
[[NIMSDK sharedSDK].mediaManager removeDelegate:self];
|
||||
@@ -70,7 +70,7 @@
|
||||
#pragma mark - NIMMediaManagerDelegate
|
||||
- (void)playAudio:(NSString *)filePath didBeganWithError:(NSError *)error {
|
||||
if(filePath && !error) {
|
||||
if ([MessageAudioCenter shareInstance].currentPlayingMessage == self.message) {
|
||||
if ([CHMessageAudioCenter shareInstance].currentPlayingMessage == self.message) {
|
||||
[self.audioImageView startAnimating];
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,7 @@
|
||||
} else {
|
||||
self.isPlaying = YES;
|
||||
[[NIMSDK sharedSDK].mediaManager switchAudioOutputDevice:NIMAudioOutputDeviceSpeaker];
|
||||
[[MessageAudioCenter shareInstance] play:self.message];
|
||||
[[CHMessageAudioCenter shareInstance] playAudioMessage:self.message];
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// SessionAudioRecordView.h
|
||||
// CHSessionAudioRecordView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/4/21.
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface SessionAudioRecordView : UIView
|
||||
@interface CHSessionAudioRecordView : UIView
|
||||
|
||||
- (void)configAudioRecord:(NSString *)imageName title:(NSString *)title isAnimation:(BOOL)isAnimation;
|
||||
///开始录音
|
@@ -1,16 +1,16 @@
|
||||
//
|
||||
// SessionAudioRecordView.m
|
||||
// CHSessionAudioRecordView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/4/21.
|
||||
//
|
||||
|
||||
#import "SessionAudioRecordView.h"
|
||||
#import "CHSessionAudioRecordView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
|
||||
@interface SessionAudioRecordView ()
|
||||
@interface CHSessionAudioRecordView ()
|
||||
///背景
|
||||
@property (nonatomic,strong) UIView * backView;
|
||||
///显示图片
|
||||
@@ -21,7 +21,7 @@
|
||||
@property (nonatomic,strong) UILabel *timeLabel;
|
||||
@end
|
||||
|
||||
@implementation SessionAudioRecordView
|
||||
@implementation CHSessionAudioRecordView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// SessionInfoViewController.h
|
||||
// CHSessionInfoViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/4/25.
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface SessionInfoViewController : BaseViewController
|
||||
@interface CHSessionInfoViewController : BaseViewController
|
||||
///用户的id
|
||||
@property (nonatomic,copy) NSString *userId;
|
||||
@end
|
@@ -1,11 +1,11 @@
|
||||
//
|
||||
// SessionInfoViewController.m
|
||||
// CHSessionInfoViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/4/25.
|
||||
//
|
||||
|
||||
#import "SessionInfoViewController.h"
|
||||
#import "CHSessionInfoViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
@@ -18,7 +18,7 @@
|
||||
#import "YMWebViewController.h"
|
||||
|
||||
|
||||
@interface SessionInfoViewController ()
|
||||
@interface CHSessionInfoViewController ()
|
||||
///最外面的容器
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
///用户信息的view
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
@end
|
||||
|
||||
@implementation SessionInfoViewController
|
||||
@implementation CHSessionInfoViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// CHSessionMessageCell.h
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@class NIMMessage;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol CHSessionMessageCellDelegate <NSObject>
|
||||
|
||||
- (void)didTapAvatarWithUid:(NSString *)uid;
|
||||
///发送失败点击了重试
|
||||
- (void)didFailRetryMessage:(NIMMessage *)message;
|
||||
|
||||
@end
|
||||
|
||||
@interface CHSessionMessageCell : UITableViewCell
|
||||
|
||||
+ (CGFloat)measureHeight:(NIMMessage *)message;
|
||||
- (void)renderWithMessage:(NIMMessage *)message;
|
||||
+ (NSString *)cellContent:(NIMMessage *)message;
|
||||
|
||||
|
||||
@property (nonatomic,weak) id<CHSessionMessageCellDelegate> delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,28 +1,30 @@
|
||||
//
|
||||
// SessionMessageCell.m
|
||||
// CHSessionMessageCell.m
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
//
|
||||
|
||||
#import "SessionMessageCell.h"
|
||||
#import "CHSessionMessageCell.h"
|
||||
/// View
|
||||
#import "NetImageView.h"
|
||||
#import "MessageContentUnSupportView.h"
|
||||
#import "MessageContentText.h"
|
||||
#import "MessageContentImage.h"
|
||||
#import "CHMessageContentUnSupportView.h"
|
||||
#import "CHMessageContentText.h"
|
||||
#import "CHMessageContentImage.h"
|
||||
#import "CHMessageConentAudioView.h"
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "YMMacro.h"
|
||||
#import "NewEncryptTool.h"
|
||||
/// Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
/// P
|
||||
#import "MessageContentProtocol.h"
|
||||
#import "CHMessageContentProtocol.h"
|
||||
///Model
|
||||
//#import "AttachmentModel.h"
|
||||
|
||||
@interface SessionMessageCell()
|
||||
@interface CHSessionMessageCell()
|
||||
|
||||
/** 左侧头像(私聊对象)*/
|
||||
@property (nonatomic, strong) NetImageView * leftAvatar;
|
||||
@@ -37,13 +39,13 @@
|
||||
@property (nonatomic, strong) MASConstraint * messageBackgroundRight;
|
||||
|
||||
/** 消息内容实体 */
|
||||
@property (nonatomic, strong) UIView<MessageContentProtocol> * messageContent;
|
||||
@property (nonatomic, strong) UIView<CHMessageContentProtocol> * messageContent;
|
||||
///当前的消息
|
||||
@property (nonatomic,strong) NIMMessage *currentMessage;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SessionMessageCell
|
||||
@implementation CHSessionMessageCell
|
||||
|
||||
#pragma mark - Public Method
|
||||
+ (CGFloat)measureHeight:(NIMMessage *)message {
|
||||
@@ -56,12 +58,13 @@
|
||||
switch (message.messageType) {
|
||||
case NIMMessageTypeText:
|
||||
case NIMMessageTypeTip:
|
||||
measureHeight = [MessageContentText measureHeight:message];
|
||||
measureHeight = [CHMessageContentText measureHeight:message];
|
||||
break;
|
||||
case NIMMessageTypeImage:
|
||||
measureHeight = [MessageContentImage measureHeight:message];
|
||||
measureHeight = [CHMessageContentImage measureHeight:message];
|
||||
break;
|
||||
case NIMMessageTypeAudio:
|
||||
measureHeight = [CHMessageConentAudioView measureHeight:message];
|
||||
break;
|
||||
case NIMMessageTypeCustom:
|
||||
measureHeight = [self customMessageMeasureHeight:message];
|
||||
@@ -84,13 +87,13 @@
|
||||
self.rightAvatar.hidden = NO;
|
||||
[self.messageBackgroundLeft uninstall];
|
||||
[self.messageBackgroundRight install];
|
||||
self.rightAvatar.imageUrl = avatarUrl;
|
||||
self.rightAvatar.imageUrl = (avatarUrl == nil ||avatarUrl.length == 0) ? [NewEncryptTool MEW_aesDecrypt:@"xdPnNelVD/RTlTKFqgSrESDPcNF6Diqb8sLg+HEvxpvjDdTLom1euQUOAOppjx15"] : avatarUrl;;
|
||||
} else {
|
||||
self.leftAvatar.hidden = NO;
|
||||
self.rightAvatar.hidden = YES;
|
||||
[self.messageBackgroundLeft install];
|
||||
[self.messageBackgroundRight uninstall];
|
||||
self.leftAvatar.imageUrl = avatarUrl;
|
||||
self.leftAvatar.imageUrl = (avatarUrl == nil ||avatarUrl.length == 0) ? [NewEncryptTool MEW_aesDecrypt:@"xdPnNelVD/RTlTKFqgSrESDPcNF6Diqb8sLg+HEvxpvjDdTLom1euQUOAOppjx15"] : avatarUrl;;
|
||||
}
|
||||
|
||||
[self handleMessageFail:message];
|
||||
@@ -106,23 +109,26 @@
|
||||
switch (message.messageType) {
|
||||
case NIMMessageTypeText:
|
||||
case NIMMessageTypeTip:
|
||||
if (![self.messageContent isKindOfClass:[MessageContentText class]]) {
|
||||
self.messageContent = [[MessageContentText alloc] init];
|
||||
if (![self.messageContent isKindOfClass:[CHMessageContentText class]]) {
|
||||
self.messageContent = [[CHMessageContentText alloc] init];
|
||||
}
|
||||
break;
|
||||
case NIMMessageTypeImage:
|
||||
if (![self.messageContent isKindOfClass:[MessageContentImage class]]) {
|
||||
self.messageContent = [[MessageContentImage alloc] init];
|
||||
if (![self.messageContent isKindOfClass:[CHMessageContentImage class]]) {
|
||||
self.messageContent = [[CHMessageContentImage alloc] init];
|
||||
}
|
||||
break;
|
||||
case NIMMessageTypeAudio:
|
||||
if (![self.messageContent isKindOfClass:[CHMessageConentAudioView class]]) {
|
||||
self.messageContent = [[CHMessageConentAudioView alloc] init];
|
||||
}
|
||||
break;
|
||||
case NIMMessageTypeCustom:
|
||||
self.messageContent = [self getCustomMessageContentView:message];
|
||||
break;
|
||||
default:
|
||||
if (![self.messageContent isKindOfClass:[MessageContentUnSupportView class]]) {
|
||||
self.messageContent = [[MessageContentUnSupportView alloc] init];
|
||||
if (![self.messageContent isKindOfClass:[CHMessageContentUnSupportView class]]) {
|
||||
self.messageContent = [[CHMessageContentUnSupportView alloc] init];
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -137,15 +143,15 @@
|
||||
|
||||
+ (NSString *)cellContent:(NIMMessage *)message {
|
||||
if (message.messageType == NIMMessageTypeText || message.messageType == NIMMessageTypeTip) {
|
||||
return @"MessageContentText";
|
||||
return @"CHMessageContentText";
|
||||
} else if(message.messageType == NIMMessageTypeImage) {
|
||||
return @"MessageContentImage";
|
||||
return @"CHMessageContentImage";
|
||||
}else if(message.messageType == NIMMessageTypeAudio) {
|
||||
return @"MessageConentAudioView";
|
||||
return @"CHMessageConentAudioView";
|
||||
} else if(message.messageType == NIMMessageTypeCustom) {
|
||||
return @"MessageContentUnSupportView";
|
||||
return @"CHMessageContentUnSupportView";
|
||||
} else {
|
||||
return @"MessageContentUnSupportView";
|
||||
return @"CHMessageContentUnSupportView";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,21 +161,21 @@
|
||||
// 右边头像
|
||||
- (void)rightAvatarTapRecognizer {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didTapAvatar:)]) {
|
||||
[self.delegate didTapAvatar:self.currentMessage.from];
|
||||
[self.delegate didTapAvatarWithUid:self.currentMessage.from];
|
||||
}
|
||||
}
|
||||
|
||||
// 左边头像
|
||||
- (void)leftAvatarTapRecognizer {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didTapAvatar:)]) {
|
||||
[self.delegate didTapAvatar:self.currentMessage.from];
|
||||
[self.delegate didTapAvatarWithUid:self.currentMessage.from];
|
||||
}
|
||||
}
|
||||
|
||||
// 失败
|
||||
- (void)failButtonAction:(UIButton *)sender {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didFailRetry:)]) {
|
||||
[self.delegate didFailRetry:self.currentMessage];
|
||||
[self.delegate didFailRetryMessage:self.currentMessage];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,14 +183,14 @@
|
||||
/// 自定义消息的高度
|
||||
+ (CGFloat)customMessageMeasureHeight:(NIMMessage *)message {
|
||||
//暂不支持该信息
|
||||
return [MessageContentUnSupportView measureHeight:message];
|
||||
return [CHMessageContentUnSupportView measureHeight:message];
|
||||
}
|
||||
|
||||
- (UIView<MessageContentProtocol> *)getCustomMessageContentView:(NIMMessage *)message {
|
||||
if ([self.messageContent isKindOfClass:[MessageContentUnSupportView class]]) {
|
||||
- (UIView<CHMessageContentProtocol> *)getCustomMessageContentView:(NIMMessage *)message {
|
||||
if ([self.messageContent isKindOfClass:[CHMessageContentUnSupportView class]]) {
|
||||
return self.messageContent;
|
||||
}
|
||||
return [[MessageContentUnSupportView alloc] init];
|
||||
return [[CHMessageContentUnSupportView alloc] init];
|
||||
}
|
||||
|
||||
/// 设置失败按钮的显示或隐藏
|
||||
@@ -223,13 +229,6 @@
|
||||
|
||||
/// 是否展示头像
|
||||
- (BOOL)messageShowAvatar:(NIMMessage *)message {
|
||||
// if (message.messageType == NIMMessageTypeCustom) {
|
||||
// NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
// AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||
// if (attachment.first == CustomMessageType_Chat_Risk_Alert) {
|
||||
// return YES;
|
||||
// }
|
||||
// }
|
||||
return NO;
|
||||
}
|
||||
|
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// CHSessionNavView.h
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@class CHSessionNavView;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol CHSessionNavViewDelegate <NSObject>
|
||||
///点击了举报
|
||||
- (void)sessionNavView:(CHSessionNavView *)view didClickReport:(UIButton *)sender;
|
||||
///点击了关注
|
||||
- (void)sessionNavView:(CHSessionNavView *)view didClickLike:(UIButton *)sender;
|
||||
///点击了返回
|
||||
- (void)sessionNavView:(CHSessionNavView *)view didClickBack:(UIButton *)sender;
|
||||
|
||||
@end
|
||||
|
||||
@interface CHSessionNavView : UIView
|
||||
@property (nonatomic,copy) NSString *userId;
|
||||
///标题
|
||||
@property (nonatomic,copy) NSString *title;
|
||||
///是否已经关注了
|
||||
@property (nonatomic,assign) BOOL isLike;
|
||||
///代理
|
||||
@property (nonatomic,weak) id<CHSessionNavViewDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,11 +1,11 @@
|
||||
//
|
||||
// SessionNavView.m
|
||||
// CHSessionNavView.m
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
//
|
||||
|
||||
#import "SessionNavView.h"
|
||||
#import "CHSessionNavView.h"
|
||||
/// Tool
|
||||
#import "ThemeColor.h"
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
@@ -13,7 +13,7 @@
|
||||
/// Third
|
||||
#import <Masonry/Masonry.h>
|
||||
|
||||
@interface SessionNavView ()
|
||||
@interface CHSessionNavView ()
|
||||
///返回按钮
|
||||
@property (nonatomic,strong) UIButton *backButton;
|
||||
///标题
|
||||
@@ -25,7 +25,7 @@
|
||||
@property (nonatomic,strong) UIButton *reportButton;
|
||||
@end
|
||||
|
||||
@implementation SessionNavView
|
||||
@implementation CHSessionNavView
|
||||
#pragma mark - Init
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
@@ -147,9 +147,9 @@
|
||||
_likeButton.titleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
_likeButton.layer.cornerRadius = 21/2;
|
||||
_likeButton.layer.masksToBounds = YES;
|
||||
[_likeButton setTitleColor:UIColorFromRGB(0xFFDA24) forState:UIControlStateNormal];
|
||||
[_likeButton setTitleColor:UIColorFromRGB(0x9552FF) forState:UIControlStateNormal];
|
||||
_likeButton.layer.borderWidth = 0.5;
|
||||
_likeButton.layer.borderColor = UIColorFromRGB(0xFFDA24).CGColor;
|
||||
_likeButton.layer.borderColor = UIColorFromRGB(0x9552FF).CGColor;
|
||||
[_likeButton addTarget:self action:@selector(likeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
_likeButton.hidden = NO;
|
||||
}
|
@@ -9,7 +9,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class MessageMenuModel;
|
||||
@protocol SessionToolbarViewDelegate <NSObject>
|
||||
@protocol CHSessionToolbarViewDelegate <NSObject>
|
||||
|
||||
- (void)keyboardWillChangeFrame:(CGRect)rect;
|
||||
- (void)sendTextMessage:(NSString *)text;
|
||||
@@ -17,13 +17,13 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)didSelectMenuItem:(MessageMenuModel *)info;
|
||||
@end
|
||||
|
||||
@interface SessionToolbarView : UIView
|
||||
@interface CHSessionToolbarView : UIView
|
||||
///代理
|
||||
@property (nonatomic,weak) id<SessionToolbarViewDelegate> delegate;
|
||||
@property (nonatomic,weak) id<CHSessionToolbarViewDelegate> delegate;
|
||||
@property(nonatomic,assign) int model;
|
||||
@property (nonatomic, assign, getter=isSendDisabled) BOOL sendDisabled;
|
||||
///折叠 菜单view
|
||||
- (void)foldMenuView;
|
||||
- (void)foldToolMenuView;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -5,7 +5,7 @@
|
||||
// Created by 冯硕 on 2022/4/20.
|
||||
//
|
||||
|
||||
#import "SessionToolbarView.h"
|
||||
#import "CHSessionToolbarView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
@@ -16,13 +16,13 @@
|
||||
///Model
|
||||
#import "MessageMenuModel.h"
|
||||
///View
|
||||
#import "MessageToolMenuCollectionViewCell.h"
|
||||
#import "SessionAudioRecordView.h"
|
||||
#import "CHMessageToolMenuCollectionViewCell.h"
|
||||
#import "CHSessionAudioRecordView.h"
|
||||
|
||||
#define TOOL_HEIGHT 60
|
||||
#define MENU_HEIGHT 130
|
||||
|
||||
@interface SessionToolbarView ()<UICollectionViewDelegate, UICollectionViewDataSource, UITextFieldDelegate, NIMMediaManagerDelegate>
|
||||
@interface CHSessionToolbarView ()<UICollectionViewDelegate, UICollectionViewDataSource, UITextFieldDelegate, NIMMediaManagerDelegate>
|
||||
///最大的那个容器
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
///上部分的功能的容器
|
||||
@@ -46,10 +46,10 @@
|
||||
///菜单数据
|
||||
@property (nonatomic,strong) NSArray<MessageMenuModel *> *menuList;
|
||||
///录音的view
|
||||
@property (nonatomic,strong) SessionAudioRecordView *audioRecordView;
|
||||
@property (nonatomic,strong) CHSessionAudioRecordView *audioRecordView;
|
||||
@end
|
||||
|
||||
@implementation SessionToolbarView
|
||||
@implementation CHSessionToolbarView
|
||||
|
||||
- (void)dealloc {
|
||||
[[NIMSDK sharedSDK].mediaManager removeDelegate:self];
|
||||
@@ -67,7 +67,7 @@
|
||||
return self;
|
||||
}
|
||||
#pragma mark - Public Method
|
||||
- (void)foldMenuView {
|
||||
- (void)foldToolMenuView {
|
||||
[self.inputView resignFirstResponder];
|
||||
if (self.collectionView.hidden == NO) {
|
||||
self.collectionView.hidden = YES;
|
||||
@@ -154,7 +154,7 @@
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
MessageToolMenuCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([MessageToolMenuCollectionViewCell class]) forIndexPath:indexPath];
|
||||
CHMessageToolMenuCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([CHMessageToolMenuCollectionViewCell class]) forIndexPath:indexPath];
|
||||
MessageMenuModel * model = [self.menuList safeObjectAtIndex1:indexPath.row];
|
||||
cell.imageName = model.imageName;
|
||||
return cell;
|
||||
@@ -445,7 +445,7 @@
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
_collectionView.hidden = YES;
|
||||
[_collectionView registerClass:[MessageToolMenuCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([MessageToolMenuCollectionViewCell class])];
|
||||
[_collectionView registerClass:[CHMessageToolMenuCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([CHMessageToolMenuCollectionViewCell class])];
|
||||
}
|
||||
return _collectionView;
|
||||
}
|
||||
@@ -471,9 +471,9 @@
|
||||
return _menuList;
|
||||
}
|
||||
|
||||
- (SessionAudioRecordView *)audioRecordView {
|
||||
- (CHSessionAudioRecordView *)audioRecordView {
|
||||
if (!_audioRecordView) {
|
||||
_audioRecordView = [[SessionAudioRecordView alloc] init];
|
||||
_audioRecordView = [[CHSessionAudioRecordView alloc] init];
|
||||
}
|
||||
return _audioRecordView;
|
||||
}
|
@@ -1,16 +1,16 @@
|
||||
//
|
||||
// MessageContentImage.h
|
||||
// CHMessageContentImage.h
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "MessageContentProtocol.h"
|
||||
#import "CHMessageContentProtocol.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MessageContentImage : UIView<MessageContentProtocol>
|
||||
@interface CHMessageContentImage : UIView<CHMessageContentProtocol>
|
||||
|
||||
@end
|
||||
|
@@ -1,11 +1,11 @@
|
||||
//
|
||||
// MessageContentImage.m
|
||||
// CHMessageContentImage.m
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
//
|
||||
|
||||
#import "MessageContentImage.h"
|
||||
#import "CHMessageContentImage.h"
|
||||
#import "NetImageView.h"
|
||||
//#import "SDPhotoBrowser.h"
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#define MESSAGE_IMAGE_MAX_SIZE (CONTENT_WIDTH_MAX)
|
||||
#define MESSAGE_IMAGE_Min_SIZE (CONTENT_WIDTH_MAX -100)
|
||||
@interface MessageContentImage()
|
||||
@interface CHMessageContentImage()
|
||||
//<SDPhotoBrowserDelegate>
|
||||
|
||||
@property (nonatomic, strong) NetImageView * messageImage;
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
@end
|
||||
|
||||
@implementation MessageContentImage
|
||||
@implementation CHMessageContentImage
|
||||
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
@@ -87,22 +87,7 @@
|
||||
}
|
||||
|
||||
#pragma mark - SDPhotoBrowserDelegate
|
||||
//- (NSURL *)photoBrowser:(SDPhotoBrowser *)browser highQualityImageURLForIndex:(NSInteger)index {
|
||||
// return [NSURL URLWithString:self.imageObject.url];
|
||||
//}
|
||||
//
|
||||
//- (UIImage *)photoBrowser:(SDPhotoBrowser *)browser placeholderImageForIndex:(NSInteger)index {
|
||||
// return [UIImageConstant defalutBannerPlaceholder];
|
||||
//}
|
||||
//
|
||||
- (void)didTapImage {
|
||||
// SDPhotoBrowser *browser = [[SDPhotoBrowser alloc]init];
|
||||
// browser.sourceImagesContainerView = self;
|
||||
// browser.delegate = self;
|
||||
// browser.imageCount = 1;
|
||||
// browser.currentImageIndex = 0;
|
||||
// browser.isMe = NO;
|
||||
// [browser show];
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// MessageContentProtocol.h
|
||||
// CHMessageContentProtocol.h
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol MessageContentProtocol <NSObject>
|
||||
@protocol CHMessageContentProtocol <NSObject>
|
||||
|
||||
+ (CGFloat)measureHeight:(NIMMessage *)message;
|
||||
- (void)render:(NIMMessage *)message;
|
@@ -1,16 +1,16 @@
|
||||
//
|
||||
// MessageContentText.h
|
||||
// CHMessageContentText.h
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "MessageContentProtocol.h"
|
||||
#import "CHMessageContentProtocol.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MessageContentText : UIView<MessageContentProtocol>
|
||||
@interface CHMessageContentText : UIView<CHMessageContentProtocol>
|
||||
|
||||
@end
|
||||
|
@@ -1,11 +1,11 @@
|
||||
//
|
||||
// MessageContentText.m
|
||||
// CHMessageContentText.m
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
//
|
||||
|
||||
#import "MessageContentText.h"
|
||||
#import "CHMessageContentText.h"
|
||||
#import "ThemeColor.h"
|
||||
#import "NSObject+MJExtension.h"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#define MESSAGE_TEXT_PADDING 10
|
||||
|
||||
@interface MessageContentText()
|
||||
@interface CHMessageContentText()
|
||||
|
||||
/**
|
||||
消息文本
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
@end
|
||||
|
||||
@implementation MessageContentText
|
||||
@implementation CHMessageContentText
|
||||
|
||||
+ (CGFloat)measureHeight:(NIMMessage *)message {
|
||||
NSString * messageText = message.text;
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
CGSize dstRect = CGSizeMake(CONTENT_WIDTH_MAX - MESSAGE_TEXT_PADDING * 2, MAXFLOAT);
|
||||
|
||||
CGFloat msgHeight = [messageText boundingRectWithSize:dstRect options:NSStringDrawingUsesLineFragmentOrigin attributes:[MessageContentText messageTextAttibutes] context:nil].size.height;
|
||||
CGFloat msgHeight = [messageText boundingRectWithSize:dstRect options:NSStringDrawingUsesLineFragmentOrigin attributes:[CHMessageContentText messageTextAttibutes] context:nil].size.height;
|
||||
|
||||
return msgHeight + MESSAGE_TEXT_PADDING * 2 + CONTENT_PADDING_V_TOTAL;
|
||||
}
|
||||
@@ -64,7 +64,7 @@
|
||||
if (!messageText || (message.messageType != NIMMessageTypeTip && message.messageType != NIMMessageTypeText)) {
|
||||
messageText = @"未知消息类型";
|
||||
}
|
||||
_messageText.attributedText = [[NSAttributedString alloc] initWithString:messageText attributes:[MessageContentText messageTextAttibutes]];
|
||||
_messageText.attributedText = [[NSAttributedString alloc] initWithString:messageText attributes:[CHMessageContentText messageTextAttibutes]];
|
||||
}
|
||||
|
||||
- (UILabel *)messageText {
|
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// CHMessageContentUnSupportView.h
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "CHMessageContentProtocol.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface CHMessageContentUnSupportView : UIView<CHMessageContentProtocol>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,12 +1,12 @@
|
||||
//
|
||||
// MessageContentUnSupportView.m
|
||||
// CHMessageContentUnSupportView.m
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
//
|
||||
|
||||
|
||||
#import "MessageContentUnSupportView.h"
|
||||
#import "CHMessageContentUnSupportView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
@@ -15,12 +15,12 @@
|
||||
|
||||
#define MESSAGE_TEXT_PADDING 10
|
||||
|
||||
@interface MessageContentUnSupportView ()
|
||||
@interface CHMessageContentUnSupportView ()
|
||||
///不支持的类型
|
||||
@property (nonatomic,strong) UILabel *unSupportLabel;
|
||||
@end
|
||||
|
||||
@implementation MessageContentUnSupportView
|
||||
@implementation CHMessageContentUnSupportView
|
||||
|
||||
+ (CGFloat)measureHeight:(NIMMessage *)message {
|
||||
NSString * messageText = @"暂不支持此种类型消息";
|
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// MessageToolMenuCollectionViewCell.h
|
||||
// CHMessageToolMenuCollectionViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/4/20.
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MessageToolMenuCollectionViewCell : UICollectionViewCell
|
||||
@interface CHMessageToolMenuCollectionViewCell : UICollectionViewCell
|
||||
@property (nonatomic,copy) NSString *imageName;
|
||||
@end
|
||||
|
@@ -1,21 +1,21 @@
|
||||
//
|
||||
// MessageToolMenuCollectionViewCell.m
|
||||
// CHMessageToolMenuCollectionViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/4/20.
|
||||
//
|
||||
|
||||
#import "MessageToolMenuCollectionViewCell.h"
|
||||
#import "CHMessageToolMenuCollectionViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
@interface MessageToolMenuCollectionViewCell ()
|
||||
@interface CHMessageToolMenuCollectionViewCell ()
|
||||
|
||||
@property (nonatomic,strong) UIImageView *logoImageView;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation MessageToolMenuCollectionViewCell
|
||||
@implementation CHMessageToolMenuCollectionViewCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
@@ -1,17 +0,0 @@
|
||||
//
|
||||
// MessageContentUnSupportView.h
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "MessageContentProtocol.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MessageContentUnSupportView : UIView<MessageContentProtocol>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,16 +0,0 @@
|
||||
//
|
||||
// MessageConentAudioView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/4/22.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "MessageContentProtocol.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MessageConentAudioView : UIView<MessageContentProtocol>
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,32 +0,0 @@
|
||||
//
|
||||
// SessionMessageCell.h
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@class NIMMessage;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol SessionMessageCellDelegate <NSObject>
|
||||
///更新消息成功
|
||||
//- (void)updateMessageSuccess:(NIMMessage *)message;
|
||||
|
||||
- (void)didTapAvatar:(NSString *)uid;
|
||||
///发送失败点击了重试
|
||||
- (void)didFailRetry:(NIMMessage *)message;
|
||||
|
||||
@end
|
||||
|
||||
@interface SessionMessageCell : UITableViewCell
|
||||
|
||||
+ (CGFloat)measureHeight:(NIMMessage *)message;
|
||||
- (void)renderWithMessage:(NIMMessage *)message;
|
||||
+ (NSString *)cellContent:(NIMMessage *)message;
|
||||
|
||||
|
||||
@property (nonatomic,weak) id<SessionMessageCellDelegate> delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,33 +0,0 @@
|
||||
//
|
||||
// SessionNavView.h
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/16.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
@class SessionNavView;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol SessionNavViewDelegate <NSObject>
|
||||
///点击了举报
|
||||
- (void)sessionNavView:(SessionNavView *)view didClickReport:(UIButton *)sender;
|
||||
///点击了关注
|
||||
- (void)sessionNavView:(SessionNavView *)view didClickLike:(UIButton *)sender;
|
||||
///点击了返回
|
||||
- (void)sessionNavView:(SessionNavView *)view didClickBack:(UIButton *)sender;
|
||||
|
||||
@end
|
||||
|
||||
@interface SessionNavView : UIView
|
||||
@property (nonatomic,copy) NSString *userId;
|
||||
///标题
|
||||
@property (nonatomic,copy) NSString *title;
|
||||
///是否已经关注了
|
||||
@property (nonatomic,assign) BOOL isLike;
|
||||
///代理
|
||||
@property (nonatomic,weak) id<SessionNavViewDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -7,8 +7,8 @@
|
||||
|
||||
#import "SessionViewController.h"
|
||||
/// View
|
||||
#import "SessionNavView.h"
|
||||
#import "SessionMessageCell.h"
|
||||
#import "CHSessionNavView.h"
|
||||
#import "CHSessionMessageCell.h"
|
||||
/// Tool
|
||||
#import "YMMacro.h"
|
||||
#import "ThemeColor.h"
|
||||
@@ -22,26 +22,26 @@
|
||||
#import <MJRefresh/MJRefresh.h>
|
||||
#import <IQKeyboardManager/IQKeyboardManager.h>
|
||||
/// Presenter
|
||||
#import "MessagePresenter.h"
|
||||
#import "MessageProtocol.h"
|
||||
#import "CHMessagePresenter.h"
|
||||
#import "CHMessageProtocol.h"
|
||||
#import <TZImagePickerController/TZImagePickerController.h>
|
||||
/// Model
|
||||
#import "ChatLimitModel.h"
|
||||
#import "UserInfoModel.h"
|
||||
#import "SessionInfoViewController.h"
|
||||
#import "SessionToolbarView.h"
|
||||
#import "CHSessionInfoViewController.h"
|
||||
#import "CHSessionToolbarView.h"
|
||||
#import "NIMMessageMaker.h"
|
||||
#import "MessageMenuModel.h"
|
||||
|
||||
@interface SessionViewController ()<SessionToolbarViewDelegate,SessionNavViewDelegate,SessionMessageCellDelegate,MessageProtocol,
|
||||
@interface SessionViewController ()<CHSessionToolbarViewDelegate,CHSessionNavViewDelegate,CHSessionMessageCellDelegate,CHMessageProtocol,
|
||||
UITableViewDelegate, UITableViewDataSource,
|
||||
NIMChatManagerDelegate, NIMConversationManagerDelegate, NIMMediaManagerDelegate,TZImagePickerControllerDelegate>
|
||||
///导航栏
|
||||
@property (nonatomic,strong) SessionNavView *sessionNavView;
|
||||
@property (nonatomic,strong) CHSessionNavView *sessionNavView;
|
||||
/// 聊天内容
|
||||
@property (nonatomic, strong) UITableView * sessionTableView;
|
||||
///输入框
|
||||
@property (nonatomic,strong) SessionToolbarView *toolbarView;
|
||||
@property (nonatomic,strong) CHSessionToolbarView *toolbarView;
|
||||
//
|
||||
|
||||
@property (nonatomic, strong) NIMSession * session;
|
||||
@@ -58,8 +58,8 @@
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
- (MessagePresenter *)createPresenter {
|
||||
return [[MessagePresenter alloc] init];
|
||||
- (CHMessagePresenter *)createPresenter {
|
||||
return [[CHMessagePresenter alloc] init];
|
||||
}
|
||||
#pragma mark - Life Cycle
|
||||
- (void)viewDidLoad {
|
||||
@@ -98,26 +98,26 @@
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - SessionNavViewDelegate (导航事件回调)
|
||||
- (void)sessionNavView:(SessionNavView *)view didClickBack:(UIButton *)sender {
|
||||
#pragma mark - CHSessionNavViewDelegate (导航事件回调)
|
||||
- (void)sessionNavView:(CHSessionNavView *)view didClickBack:(UIButton *)sender {
|
||||
[self.navigationController popViewControllerAnimated:NO];
|
||||
}
|
||||
|
||||
// 关注
|
||||
- (void)sessionNavView:(SessionNavView *)view didClickLike:(UIButton *)sender {
|
||||
- (void)CHSessionNavView:(CHSessionNavView *)view didClickLike:(UIButton *)sender {
|
||||
[self.presenter attentionUser:self.session.sessionId];
|
||||
}
|
||||
|
||||
// 举报
|
||||
- (void)sessionNavView:(SessionNavView *)view didClickReport:(UIButton *)sender {
|
||||
SessionInfoViewController * reportVC = [[SessionInfoViewController alloc] init];
|
||||
- (void)CHSessionNavView:(CHSessionNavView *)view didClickReport:(UIButton *)sender {
|
||||
CHSessionInfoViewController * reportVC = [[CHSessionInfoViewController alloc] init];
|
||||
reportVC.userId = self.session.sessionId;
|
||||
[self.navigationController pushViewController:reportVC animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - SessionMessageCellDelegate(cell点击事件回调)
|
||||
#pragma mark - CHSessionMessageCellDelegate(cell点击事件回调)
|
||||
// cell点击用户头像回调
|
||||
- (void)didTapAvatar:(NSString *)uid {
|
||||
- (void)didTapAvatarWithUid:(NSString *)uid {
|
||||
if ([[ClientConfig shareConfig].configInfo.officialMsgUids containsObject:self.session.sessionId]
|
||||
|| [[ClientConfig shareConfig].configInfo.officialAccountUids containsObject:self.session.sessionId]) {
|
||||
//过滤官方账号
|
||||
@@ -130,7 +130,7 @@
|
||||
}
|
||||
|
||||
// cell失败重新发送回调
|
||||
- (void)didFailRetry:(NIMMessage *)message {
|
||||
- (void)didFailRetryMessage:(NIMMessage *)message {
|
||||
if (message.isReceivedMsg) {
|
||||
[[NIMSDK sharedSDK].chatManager fetchMessageAttachment:message error:nil];
|
||||
} else {
|
||||
@@ -139,7 +139,7 @@
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - MessageProtocol(获取数据成功回调)
|
||||
#pragma mark - CHMessageProtocol(获取数据成功回调)
|
||||
/// 限制聊天
|
||||
- (void)onGetLimitChat:(ChatLimitModel *)chatLimit {
|
||||
BOOL chatDisabled;
|
||||
@@ -263,12 +263,12 @@
|
||||
|
||||
- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
|
||||
NIMMessage * message = [self.messages safeObjectAtIndex1:indexPath.row];
|
||||
NSString * identifier = [SessionMessageCell cellContent:message];
|
||||
NSString * identifier = [CHSessionMessageCell cellContent:message];
|
||||
///从复用池中获取所需要的cell
|
||||
SessionMessageCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier];
|
||||
CHSessionMessageCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier];
|
||||
if (!cell) {
|
||||
///如果没有的话 根据identifier 注册一下 重新获取一下即可
|
||||
[tableView registerClass:[SessionMessageCell class] forCellReuseIdentifier:identifier];
|
||||
[tableView registerClass:[CHSessionMessageCell class] forCellReuseIdentifier:identifier];
|
||||
///如果注册过了 就不需要判断cell是否为空
|
||||
cell = [tableView dequeueReusableCellWithIdentifier:identifier];
|
||||
}
|
||||
@@ -280,7 +280,7 @@
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
NIMMessage *msg = [self.messages safeObjectAtIndex1:indexPath.row];
|
||||
return [SessionMessageCell measureHeight:msg];
|
||||
return [CHSessionMessageCell measureHeight:msg];
|
||||
}
|
||||
|
||||
|
||||
@@ -381,7 +381,7 @@
|
||||
|
||||
}
|
||||
- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
|
||||
[self.toolbarView foldMenuView];
|
||||
[self.toolbarView foldToolMenuView];
|
||||
}
|
||||
#pragma mark - MessageToolbarViewDelegate
|
||||
- (void)keyboardWillChangeFrame:(CGRect)rect {
|
||||
@@ -448,9 +448,9 @@
|
||||
}];
|
||||
}
|
||||
#pragma mark - Get
|
||||
- (SessionNavView *)sessionNavView {
|
||||
- (CHSessionNavView *)sessionNavView {
|
||||
if (!_sessionNavView) {
|
||||
_sessionNavView = [[SessionNavView alloc] init];
|
||||
_sessionNavView = [[CHSessionNavView alloc] init];
|
||||
_sessionNavView.delegate = self;
|
||||
}
|
||||
return _sessionNavView;
|
||||
@@ -464,7 +464,7 @@
|
||||
_sessionTableView.backgroundColor = UIColorFromRGB(0xF8F8FB);
|
||||
_sessionTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_sessionTableView.showsVerticalScrollIndicator = NO;
|
||||
[_sessionTableView registerClass:[SessionMessageCell class] forCellReuseIdentifier:NSStringFromClass([SessionMessageCell class])];
|
||||
[_sessionTableView registerClass:[CHSessionMessageCell class] forCellReuseIdentifier:NSStringFromClass([CHSessionMessageCell class])];
|
||||
}
|
||||
return _sessionTableView;
|
||||
}
|
||||
@@ -477,9 +477,9 @@
|
||||
}
|
||||
return _messages;
|
||||
}
|
||||
- (SessionToolbarView *)toolbarView {
|
||||
- (CHSessionToolbarView *)toolbarView {
|
||||
if (!_toolbarView) {
|
||||
_toolbarView = [[SessionToolbarView alloc] init];
|
||||
_toolbarView = [[CHSessionToolbarView alloc] init];
|
||||
_toolbarView.delegate = self;
|
||||
_toolbarView.sendDisabled = NO;
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@
|
||||
- (void)getCollectRoomList:(int)page pageSize:(int)pageSize state:(int)state type:(NSString *)type {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[Api requestMineCollectRoomList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray * array = [MineCollectRoomModel modelsWithArray:data.data[@"fansRoomList"]];
|
||||
NSArray *array = [MineCollectRoomModel modelsWithArray:data.data[@"fansRoomList"]];
|
||||
[[self getView] onGetCollectRoomListSuccess:array state:state];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] getCollectRoomListFail:state];
|
||||
|
@@ -10,6 +10,7 @@
|
||||
#import "MineCollectRoomModel.h"
|
||||
#import <Masonry/Masonry.h>
|
||||
#import "YMMacro.h"
|
||||
#import "ThemeColor.h"
|
||||
|
||||
@interface MewMineCollectionTableViewCell()
|
||||
@property (nonatomic, strong) NetImageView *avaterImageView;
|
||||
@@ -71,7 +72,7 @@
|
||||
- (NetImageView *)avaterImageView {
|
||||
if (!_avaterImageView) {
|
||||
_avaterImageView = [[NetImageView alloc] init];
|
||||
_avaterImageView.backgroundColor = UIColor.redColor;
|
||||
// _avaterImageView.backgroundColor = UIColor.redColor;
|
||||
}
|
||||
return _avaterImageView;
|
||||
}
|
||||
@@ -79,7 +80,6 @@
|
||||
- (UILabel *)roomTitleLabel {
|
||||
if (!_roomTitleLabel) {
|
||||
_roomTitleLabel = [[UILabel alloc] init];
|
||||
_roomTitleLabel.text = @"这是房间名这是房间名";
|
||||
_roomTitleLabel.textColor = UIColor.blackColor;
|
||||
_roomTitleLabel.font = kFontRegular(14);
|
||||
}
|
||||
@@ -89,7 +89,7 @@
|
||||
- (UIView *)lineView {
|
||||
if (!_lineView) {
|
||||
_lineView = [[UIView alloc] init];
|
||||
_lineView.backgroundColor = UIColor.grayColor;
|
||||
_lineView.backgroundColor = [ThemeColor dividerColor];
|
||||
}
|
||||
return _lineView;
|
||||
}
|
||||
|
@@ -1,25 +0,0 @@
|
||||
//
|
||||
// RoomFaceSendInfoModel.h
|
||||
// yinmeng-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/21.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RoomFaceSendInfoModel : NSObject
|
||||
///用户ID
|
||||
@property (assign, nonatomic) NSInteger uid;
|
||||
///用户昵称
|
||||
@property (copy, nonatomic) NSString *nick;
|
||||
///表情的id
|
||||
@property (assign, nonatomic) NSInteger faceId;
|
||||
///结果的图片
|
||||
@property (strong, nonatomic) UIImage *resultImage;
|
||||
///🎲数
|
||||
@property (strong, nonatomic) NSMutableArray *resultIndexes;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,12 +0,0 @@
|
||||
//
|
||||
// RoomFaceSendInfoModel.m
|
||||
// yinmeng-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/21.
|
||||
//
|
||||
|
||||
#import "RoomFaceSendInfoModel.h"
|
||||
|
||||
@implementation RoomFaceSendInfoModel
|
||||
|
||||
@end
|
@@ -10,10 +10,6 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
typedef enum : NSUInteger {
|
||||
// RtcEngineType_Agora = 1001, // 声网
|
||||
// RtcEngineType_Zego, // 即构
|
||||
// RtcEngineType_WJ, // 无界
|
||||
// RtcEngineType_AgoraFast, // 声网急速
|
||||
RtcEngineType_TRTC, // 腾讯TRTC
|
||||
} RtcEngineType;
|
||||
|
||||
|
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// @param complection 完成
|
||||
/// @param uid 用户的uid
|
||||
/// @param intoUid 自己的Uid 判断当前进房用户是否是平台超管 判断进房用户是否开启青少年
|
||||
+ (void)getRoomInfo:(HttpRequestHelperCompletion)complection
|
||||
+ (void)getRoomInformation:(HttpRequestHelperCompletion)complection
|
||||
uid:(NSString *)uid
|
||||
intoUid:(NSString *)intoUid;
|
||||
|
||||
|
@@ -13,7 +13,7 @@
|
||||
/// @param complection 完成
|
||||
/// @param uid 用户的uid
|
||||
/// @param intoUid 自己的Uid 判断当前进房用户是否是平台超管 判断进房用户是否开启青少年
|
||||
+ (void)getRoomInfo:(HttpRequestHelperCompletion)complection uid:(NSString *)uid intoUid:(NSString *)intoUid {
|
||||
+ (void)getRoomInformation:(HttpRequestHelperCompletion)complection uid:(NSString *)uid intoUid:(NSString *)intoUid {
|
||||
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"gs8/IEqGWXCD7Cn4Hs11dw=="];///room/get
|
||||
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, intoUid, nil];
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@
|
||||
}] uid:uid];
|
||||
|
||||
/// 获取房间信息
|
||||
[Api getRoomInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[Api getRoomInformation:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
RoomInfoModel *roomInfo = [RoomInfoModel modelWithJSON:data.data];
|
||||
[room sendNext:roomInfo];
|
||||
[room sendCompleted];
|
||||
@@ -58,18 +58,10 @@
|
||||
}
|
||||
/// 云信进房
|
||||
- (void)enterNIMRoom:(NSString *)roomUid user:(UserInfoModel *)userInfo {
|
||||
NSLog(@"[NIMSDK sharedSDK].loginManager.isLogined : %d",[NIMSDK sharedSDK].loginManager.isLogined);
|
||||
// if ([NIMSDK sharedSDK].loginManager.isLogined) {
|
||||
//
|
||||
// }
|
||||
|
||||
NIMChatroomEnterRequest *request = [[NIMChatroomEnterRequest alloc] init];
|
||||
request.roomId = roomUid;
|
||||
YMMessageRemoteExtModel *extModel = [[YMMessageRemoteExtModel alloc] init];
|
||||
extModel.erbanNo = userInfo.erbanNo;
|
||||
extModel.fromUid = userInfo.fromUid;
|
||||
extModel.fromType = userInfo.fromType;
|
||||
extModel.fromNick = userInfo.fromNick;
|
||||
extModel.vipIcon = userInfo.userVipInfoVO.vipIcon;
|
||||
extModel.gender = userInfo.gender;
|
||||
NSMutableDictionary *ext = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[NSString stringWithFormat:@"%ld", userInfo.uid]];
|
||||
|
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// CHRoomAnimationGroup.h
|
||||
// yinmeng-ios
|
||||
//
|
||||
// Created by 触海 on 2023/12/1.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface CHRoomAnimationGroup : NSObject
|
||||
|
||||
/// 图片运动的动画组
|
||||
/// @param startPoint 开始的点
|
||||
/// @param endPoint 结束的点
|
||||
+ (CAAnimationGroup *)createGiftAnimationStartPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// CHRoomAnimationGroup.m
|
||||
// yinmeng-ios
|
||||
//
|
||||
// Created by 触海 on 2023/12/1.
|
||||
//
|
||||
|
||||
#import "CHRoomAnimationGroup.h"
|
||||
#import "YMMacro.h"
|
||||
|
||||
@implementation CHRoomAnimationGroup
|
||||
|
||||
/// 图片运动的动画组
|
||||
/// @param startPoint 开始的点
|
||||
/// @param endPoint 结束的点
|
||||
+ (CAAnimationGroup *)createGiftAnimationStartPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint {
|
||||
CGPoint centerPoint = CGPointMake(KScreenWidth / 2, KScreenHeight / 2);
|
||||
CAKeyframeAnimation *animation0 = [CAKeyframeAnimation animation];
|
||||
animation0.duration = 0.8;
|
||||
animation0.keyPath = @"transform.scale";
|
||||
animation0.values = @[@1.0,@1.5,@2.0,@1.5];
|
||||
animation0.repeatCount = 1;
|
||||
animation0.calculationMode = kCAAnimationCubic;
|
||||
animation0.removedOnCompletion = NO;
|
||||
animation0.fillMode = kCAFillModeForwards;
|
||||
|
||||
CAKeyframeAnimation *animation1 = [CAKeyframeAnimation animation];
|
||||
animation1.duration = 0.8;
|
||||
animation1.beginTime = 0.8;
|
||||
animation1.keyPath = @"transform.scale";
|
||||
animation1.values = @[@1.5,@2.0,@2.5,@3.0];
|
||||
animation1.repeatCount = 1;
|
||||
animation1.calculationMode = kCAAnimationCubic;
|
||||
animation1.removedOnCompletion = NO;
|
||||
animation1.fillMode = kCAFillModeForwards;
|
||||
|
||||
|
||||
CAKeyframeAnimation *animation2 = [CAKeyframeAnimation animation];
|
||||
animation2.duration = 0.8;
|
||||
animation2.beginTime = 0.8;
|
||||
animation2.keyPath = @"position";
|
||||
animation2.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];;
|
||||
animation2.values = @[[NSValue valueWithCGPoint:startPoint],[NSValue valueWithCGPoint:CGPointMake(centerPoint.x ,centerPoint.y)]];
|
||||
animation2.repeatCount = 1;
|
||||
animation2.removedOnCompletion = NO;
|
||||
animation2.fillMode = kCAFillModeForwards;
|
||||
|
||||
CAKeyframeAnimation *animation3 = [CAKeyframeAnimation animation];
|
||||
animation3.duration = 0.8;
|
||||
animation3.beginTime = 2.6;//0.8+0.8+1
|
||||
animation3.keyPath = @"transform.scale";
|
||||
animation3.values = @[@3,@2.5,@2,@1.5,@1];
|
||||
animation3.repeatCount = 1;
|
||||
|
||||
CAKeyframeAnimation *animation4 = [CAKeyframeAnimation animation];
|
||||
animation4.duration = 0.8;
|
||||
animation4.beginTime = 2.6;
|
||||
animation4.keyPath = @"position";
|
||||
animation4.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
|
||||
animation4.values = @[[NSValue valueWithCGPoint:CGPointMake(centerPoint.x ,centerPoint.y)],[NSValue valueWithCGPoint:endPoint]];
|
||||
animation4.repeatCount = 1;
|
||||
|
||||
CAAnimationGroup *group = [CAAnimationGroup animation];
|
||||
group.duration = 3.2;
|
||||
group.animations = @[animation0,animation1,animation2, animation3,animation4];
|
||||
group.repeatCount = 1;
|
||||
group.removedOnCompletion = NO;
|
||||
group.fillMode = kCAFillModeForwards;
|
||||
|
||||
return group;
|
||||
}
|
||||
@end
|
@@ -6,15 +6,15 @@
|
||||
//
|
||||
|
||||
#import "YMRoomAnimationHitView.h"
|
||||
#import "RoomHostDelegate.h"
|
||||
#import "RoomGuestDelegate.h"
|
||||
#import "CHRoomHostDelegate.h"
|
||||
#import "CHRoomGuestDelegate.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YMRoomAnimationView : YMRoomAnimationHitView<RoomGuestDelegate>
|
||||
@interface YMRoomAnimationView : YMRoomAnimationHitView<CHRoomGuestDelegate>
|
||||
|
||||
-(void)resumeTimer;
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
|
||||
- (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -22,31 +22,16 @@
|
||||
#import "GiftInfoModel.h"
|
||||
/// Tool
|
||||
#import "YMGiftStorage.h"
|
||||
#import "CHRoomAnimationGroup.h"
|
||||
#import "YMMacro.h"
|
||||
|
||||
@interface YMRoomAnimationView()<HWDMP4PlayDelegate,SVGAPlayerDelegate>
|
||||
///最底层的
|
||||
@property (nonatomic,strong) YMRoomAnimationHitView * lowLevelView;
|
||||
///中层的
|
||||
@property (nonatomic,strong) YMRoomAnimationHitView * middleLevelView;
|
||||
///高层的
|
||||
@property (nonatomic,strong) YMRoomAnimationHitView * highLevleView;
|
||||
///动画管理类
|
||||
@property (strong, nonatomic) SVGAParser *parser;
|
||||
///VAP动画管理
|
||||
@property (nonatomic, strong) YMRoomGiftAnimationParser *vapParser;
|
||||
///送礼物的特效
|
||||
@property (nonatomic,strong) SVGAImageView *giftEffectView;
|
||||
///VAP特效
|
||||
@property (nonatomic, strong) VAPView *vapGiftEffectView;
|
||||
///代理
|
||||
@property (nonatomic,weak) id<RoomHostDelegate>delegate;
|
||||
@property (nonatomic,weak) id<CHRoomHostDelegate>delegate;
|
||||
///礼物特效的队列
|
||||
@property (nonatomic,strong) NSMutableArray<GiftReceiveInfoModel *> *giftEffectQueue;
|
||||
///复用池
|
||||
@property (strong,nonatomic)NSMutableSet * bannerDequePool;
|
||||
///可见池
|
||||
@property (strong,nonatomic)NSMutableSet * bannerVisiablePool;
|
||||
///礼物定时器 6s刷新一次
|
||||
@property (nonatomic,strong)dispatch_source_t giftEffectTimer;
|
||||
#pragma mark - 送礼物的动画的
|
||||
@@ -73,16 +58,13 @@
|
||||
dispatch_cancel(self.giftEffectTimer);
|
||||
self.giftEffectTimer = nil;
|
||||
}
|
||||
// if(self.luckyprizeTimer != nil){
|
||||
// dispatch_cancel(self.luckyprizeTimer);
|
||||
// self.luckyprizeTimer = nil;
|
||||
// }
|
||||
|
||||
if(self.giftTimer != nil){
|
||||
dispatch_cancel(self.giftTimer);
|
||||
self.giftTimer = nil;
|
||||
}
|
||||
}
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate {
|
||||
- (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
[[NIMSDK sharedSDK].broadcastManager addDelegate:self];
|
||||
@@ -96,8 +78,6 @@
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.lowLevelView];
|
||||
[self addSubview:self.middleLevelView];
|
||||
[self addSubview:self.highLevleView];
|
||||
|
||||
}
|
||||
|
||||
@@ -105,17 +85,9 @@
|
||||
[self.lowLevelView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
[self.middleLevelView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
[self.highLevleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - RoomGuestDelegate
|
||||
#pragma mark - CHRoomGuestDelegate
|
||||
- (void)handleNIMCustomMessage:(NIMMessage *)message {
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
@@ -135,71 +107,30 @@
|
||||
if (content.eventType == NIMChatroomEventTypeEnter) {
|
||||
NIMMessageChatroomExtension * messageExt = (NIMMessageChatroomExtension *)message.messageExt;
|
||||
NSDictionary * dic = [(NSDictionary *)messageExt.roomExt.toJSONObject objectForKey:message.from];
|
||||
// XPMessageRemoteExtModel * extModel = [XPMessageRemoteExtModel modelWithJSON:dic];
|
||||
// if (extModel.enterHide) {//隐身进房
|
||||
// if ([message.from isEqualToString:[AccountInfoStorage instance].getUid]) {
|
||||
// [self createEnterHideAnimation:dic];
|
||||
// }
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// [self userEnterRoom:content ext:extModel];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - 普通礼物
|
||||
///收到了礼物
|
||||
- (void)receiveGift:(GiftReceiveInfoModel *)receiveInfo {
|
||||
// if ([self isInSudGame]) {return;}
|
||||
///CPU警告的时候 需要停止接收动画
|
||||
RoomInfoModel * roomInfor = [self.delegate getRoomInfo];
|
||||
// if (receiveInfo.isLuckyBagGift) {
|
||||
// if (receiveInfo.isShowAnimation) {
|
||||
// //如果是福袋礼物的话 就不用看他的价值了 只要有SVGA的话 就播放
|
||||
// if (receiveInfo.displayGift.count > 0) {
|
||||
// [receiveInfo.displayGift enumerateObjectsUsingBlock:^(GiftInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
// if (obj.otherViewType == GiftOtherViewTypeMp4 && obj.viewUrl && obj.viewUrl.length > 0 && roomInfor.hasAnimationEffect) {
|
||||
// GiftReceiveInfoModel * model = [[GiftReceiveInfoModel alloc] init];
|
||||
// model.viewUrl = obj.viewUrl;
|
||||
// [self.giftEffectQueue addObject:model];
|
||||
// } else if (obj.hasVggPic && roomInfor.hasAnimationEffect) {
|
||||
// GiftReceiveInfoModel * model = [[GiftReceiveInfoModel alloc] init];
|
||||
// model.vggUrl = obj.vggUrl;
|
||||
// [self.giftEffectQueue addObject:model];
|
||||
// }
|
||||
// }];
|
||||
// }
|
||||
// } else {
|
||||
//
|
||||
// }
|
||||
// } else {
|
||||
GiftInfoModel *giftInfo = receiveInfo.gift != nil ? receiveInfo.gift : receiveInfo.giftInfo;
|
||||
if (!giftInfo) {
|
||||
giftInfo = [[YMGiftStorage shareStorage] findGiftInfo: receiveInfo.giftId];
|
||||
}
|
||||
///重新赋值一下 用的时候不用在查找了 真的没有的话 那就没有那个礼物了
|
||||
if (giftInfo) {
|
||||
receiveInfo.gift = giftInfo;
|
||||
}
|
||||
// if (receiveInfo.targetUsers.count > 0 && receiveInfo.targetUids.count <= 0) {
|
||||
// receiveInfo.targetUids = [receiveInfo.targetUsers valueForKeyPath:@"uid"];
|
||||
// }
|
||||
|
||||
NSInteger giftTotal = 0;
|
||||
if (receiveInfo.targetUids.count > 0) {
|
||||
giftTotal = receiveInfo.giftNum * giftInfo.goldPrice * receiveInfo.targetUids.count;
|
||||
} else {
|
||||
giftTotal = receiveInfo.giftNum * giftInfo.goldPrice;
|
||||
}
|
||||
|
||||
if (giftInfo.otherViewType == GiftOtherViewTypeMp4 && giftInfo.viewUrl.length > 0 && roomInfor.hasAnimationEffect) {
|
||||
receiveInfo.viewUrl = giftInfo.viewUrl;
|
||||
[self.giftEffectQueue addObject:receiveInfo];
|
||||
} else if (giftInfo.hasVggPic && giftInfo.vggUrl.length > 0 && roomInfor.hasAnimationEffect) {///SVGA动画
|
||||
receiveInfo.vggUrl = giftInfo.vggUrl;
|
||||
[self.giftEffectQueue addObject:receiveInfo];
|
||||
}
|
||||
// }
|
||||
RoomInfoModel * roomInfor = [self.delegate getRoomInformation];
|
||||
GiftInfoModel *giftInfo = receiveInfo.gift != nil ? receiveInfo.gift : receiveInfo.giftInfo;
|
||||
if (!giftInfo) {
|
||||
giftInfo = [[YMGiftStorage shareStorage] findGiftInfo: receiveInfo.giftId];
|
||||
}
|
||||
///重新赋值一下 用的时候不用在查找了 真的没有的话 那就没有那个礼物了
|
||||
if (giftInfo) {
|
||||
receiveInfo.gift = giftInfo;
|
||||
}
|
||||
|
||||
NSInteger giftTotal = 0;
|
||||
if (receiveInfo.targetUids.count > 0) {
|
||||
giftTotal = receiveInfo.giftNum * giftInfo.goldPrice * receiveInfo.targetUids.count;
|
||||
} else {
|
||||
giftTotal = receiveInfo.giftNum * giftInfo.goldPrice;
|
||||
}
|
||||
|
||||
|
||||
if (self.giftEffectTimer == nil && self.giftEffectQueue.count > 0) {
|
||||
[self startHandleGiftEffectTimer];
|
||||
@@ -241,170 +172,14 @@
|
||||
} else {
|
||||
giftTotal = receiveInfo.giftNum * giftInfo.goldPrice;
|
||||
}
|
||||
// if (giftTotal >= 520) {
|
||||
// __block XPRoomGiftBannerView *view = [self.bannerDequePool anyObject];
|
||||
// if (view == nil) {
|
||||
// view = [[XPRoomGiftBannerView alloc] init];
|
||||
// [self.bannerVisiablePool addObject:view];
|
||||
// }else{
|
||||
// [self.bannerDequePool removeObject:view];
|
||||
// }
|
||||
// [self removeGiftBannerView:view];
|
||||
// [view configGiftBanner:receiveInfo users:[self makeBannerUsers]];
|
||||
// view.frame = CGRectMake(KScreenWidth, 100, KScreenWidth, 153);
|
||||
// [self.lowLevelView addSubview:view];
|
||||
// POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
// springAnimation.springSpeed = 12;
|
||||
// springAnimation.springBounciness = 10.f;
|
||||
// springAnimation.fromValue = [NSValue valueWithCGPoint:view.center];
|
||||
// springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(view.frame.size.width / 2, view.center.y)];
|
||||
// @kWeakify(self);
|
||||
// [springAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
// @kStrongify(self);
|
||||
// if (finished) {
|
||||
// [self removeAnimation:view];
|
||||
// }
|
||||
// }];
|
||||
//
|
||||
// [springAnimation setAnimationDidStartBlock:^(POPAnimation *anim) {
|
||||
// @kStrongify(self);
|
||||
//
|
||||
// if (giftInfo.otherViewType == GiftOtherViewTypeMp4 && giftInfo.viewUrl.length > 0 && [self.delegate getRoomInfo].hasAnimationEffect) {
|
||||
// [self largeGiftStopCarEffect:giftInfo.goldPrice];
|
||||
// [self playGiftEffectWithVapUrl:giftInfo.viewUrl];
|
||||
// } else if (giftInfo.hasVggPic && giftInfo.vggUrl.length > 0 && [self.delegate getRoomInfo].hasAnimationEffect) {
|
||||
// [self largeGiftStopCarEffect:giftInfo.goldPrice];
|
||||
// [self playGiftEffect:giftInfo.vggUrl];
|
||||
// }
|
||||
// }];
|
||||
//
|
||||
// [view pop_addAnimation:springAnimation forKey:@"spingOutAnimation"];
|
||||
// } else {
|
||||
if (giftInfo.otherViewType == GiftOtherViewTypeMp4 && receiveInfo.viewUrl.length > 0) {//播放vap动效
|
||||
[self largeGiftStopCarEffect:giftInfo.goldPrice];
|
||||
[self playGiftEffectWithVapUrl:receiveInfo.viewUrl];
|
||||
} else if (receiveInfo.vggUrl.length > 0) {///如果有特效的话就播放特效
|
||||
[self largeGiftStopCarEffect:giftInfo.goldPrice];
|
||||
[self playGiftEffect:receiveInfo.vggUrl];
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
- (void)largeGiftStopCarEffect:(double)goldPrice {
|
||||
// if ([ClientConfig shareConfig].configInfo.hideCarEffectGiftPrice <= goldPrice) {
|
||||
// self.isLargeGiftAnimating = YES;
|
||||
// [self.carEffectView stopAnimation];
|
||||
// [self.carVapEffectView stopHWDMP4];
|
||||
// [self.carEffectQueue removeAllObjects];
|
||||
// }
|
||||
}
|
||||
|
||||
///播放礼物特效 SVGA的
|
||||
- (void)playGiftEffect:(NSString *)vggUrl {
|
||||
// if ([self isInSudGame]) {return;}
|
||||
self.giftEffectView.hidden = NO;
|
||||
if (self.giftEffectView.superview == nil) {
|
||||
[self.middleLevelView addSubview:self.giftEffectView];
|
||||
[self.giftEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.center.mas_equalTo(self.middleLevelView);
|
||||
make.width.mas_equalTo(KScreenWidth);
|
||||
make.height.mas_equalTo(KScreenHeight);
|
||||
}];
|
||||
}
|
||||
[self.parser parseWithURL:[NSURL URLWithString:vggUrl] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
|
||||
if (videoItem != nil) {
|
||||
CGFloat width = videoItem.videoSize.width;
|
||||
CGFloat height = videoItem.videoSize.height;
|
||||
if (width > height) {
|
||||
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
} else {//高大于宽
|
||||
CGFloat resizeH = KScreenWidth * height / width;//按照屏幕的宽度去缩放,获得高度
|
||||
if (resizeH > KScreenHeight) {//如果大于屏幕高度,填充
|
||||
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
} else {//小于屏幕高度,
|
||||
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
}
|
||||
self.giftEffectView.alpha = 1;
|
||||
self.giftEffectView.loops = 1;
|
||||
self.giftEffectView.clearsAfterStop = YES;
|
||||
self.giftEffectView.videoItem = videoItem;
|
||||
[self.giftEffectView startAnimation];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
///播放礼物特效 SVGA的
|
||||
- (void)playLuckyGiftEffect:(NSURL *)vggUrl {
|
||||
// if ([self isInSudGame]) {return;}
|
||||
// self.luckyGiftEffectView.hidden = NO;
|
||||
// if (self.luckyGiftEffectView.superview == nil) {
|
||||
// [self.middleLevelView addSubview:self.luckyGiftEffectView];
|
||||
// [self.luckyGiftEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.center.mas_equalTo(self.middleLevelView);
|
||||
// make.width.mas_equalTo(KScreenWidth);
|
||||
// make.height.mas_equalTo(KScreenHeight);
|
||||
// }];
|
||||
// }
|
||||
[self.parser parseWithURL:vggUrl completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
|
||||
if (videoItem != nil) {
|
||||
CGFloat width = videoItem.videoSize.width;
|
||||
CGFloat height = videoItem.videoSize.height;
|
||||
if (width > height) {
|
||||
// self.luckyGiftEffectView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
} else {//高大于宽
|
||||
CGFloat resizeH = KScreenWidth * height / width;//按照屏幕的宽度去缩放,获得高度
|
||||
if (resizeH > KScreenHeight) {//如果大于屏幕高度,填充
|
||||
// self.luckyGiftEffectView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
} else {//小于屏幕高度,
|
||||
// self.luckyGiftEffectView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
}
|
||||
// self.luckyGiftEffectView.alpha = 1;
|
||||
// self.luckyGiftEffectView.loops = 1;
|
||||
// self.luckyGiftEffectView.clearsAfterStop = YES;
|
||||
// self.luckyGiftEffectView.videoItem = videoItem;
|
||||
// [self.luckyGiftEffectView startAnimation];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
///播放礼物特效 vap的
|
||||
- (void)playGiftEffectWithVapUrl:(NSString *)vapUrl {
|
||||
self.vapGiftEffectView.hidden = NO;
|
||||
if (self.vapGiftEffectView.superview == nil) {
|
||||
[self.middleLevelView addSubview:self.vapGiftEffectView];
|
||||
[self.vapGiftEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.center.mas_equalTo(self.middleLevelView);
|
||||
make.width.mas_equalTo(KScreenWidth);
|
||||
make.height.mas_equalTo(KScreenHeight);
|
||||
}];
|
||||
}
|
||||
[self.vapParser parseWithURL:vapUrl completionBlock:^(NSString * _Nullable videoUrl) {
|
||||
if (videoUrl.length) {
|
||||
[self.vapGiftEffectView setMute:YES];
|
||||
[self.vapGiftEffectView playHWDMP4:videoUrl repeatCount:1 delegate:self];
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - 收到礼物展示动画
|
||||
- (void)receiveGiftHandleSendGiftAnimation:(AttachmentModel *)attachment {
|
||||
// if ([self isInSudGame]) {return;}
|
||||
if (!self.delegate.getRoomInfo.hasAnimationEffect) {return;}
|
||||
if (!self.delegate.getRoomInformation.hasAnimationEffect) {return;}
|
||||
GiftReceiveInfoModel * receiveInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data];
|
||||
GiftInfoModel * giftInfo = receiveInfo.gift ? receiveInfo.gift : receiveInfo.giftInfo;
|
||||
if (attachment.second == Custom_Message_Sub_AllMicroLuckySend || attachment.second == Custom_Message_Sub_AllBatchMicroLuckySend || attachment.second == Custom_Message_Sub_Gift_LuckySend) {
|
||||
// NSString * giftId = [NSString stringWithFormat:@"%ld", receiveInfo.luckyGiftList.giftList.firstObject.giftId];
|
||||
// giftInfo = [[XPGiftStorage shareStorage] findGiftInfo:giftId];
|
||||
}
|
||||
|
||||
if (giftInfo == nil) {
|
||||
giftInfo = [[YMGiftStorage shareStorage] findGiftInfo:receiveInfo.giftId];
|
||||
@@ -412,7 +187,6 @@
|
||||
|
||||
///在最外面判断是否可以拿到那个礼物 后面使用就不用判断了
|
||||
receiveInfo.gift = giftInfo;
|
||||
// receiveInfo.isLuckyBagGift = NO;
|
||||
[self.giftQueue addObject:receiveInfo];
|
||||
if (self.giftTimer == nil && self.giftQueue > 0) {
|
||||
[self startGiftQueueTimer];
|
||||
@@ -447,17 +221,10 @@
|
||||
CGPoint starPoint = [self getGiftAnimationPoint:sendUid isEnd:NO];
|
||||
CGPoint endPoint;
|
||||
NSArray * targetUids;
|
||||
// if (receiveInfo.isLuckyBagGift) {
|
||||
// targetUids = @[receiveInfo.targetUid];
|
||||
// } else {
|
||||
targetUids = receiveInfo.targetUids;
|
||||
if (targetUids.count <= 0) {
|
||||
// targetUids = [receiveInfo.targetUsers valueForKeyPath:@"uid"];
|
||||
// if (targetUids.count <=0) {
|
||||
targetUids = @[receiveInfo.targetUid];
|
||||
// }
|
||||
}
|
||||
// }
|
||||
targetUids = receiveInfo.targetUids;
|
||||
if (targetUids.count <= 0) {
|
||||
targetUids = @[receiveInfo.targetUid];
|
||||
}
|
||||
|
||||
for (NSString *targetUid in targetUids) {
|
||||
NSString * userId = targetUid;
|
||||
@@ -508,71 +275,12 @@
|
||||
}
|
||||
[giftImageView sd_setImageWithURL:[NSURL URLWithString:giftUrl]];
|
||||
[self.lowLevelView addSubview:giftImageView];
|
||||
CAAnimationGroup *group = [self createGiftAnimationStartPoint:startPoint endPoint:endPoint];
|
||||
|
||||
CAAnimationGroup *group = [CHRoomAnimationGroup createGiftAnimationStartPoint:startPoint endPoint:endPoint];
|
||||
[giftImageView.layer addAnimation:group forKey:@"giftDisplayViewAnimation"];
|
||||
[self performSelector:@selector(aniationDidFinish:) withObject:giftImageView afterDelay:(3.2+0.25)];
|
||||
}
|
||||
|
||||
/// 图片运动的动画组
|
||||
/// @param startPoint 开始的点
|
||||
/// @param endPoint 结束的点
|
||||
- (CAAnimationGroup *)createGiftAnimationStartPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint{
|
||||
CGPoint centerPoint = CGPointMake(KScreenWidth / 2, KScreenHeight / 2);
|
||||
CAKeyframeAnimation *animation0 = [CAKeyframeAnimation animation];
|
||||
animation0.duration = 0.8;
|
||||
animation0.keyPath = @"transform.scale";
|
||||
animation0.values = @[@1.0,@1.5,@2.0,@1.5];
|
||||
animation0.repeatCount = 1;
|
||||
animation0.calculationMode = kCAAnimationCubic;
|
||||
animation0.removedOnCompletion = NO;
|
||||
animation0.fillMode = kCAFillModeForwards;
|
||||
|
||||
CAKeyframeAnimation *animation1 = [CAKeyframeAnimation animation];
|
||||
animation1.duration = 0.8;
|
||||
animation1.beginTime = 0.8;
|
||||
animation1.keyPath = @"transform.scale";
|
||||
animation1.values = @[@1.5,@2.0,@2.5,@3.0];
|
||||
animation1.repeatCount = 1;
|
||||
animation1.calculationMode = kCAAnimationCubic;
|
||||
animation1.removedOnCompletion = NO;
|
||||
animation1.fillMode = kCAFillModeForwards;
|
||||
|
||||
|
||||
CAKeyframeAnimation *animation2 = [CAKeyframeAnimation animation];
|
||||
animation2.duration = 0.8;
|
||||
animation2.beginTime = 0.8;
|
||||
animation2.keyPath = @"position";
|
||||
animation2.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];;
|
||||
animation2.values = @[[NSValue valueWithCGPoint:startPoint],[NSValue valueWithCGPoint:CGPointMake(centerPoint.x ,centerPoint.y)]];
|
||||
animation2.repeatCount = 1;
|
||||
animation2.removedOnCompletion = NO;
|
||||
animation2.fillMode = kCAFillModeForwards;
|
||||
|
||||
CAKeyframeAnimation *animation3 = [CAKeyframeAnimation animation];
|
||||
animation3.duration = 0.8;
|
||||
animation3.beginTime = 2.6;//0.8+0.8+1
|
||||
animation3.keyPath = @"transform.scale";
|
||||
animation3.values = @[@3,@2.5,@2,@1.5,@1];
|
||||
animation3.repeatCount = 1;
|
||||
|
||||
CAKeyframeAnimation *animation4 = [CAKeyframeAnimation animation];
|
||||
animation4.duration = 0.8;
|
||||
animation4.beginTime = 2.6;
|
||||
animation4.keyPath = @"position";
|
||||
animation4.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
|
||||
animation4.values = @[[NSValue valueWithCGPoint:CGPointMake(centerPoint.x ,centerPoint.y)],[NSValue valueWithCGPoint:endPoint]];
|
||||
animation4.repeatCount = 1;
|
||||
|
||||
CAAnimationGroup *group = [CAAnimationGroup animation];
|
||||
group.duration = 3.2;
|
||||
group.animations = @[animation0,animation1,animation2, animation3,animation4];
|
||||
group.repeatCount = 1;
|
||||
group.removedOnCompletion = NO;
|
||||
group.fillMode = kCAFillModeForwards;
|
||||
|
||||
return group;
|
||||
}
|
||||
|
||||
- (void)aniationDidFinish:(FLAnimatedImageView *)giftImageView{
|
||||
[giftImageView removeFromSuperview];
|
||||
giftImageView.image = nil;
|
||||
@@ -582,71 +290,6 @@
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (SVGAImageView *)giftEffectView {
|
||||
if (!_giftEffectView) {
|
||||
_giftEffectView = [[SVGAImageView alloc]init];
|
||||
_giftEffectView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
|
||||
_giftEffectView.userInteractionEnabled = NO;
|
||||
_giftEffectView.delegate = self;
|
||||
_giftEffectView.hidden = YES;
|
||||
}
|
||||
return _giftEffectView;
|
||||
}
|
||||
|
||||
- (VAPView *)vapGiftEffectView {
|
||||
if (!_vapGiftEffectView) {
|
||||
_vapGiftEffectView = [[VAPView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||
_vapGiftEffectView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
|
||||
_vapGiftEffectView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_vapGiftEffectView.hidden = YES;
|
||||
}
|
||||
return _vapGiftEffectView;
|
||||
}
|
||||
|
||||
//- (SVGAImageView *)luckyGiftEffectView {
|
||||
// if (!_luckyGiftEffectView) {
|
||||
// _luckyGiftEffectView = [[SVGAImageView alloc]init];
|
||||
// _luckyGiftEffectView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
|
||||
// _luckyGiftEffectView.userInteractionEnabled = NO;
|
||||
// _luckyGiftEffectView.delegate = self;
|
||||
// _luckyGiftEffectView.hidden = YES;
|
||||
// }
|
||||
// return _luckyGiftEffectView;
|
||||
//}
|
||||
//
|
||||
//- (VAPView *)luckyVapGiftEffectView {
|
||||
// if (!_luckyVapGiftEffectView) {
|
||||
// _luckyVapGiftEffectView = [[VAPView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||
// _luckyVapGiftEffectView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
|
||||
// _luckyVapGiftEffectView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
// _luckyVapGiftEffectView.hidden = YES;
|
||||
// }
|
||||
// return _luckyVapGiftEffectView;
|
||||
//}
|
||||
|
||||
//- (VAPView *)carVapEffectView {
|
||||
// if (!_carVapEffectView) {
|
||||
// _carVapEffectView = [[VAPView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||
// _carVapEffectView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.3];
|
||||
// _carVapEffectView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
// _carVapEffectView.hidden = YES;
|
||||
// }
|
||||
// return _carVapEffectView;
|
||||
//}
|
||||
|
||||
- (YMRoomGiftAnimationParser *)vapParser {
|
||||
if (!_vapParser) {
|
||||
_vapParser = [[YMRoomGiftAnimationParser alloc] init];
|
||||
}
|
||||
return _vapParser;
|
||||
}
|
||||
|
||||
- (SVGAParser *)parser {
|
||||
if (!_parser) {
|
||||
_parser = [[SVGAParser alloc]init];
|
||||
}
|
||||
return _parser;
|
||||
}
|
||||
|
||||
- (NSMutableArray<GiftReceiveInfoModel *> *)giftEffectQueue {
|
||||
if (!_giftEffectQueue) {
|
||||
@@ -655,33 +298,6 @@
|
||||
return _giftEffectQueue;
|
||||
}
|
||||
|
||||
//- (NSMutableArray<YMGiftBigPrizeModel *> *)bigPrizeGiftQueue {
|
||||
// if (!_bigPrizeGiftQueue) {
|
||||
// _bigPrizeGiftQueue = [NSMutableArray array];
|
||||
// }
|
||||
// return _bigPrizeGiftQueue;
|
||||
//}
|
||||
//
|
||||
//- (NSMutableArray<YMRoomGiftBroadCastModel *> *)giftBroadcastQueue {
|
||||
// if (!_giftBroadcastQueue) {
|
||||
// _giftBroadcastQueue = [NSMutableArray array];
|
||||
// }
|
||||
// return _giftBroadcastQueue;
|
||||
//}
|
||||
|
||||
- (NSMutableSet *)bannerDequePool {
|
||||
if (!_bannerDequePool) {
|
||||
_bannerDequePool = [NSMutableSet set];
|
||||
}
|
||||
return _bannerDequePool;
|
||||
}
|
||||
- (NSMutableSet *)bannerVisiablePool {
|
||||
if (!_bannerVisiablePool) {
|
||||
_bannerVisiablePool = [NSMutableSet set];
|
||||
}
|
||||
return _bannerVisiablePool;
|
||||
}
|
||||
|
||||
- (YMRoomAnimationHitView *)lowLevelView {
|
||||
if (!_lowLevelView) {
|
||||
_lowLevelView = [[YMRoomAnimationHitView alloc] init];
|
||||
@@ -691,25 +307,6 @@
|
||||
return _lowLevelView;
|
||||
}
|
||||
|
||||
- (YMRoomAnimationHitView *)middleLevelView {
|
||||
if (!_middleLevelView) {
|
||||
_middleLevelView = [[YMRoomAnimationHitView alloc] init];
|
||||
_middleLevelView.backgroundColor = [UIColor clearColor];
|
||||
_middleLevelView.userInteractionEnabled = YES;
|
||||
_middleLevelView.tag = 1001;
|
||||
}
|
||||
return _middleLevelView;
|
||||
}
|
||||
|
||||
- (YMRoomAnimationHitView *)highLevleView {
|
||||
if (!_highLevleView) {
|
||||
_highLevleView = [[YMRoomAnimationHitView alloc] init];
|
||||
_highLevleView.backgroundColor = [UIColor clearColor];
|
||||
_highLevleView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _highLevleView;
|
||||
}
|
||||
|
||||
- (NSMutableArray<GiftReceiveInfoModel *> *)giftQueue {
|
||||
if (!_giftQueue) {
|
||||
_giftQueue = [NSMutableArray array];
|
||||
@@ -731,115 +328,5 @@
|
||||
return _giftVisibleArray;
|
||||
}
|
||||
|
||||
//- (NSMutableArray *)candyTreegiftQueue {
|
||||
// if (!_candyTreegiftQueue) {
|
||||
// _candyTreegiftQueue = [NSMutableArray array];
|
||||
// }
|
||||
// return _candyTreegiftQueue;
|
||||
//}
|
||||
//
|
||||
//- (NSMutableArray *)compoundGiftQueue {
|
||||
// if (!_compoundGiftQueue) {
|
||||
// _compoundGiftQueue = [NSMutableArray array];
|
||||
// }
|
||||
// return _compoundGiftQueue;
|
||||
//}
|
||||
//
|
||||
//- (NSMutableArray *)nobleLevelUpQueue {
|
||||
// if (!_nobleLevelUpQueue) {
|
||||
// _nobleLevelUpQueue = [NSMutableArray array];
|
||||
// }
|
||||
// return _nobleLevelUpQueue;
|
||||
//}
|
||||
//
|
||||
//- (NSMutableArray<NSDictionary *> *)carEffectQueue {
|
||||
// if (_carEffectQueue == nil) {
|
||||
// _carEffectQueue = [NSMutableArray array];
|
||||
// }
|
||||
// return _carEffectQueue;
|
||||
//}
|
||||
|
||||
//- (SVGAImageView *)carEffectView {
|
||||
// if (_carEffectView == nil) {
|
||||
// _carEffectView = [[SVGAImageView alloc]init];
|
||||
// _carEffectView.delegate = self;
|
||||
// _carEffectView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
// _carEffectView.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight);
|
||||
// _carEffectView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.3];
|
||||
// _carEffectView.alpha = 0;
|
||||
// _carEffectView.userInteractionEnabled = NO;
|
||||
// }
|
||||
// return _carEffectView;
|
||||
//}
|
||||
//
|
||||
//- (NSMutableArray<NSDictionary *> *)enterEffectQueue {
|
||||
// if (_enterEffectQueue == nil) {
|
||||
// _enterEffectQueue = [NSMutableArray array];
|
||||
// }
|
||||
// return _enterEffectQueue;
|
||||
//}
|
||||
|
||||
//- (SVGAImageView *)enterEffectView {
|
||||
// if (_enterEffectView == nil) {
|
||||
// _enterEffectView = [[SVGAImageView alloc]init];
|
||||
// _enterEffectView.delegate = self;
|
||||
// _enterEffectView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
// _enterEffectView.frame = CGRectMake(0, 0, KScreenWidth, 40);
|
||||
// _enterEffectView.backgroundColor = [UIColor clearColor];
|
||||
// _enterEffectView.alpha = 0;
|
||||
// _enterEffectView.userInteractionEnabled = NO;
|
||||
// }
|
||||
// return _enterEffectView;
|
||||
//}
|
||||
//
|
||||
//
|
||||
//- (SVGAImageView *)datingEffectView {
|
||||
// if (_datingEffectView == nil) {
|
||||
// _datingEffectView = [[SVGAImageView alloc]init];
|
||||
// _datingEffectView.delegate = self;
|
||||
// _datingEffectView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
// _datingEffectView.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight);
|
||||
// _datingEffectView.backgroundColor = [UIColor clearColor];
|
||||
// _datingEffectView.alpha = 0;
|
||||
// _datingEffectView.userInteractionEnabled = NO;
|
||||
// }
|
||||
// return _datingEffectView;
|
||||
//}
|
||||
|
||||
|
||||
//- (NSMutableArray<AcrossRoomPKPrizeModel *> *)acrossRoomPKQueue {
|
||||
// if (!_acrossRoomPKQueue) {
|
||||
// _acrossRoomPKQueue = [NSMutableArray array];
|
||||
// }
|
||||
// return _acrossRoomPKQueue;
|
||||
//}
|
||||
|
||||
//- (NSMutableArray<AttachmentModel *> *)sailingQueue {
|
||||
// if (!_sailingQueue) {
|
||||
// _sailingQueue = [NSMutableArray array];
|
||||
// }
|
||||
// return _sailingQueue;
|
||||
//}
|
||||
//
|
||||
//- (NSMutableArray<AttachmentModel *> *)graffitiGiftQueue {
|
||||
// if (!_graffitiGiftQueue) {
|
||||
// _graffitiGiftQueue = [NSMutableArray array];
|
||||
// }
|
||||
// return _graffitiGiftQueue;
|
||||
//}
|
||||
|
||||
|
||||
//- (SVGAImageView *)wishGiftEffectView {
|
||||
// if (_wishGiftEffectView == nil) {
|
||||
// _wishGiftEffectView = [[SVGAImageView alloc]init];
|
||||
// _wishGiftEffectView.delegate = self;
|
||||
// _wishGiftEffectView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
// _wishGiftEffectView.frame = CGRectMake(0, 0, 210, 183);
|
||||
// _wishGiftEffectView.backgroundColor = [UIColor clearColor];
|
||||
// _wishGiftEffectView.alpha = 1;
|
||||
// _wishGiftEffectView.userInteractionEnabled = NO;
|
||||
// }
|
||||
// return _wishGiftEffectView;
|
||||
//}
|
||||
|
||||
@end
|
||||
|
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// RoomAnimationProtocol.h
|
||||
// yinmeng-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/21.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
/** XPRoomAnimationView 用到的协议。
|
||||
|
||||
RoomVC 的子 View 之间的通信协议,通过 CHRoomHostDelegate 和 CHRoomGuestDelegate 继承实现。
|
||||
|
||||
调用方向:XPRoomAnimationView —> CHRoomHostDelegate —> CHRoomAnimationProtocol(CHRoomGuestDelegate继承)
|
||||
|
||||
*/
|
||||
@protocol CHRoomAnimationProtocol <NSObject>
|
||||
|
||||
@optional
|
||||
/**
|
||||
* StageView 专用。
|
||||
*/
|
||||
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid;
|
||||
@end
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MicroQueueProtocol.h"
|
||||
#import "RoomAnimationProtocol.h"
|
||||
#import "CHRoomAnimationProtocol.h"
|
||||
|
||||
@class NIMMessage, NIMRecentSession;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@@ -17,20 +17,19 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
**Note:**
|
||||
|
||||
继承 MicroQueueProtocol、RoomAnimationProtocol 等协议用于子 View 做实现。
|
||||
实现后的调用方向:子 View —> RoomHostDelegate —> XXXProtocol(RoomGuestDelegate)。
|
||||
继承 MicroQueueProtocol、CHRoomAnimationProtocol 等协议用于子 View 做实现。
|
||||
实现后的调用方向:子 View —> CHRoomHostDelegate —> XXXProtocol(RoomGuestDelegate)。
|
||||
*/
|
||||
|
||||
@protocol RoomGuestDelegate <NSObject, MicroQueueProtocol, RoomAnimationProtocol>
|
||||
@protocol CHRoomGuestDelegate <NSObject, MicroQueueProtocol, CHRoomAnimationProtocol>
|
||||
|
||||
@optional
|
||||
|
||||
- (void)onRoomUpdate;
|
||||
- (void)onUserUpdate;
|
||||
- (void)onRoomEntered;
|
||||
/// 个播 可以切换房间
|
||||
//- (void)onRoomChange;
|
||||
//- (void)onRoomMiniEntered;///最小化进房
|
||||
|
||||
/// NIM 事件监听
|
||||
- (void)handleNIMNotificationMessage:(NIMMessage *)message;
|
||||
- (void)handleNIMCustomMessage:(NIMMessage *)message;
|
||||
- (void)handleNIMTextMessage:(NIMMessage *)message;
|
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// CHCHRoomHostDelegate.h
|
||||
// yinmeng-ios
|
||||
//
|
||||
// Created by 触海 on 2023/12/1.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "MicroQueueProtocol.h"
|
||||
#import "CHRoomAnimationProtocol.h"
|
||||
@class RoomInfoModel, UserInfoModel;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol CHRoomHostDelegate <NSObject, MicroQueueProtocol,CHRoomAnimationProtocol>
|
||||
// 获取房间信息
|
||||
- (RoomInfoModel *)getRoomInformation;
|
||||
// 获取用户信息
|
||||
- (UserInfoModel *)getUserInformation;
|
||||
|
||||
/// 退出房间
|
||||
- (void)exitCurrentRoom;
|
||||
|
||||
/// 获取当前的导航控制器
|
||||
- (UINavigationController *)getCurrentNavigationController;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -6,17 +6,17 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RoomHostDelegate.h"
|
||||
#import "CHRoomHostDelegate.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YMRoomSendTextView : UIView
|
||||
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
|
||||
- (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate;
|
||||
///输入框
|
||||
@property (nonatomic, strong, readonly) UITextField *editTextFiled;
|
||||
///发小消息的弹框
|
||||
+ (instancetype)showTextView:(UIView *)view delegate:(id<RoomHostDelegate>)delegate atUid:(NSString *)uid atNick:(NSString *)nick;
|
||||
+ (instancetype)showTextView:(UIView *)view delegate:(id<CHRoomHostDelegate>)delegate;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -35,7 +35,7 @@
|
||||
///文本输入的内容
|
||||
@property (nonatomic,copy) NSString *inputMessage;
|
||||
///代理
|
||||
@property (nonatomic,weak) id<RoomHostDelegate> delegate;
|
||||
@property (nonatomic,weak) id<CHRoomHostDelegate> delegate;
|
||||
@end
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate {
|
||||
- (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate {
|
||||
self = [super initWithFrame:CGRectMake(0, KScreenHeight - 40, KScreenWidth, 40)];
|
||||
if (self) {
|
||||
self.delegate = delegate;
|
||||
@@ -59,78 +59,43 @@
|
||||
|
||||
|
||||
#pragma mark - Public Method
|
||||
+ (instancetype)showTextView:(UIView *)view delegate:(id<RoomHostDelegate>)delegate atUid:(NSString *)uid atNick:(NSString *)nick {
|
||||
__block YMRoomSendTextView * textView;
|
||||
+ (instancetype)showTextView:(UIView *)view delegate:(id<CHRoomHostDelegate>)delegate {
|
||||
__block YMRoomSendTextView * sendTextView;
|
||||
[view.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
if ([obj isKindOfClass:[YMRoomSendTextView class]]) {
|
||||
textView = obj;
|
||||
sendTextView = obj;
|
||||
*stop = YES;
|
||||
}
|
||||
}];
|
||||
if (textView == nil) {
|
||||
textView = [[YMRoomSendTextView alloc] initWithDelegate:delegate];
|
||||
[view addSubview:textView];
|
||||
if (sendTextView == nil) {
|
||||
sendTextView = [[YMRoomSendTextView alloc] initWithDelegate:delegate];
|
||||
[view addSubview:sendTextView];
|
||||
}
|
||||
textView.hidden = NO;
|
||||
sendTextView.hidden = NO;
|
||||
|
||||
if(textView.superview == nil ){
|
||||
[view addSubview:textView];
|
||||
if(sendTextView.superview == nil ){
|
||||
[view addSubview:sendTextView];
|
||||
}
|
||||
[textView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[sendTextView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(view);
|
||||
make.height.mas_equalTo(40);
|
||||
}];
|
||||
[textView.editTextFiled becomeFirstResponder];
|
||||
if (nick) {
|
||||
// [textView.atUids addObject:uid];
|
||||
// [textView.atNames addObject:[NSString stringWithFormat:@"@%@", nick]];
|
||||
textView.editTextFiled.text = [NSString stringWithFormat:@"%@@%@\u2004", textView.editTextFiled.text, nick];
|
||||
textView.inputMessage = textView.editTextFiled.text;
|
||||
textView.sendButton.enabled = YES;
|
||||
}
|
||||
return textView;
|
||||
[sendTextView.editTextFiled becomeFirstResponder];
|
||||
|
||||
return sendTextView;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Response
|
||||
- (void)sendButtonDidClick:(UIButton *)sender {
|
||||
UserInfoModel * userInfo = [self.delegate getUserInfo];
|
||||
UserInfoModel * userInfo = [self.delegate getUserInformation];
|
||||
YMMessageRemoteExtModel *extModel = [[YMMessageRemoteExtModel alloc] init];
|
||||
// extModel.defUser = userInfo.defUser;
|
||||
extModel.erbanNo = userInfo.erbanNo;
|
||||
// extModel.carName = userInfo.carName;
|
||||
// extModel.inRoomNameplatePic = userInfo.nameplatePic;
|
||||
// extModel.inRoomNameplateWord = userInfo.nameplateWord;
|
||||
// extModel.charmUrl = userInfo.userLevelVo.charmUrl;
|
||||
// extModel.experLevelSeq = userInfo.userLevelVo.experLevelSeq;
|
||||
// extModel.experUrl = userInfo.userLevelVo.experUrl;
|
||||
extModel.newUser = userInfo.newUser;
|
||||
extModel.vipIcon = userInfo.userVipInfoVO.vipIcon;
|
||||
// extModel.androidBubbleUrl = userInfo.androidBubbleUrl;
|
||||
// extModel.iosBubbleUrl = userInfo.iosBubbleUrl;
|
||||
// extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel;
|
||||
|
||||
NIMMessage * message = [[NIMMessage alloc] init];
|
||||
message.text = self.inputMessage;
|
||||
NSMutableDictionary *remoteExt = [NSMutableDictionary dictionaryWithObject:extModel.model2dictionary forKey:[AccountInfoStorage instance].getUid];
|
||||
//查找消息中是否有@人
|
||||
NSMutableArray *nickArray = [NSMutableArray array];
|
||||
NSMutableArray *uidArray = [NSMutableArray array];
|
||||
// for (int i = 0; i<self.atNames.count; i++) {
|
||||
// NSString *nick = self.atNames[i];
|
||||
// if ([self.editTextFiled.text containsString:nick]) {
|
||||
// if ([nickArray containsObject:nick]) {
|
||||
// continue;
|
||||
// } else {
|
||||
// [nickArray addObject:nick];
|
||||
// [uidArray addObject:self.atUids[i]];
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
id uidStr = [uidArray toJSONObject];
|
||||
id nickStr = [nickArray toJSONObject];
|
||||
// [remoteExt safeSetObject:uidStr forKey:@"atUids"];
|
||||
// [remoteExt safeSetObject:nickStr forKey:@"atNames"];
|
||||
message.remoteExt = remoteExt;
|
||||
|
||||
///网易易盾 拦截高风险
|
||||
@@ -138,14 +103,12 @@
|
||||
option.yidunEnabled = YES;
|
||||
option.businessId = KeyWithType(keyType_YiDunBussinessId);
|
||||
message.antiSpamOption = option;
|
||||
NSString * sessionId = [NSString stringWithFormat:@"%ld", [self.delegate getRoomInfo].roomId];
|
||||
NSString * sessionId = [NSString stringWithFormat:@"%ld", [self.delegate getRoomInformation].roomId];
|
||||
//构造会话
|
||||
NIMSession *session = [NIMSession session:sessionId type:NIMSessionTypeChatroom];
|
||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session completion:^(NSError * _Nullable error) {
|
||||
self.editTextFiled.text = @"";
|
||||
[self.editTextFiled resignFirstResponder];
|
||||
// [self.atUids removeAllObjects];
|
||||
// [self.atNames removeAllObjects];
|
||||
self.inputMessage = nil;
|
||||
}];
|
||||
}
|
||||
@@ -154,11 +117,11 @@
|
||||
[self.superview bringSubviewToFront:self];
|
||||
NSDictionary *info = [notification userInfo];
|
||||
NSValue *value = [info objectForKey:UIKeyboardFrameEndUserInfoKey];
|
||||
CGFloat keyBoardEndY = value.CGRectValue.origin.y;
|
||||
NSNumber *curve = [info objectForKey:UIKeyboardAnimationCurveUserInfoKey];
|
||||
CGFloat keyBoardY = value.CGRectValue.origin.y;
|
||||
NSNumber *curveUser = [info objectForKey:UIKeyboardAnimationCurveUserInfoKey];
|
||||
CGFloat duration = [[info objectForKey:UIKeyboardAnimationDurationUserInfoKey] floatValue];
|
||||
CGRect endKeyboardRect = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
|
||||
CGFloat h = endKeyboardRect.size.height;
|
||||
CGRect endRect = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
|
||||
CGFloat h = endRect.size.height;
|
||||
[UIView animateWithDuration:duration animations:^{
|
||||
[self mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.equalTo(self.superview);
|
||||
@@ -166,8 +129,8 @@
|
||||
make.bottom.equalTo(self.superview).offset(-h);
|
||||
}];
|
||||
[UIView setAnimationBeginsFromCurrentState:YES];
|
||||
[UIView setAnimationCurve:[curve intValue]];
|
||||
self.center = CGPointMake(self.center.x, keyBoardEndY - statusbarHeight - self.bounds.size.height/2.0);
|
||||
[UIView setAnimationCurve:[curveUser intValue]];
|
||||
self.center = CGPointMake(self.center.x, keyBoardY - statusbarHeight - self.bounds.size.height/2.0);
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -184,8 +147,8 @@
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)textFieldEditChanged:(NSNotification *)notification{
|
||||
UITextField *textField = (UITextField *)notification.object;
|
||||
-(void)textFieldEditChanged:(NSNotification *)noti{
|
||||
UITextField *textField = (UITextField *)noti.object;
|
||||
NSString *toBeString = textField.text;
|
||||
NSString *lang = [textField.textInputMode primaryLanguage];
|
||||
if ([lang isEqualToString:@"zh-Hans"]){// 简体中文输入
|
||||
@@ -219,11 +182,7 @@
|
||||
}
|
||||
}
|
||||
self.inputMessage = textField.text;
|
||||
if (self.inputMessage.length > 0) {
|
||||
self.sendButton.enabled = YES;
|
||||
} else {
|
||||
self.sendButton.enabled = NO;
|
||||
}
|
||||
self.sendButton.enabled = self.inputMessage.length > 0;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
@@ -273,8 +232,7 @@
|
||||
[_sendButton setTitle:@"发送" forState:UIControlStateNormal];
|
||||
_sendButton.titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
_sendButton.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
[_sendButton setBackgroundImage:[UIImage imageWithColor:[ThemeColor disableButtonColor] ]forState:UIControlStateDisabled];
|
||||
[_sendButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||
[_sendButton setBackgroundImage:[UIImage imageWithColor:[ThemeColor colorWithHexString:@"#9552FF"] ] forState:UIControlStateNormal];
|
||||
_sendButton.enabled = NO;
|
||||
_sendButton.layer.cornerRadius = 5.0;
|
||||
_sendButton.layer.masksToBounds = YES;
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPRoomMessageHeaderView : UIView
|
||||
@interface CHRoomMessageHeaderView : UIView
|
||||
///头部的背景颜色
|
||||
@property (nonatomic,strong) UIColor *bubbleColor;
|
||||
@end
|
@@ -5,7 +5,7 @@
|
||||
// Created by 触海 on 2023/11/21.
|
||||
//
|
||||
|
||||
#import "XPRoomMessageHeaderView.h"
|
||||
#import "CHRoomMessageHeaderView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
@@ -13,14 +13,14 @@
|
||||
#import "YMRoomMessageConstant.h"
|
||||
#import "YMMacro.h"
|
||||
|
||||
@interface XPRoomMessageHeaderView ()
|
||||
@interface CHRoomMessageHeaderView ()
|
||||
///背景
|
||||
@property (nonatomic,strong) UIView *bubbleView;
|
||||
@property (nonatomic,strong) UIView *bubbleBgView;
|
||||
///显示
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
@property (nonatomic,strong) UILabel *titleTextLabel;
|
||||
@end
|
||||
|
||||
@implementation XPRoomMessageHeaderView
|
||||
@implementation CHRoomMessageHeaderView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
@@ -33,62 +33,62 @@
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.bubbleView];
|
||||
[self addSubview:self.titleLabel];
|
||||
[self addSubview:self.bubbleBgView];
|
||||
[self addSubview:self.titleTextLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
/// 设置绿色消息
|
||||
NSString *title = @"平台严禁未成年人直播或打赏,倡导绿色互动,禁止宣传及发布政治、低俗、暴力、色情等违规违法内容,严禁违规交易和诱导欺诈用户,如有发现请及时举报。";
|
||||
self.titleLabel.text = title;
|
||||
CGFloat height = [self getHeaderViewHeight:title] + kRoomMessageTextSpaceHeight *2;
|
||||
self.titleTextLabel.text = title;
|
||||
CGFloat height = [self getHeaderViewHeight:title] + kRoomMessageTextSpace *2;
|
||||
[self mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kRoomMessageMaxWidth);
|
||||
make.height.mas_equalTo(height);
|
||||
}];
|
||||
|
||||
[self.bubbleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.bubbleBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.top.right.mas_equalTo(self);
|
||||
make.bottom.mas_equalTo(self).offset(-10);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.titleTextLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self).inset(10);
|
||||
make.centerY.mas_equalTo(self.bubbleView);
|
||||
make.centerY.mas_equalTo(self.bubbleBgView);
|
||||
}];
|
||||
}
|
||||
|
||||
///获取头部的高度
|
||||
- (CGFloat)getHeaderViewHeight:(NSString *)title {
|
||||
return [title boundingRectWithSize:CGSizeMake(kRoomMessageMaxWidth - 20, CGFLOAT_MAX) options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:kRoomMessageDefalutFont]} context:nil].size.height;
|
||||
return [title boundingRectWithSize:CGSizeMake(kRoomMessageMaxWidth - 20, CGFLOAT_MAX) options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:kRoomMessageTextFont]} context:nil].size.height;
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setBubbleColor:(UIColor *)bubbleColor {
|
||||
_bubbleColor = bubbleColor;
|
||||
if (_bubbleColor) {
|
||||
_bubbleView.backgroundColor = _bubbleColor;
|
||||
_bubbleBgView.backgroundColor = _bubbleColor;
|
||||
}
|
||||
}
|
||||
|
||||
- (UIView *)bubbleView {
|
||||
if (!_bubbleView) {
|
||||
_bubbleView = [[UIView alloc] init];
|
||||
_bubbleView.backgroundColor = [ThemeColor messageBubbleColor];
|
||||
_bubbleView.layer.masksToBounds = YES;
|
||||
_bubbleView.layer.cornerRadius = kRoomMessageBubbleCornerRadius;
|
||||
- (UIView *)bubbleBgView {
|
||||
if (!_bubbleBgView) {
|
||||
_bubbleBgView = [[UIView alloc] init];
|
||||
_bubbleBgView.backgroundColor = [ThemeColor messageBubbleColor];
|
||||
_bubbleBgView.layer.masksToBounds = YES;
|
||||
_bubbleBgView.layer.cornerRadius = kRoomMessageBubbleCornerRadius;
|
||||
}
|
||||
return _bubbleView;
|
||||
return _bubbleBgView;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:kRoomMessageDefalutFont];
|
||||
_titleLabel.textColor = UIColor.whiteColor;
|
||||
_titleLabel.numberOfLines = 0;
|
||||
- (UILabel *)titleTextLabel {
|
||||
if (!_titleTextLabel) {
|
||||
_titleTextLabel = [[UILabel alloc] init];
|
||||
_titleTextLabel.font = [UIFont systemFontOfSize:kRoomMessageTextFont];
|
||||
_titleTextLabel.textColor = UIColor.whiteColor;
|
||||
_titleTextLabel.numberOfLines = 0;
|
||||
}
|
||||
return _titleLabel;
|
||||
return _titleTextLabel;
|
||||
}
|
||||
|
||||
@end
|
@@ -12,10 +12,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YMMessageRemoteExtModel : NSObject
|
||||
@property (nonatomic,assign) NSInteger erbanNo;
|
||||
///跟随的
|
||||
@property (nonatomic,copy) NSString *fromNick;
|
||||
@property (nonatomic,assign) UserEnterRoomFromType fromType;
|
||||
@property (nonatomic,copy) NSString *fromUid;
|
||||
///性别
|
||||
@property (nonatomic, assign) GenderType gender;
|
||||
///贵族icon
|
||||
|
@@ -11,13 +11,13 @@
|
||||
|
||||
#define kRoomMessageMaxWidth (KScreenWidth - 15 - 90)
|
||||
///公屏文本字体的大小
|
||||
static CGFloat kRoomMessageDefalutFont = 12;
|
||||
static CGFloat kRoomMessageTextFont = 12.0;
|
||||
///文字上下的间隙
|
||||
static CGFloat kRoomMessageTextSpaceHeight = 10;
|
||||
static CGFloat kRoomMessageTextSpace = 10.0;
|
||||
|
||||
static CGFloat kRoomMessageBubbleCornerRadius = 7;
|
||||
static CGFloat kRoomMessageBubbleCornerRadius = 7.0;
|
||||
///公屏保存的最大数
|
||||
static NSInteger kRoomMessageMaxLength = 1000;
|
||||
static NSInteger kRoomMessageMaxLength = 1000.0;
|
||||
|
||||
|
||||
#endif /* YMRoomMessageConstant_h */
|
||||
|
@@ -38,98 +38,10 @@
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Queue_Kick),
|
||||
nil],
|
||||
@(CustomMessageType_Candy_Tree):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Candy_Tree_Me),
|
||||
@(Custom_Message_Sub_Candy_Tree_InRoom),
|
||||
@(Custom_Message_Sub_Candy_Tree_AllRoom),
|
||||
@(Custom_Message_Sub_Candy_Tree_AllRoom_Notify),
|
||||
@(Custom_Message_Sub_Candy_Tree_InRoom_NeedAllMicSend),
|
||||
nil],
|
||||
@(CustomMessageType_Arrange_Mic):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Arrange_Mic_Mode_Open),
|
||||
@(Custom_Message_Sub_Arrange_Mic_Mode_Close),
|
||||
@(Custom_Message_Sub_Arrange_Mic_Free_Mic_Open),
|
||||
@(Custom_Message_Sub_Arrange_Mic_Free_Mic_Close),
|
||||
nil],
|
||||
@(CustomMessageType_Update_RoomInfo):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Update_RoomInfo_MessageState),
|
||||
@(Custom_Message_Sub_Update_RoomInfo_AnimateEffect),
|
||||
nil],
|
||||
@(CustomMessageType_Collection_Room):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Collect_Room_Tips),
|
||||
nil],
|
||||
@(CustomMessageType_RoomPlay_Dating):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Room_Play_Dating_Pick_Heart),
|
||||
@(Custom_Message_Sub_Room_Play_Dating_Result_Mutual),
|
||||
@(Custom_Message_Sub_Room_Play_Dating_Result_Not_Mutual),
|
||||
nil],
|
||||
@(CustomMessageType_Noble_VIP):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Room_Open_Noble_VIP),
|
||||
@(Custom_Message_Sub_Room_Noble_LevelUp),
|
||||
@(Custom_Message_Sub_AllRoom_Noble_LevelUp_Suspend),
|
||||
nil],
|
||||
@(CustomMessageType_Face):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Face_Send),
|
||||
nil],
|
||||
@(CustomMessageType_Anchor_FansTeam):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_FansTeam_Open_Success),
|
||||
@(Custom_Message_Sub_FansTeam_Open_Fail),
|
||||
@(Custom_Message_Sub_FansTeam_Join_Success),
|
||||
@(Custom_Message_Sub_FansTeam_Out_Success),
|
||||
nil],
|
||||
@(CustomMessageType_Hall_Super_Admin):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Hall_Super_Admin_Kick_Manager_Out_Room),
|
||||
nil],
|
||||
@(CustomMessageType_Tarot):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Tarot),
|
||||
nil],
|
||||
@(CustomMessageType_Room_PK):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Room_PK_Manager_Up_Mic),
|
||||
@(Custom_Message_Sub_Room_PK_Mode_Close),
|
||||
@(Custom_Message_Sub_Room_PK_Result),
|
||||
@(Custom_Message_Sub_Room_PK_Mode_Open),
|
||||
@(Custom_Message_Sub_Room_PK_Start),
|
||||
@(Custom_Message_Sub_Room_PK_Re_Start),
|
||||
nil],
|
||||
@(CustomMessageType_LuckyBag):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Room_Gift_LuckBag_Server),
|
||||
nil],
|
||||
@(CustomMessageType_Gift_Compound):
|
||||
[NSSet setWithObjects:@(Custom_Message_Sub_Gift_Compound),
|
||||
nil],
|
||||
@(CustomMessageType_Room_Sailing):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Sailing_Me),
|
||||
@(Custom_Message_Sub_Sailing_InRoom),
|
||||
@(Custom_Message_Sub_Sailing_AllRoom),
|
||||
@(Custom_Message_Sub_Sailing_AllRoom_Notify),
|
||||
@(Custom_Message_Sub_Sailing_InRoom_NeedAllMicSend),
|
||||
nil],
|
||||
@(CustomMessageType_RedPacket):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_OpenRedPacketSuccess),
|
||||
nil],
|
||||
@(CustomMessageType_Wish_Gift):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Wish_Gift_Finish),
|
||||
nil],
|
||||
@(CustomMessageType_Starred_Kitchen):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Starred_Kitchen_Banner_Dynamic),
|
||||
@(Custom_Message_Sub_Starred_Kitchen_Banner_Static),
|
||||
nil],
|
||||
};
|
||||
}
|
||||
@end
|
||||
|
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RoomHostDelegate.h"
|
||||
#import "CHRoomHostDelegate.h"
|
||||
@class NIMMessage, YMMessageInfoModel;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (NSString *)parseMessageBubble:(NIMMessage *)message;
|
||||
|
||||
///房间的代理
|
||||
@property (nonatomic,weak) id<RoomHostDelegate> hostDelegate;
|
||||
@property (nonatomic,weak) id<CHRoomHostDelegate> hostDelegate;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -51,71 +51,26 @@
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
messageInfo.isShowAvatar = YES;
|
||||
messageInfo.uid = message.from;
|
||||
NIMUser * user = [[NIMSDK sharedSDK].userManager userInfo:message.from];
|
||||
// if (user) {
|
||||
// messageInfo.avatarUrl = user.userInfo.avatarUrl.length > 0 ? user.userInfo.avatarUrl : user.userInfo.thumbAvatarUrl;
|
||||
// }
|
||||
// if (messageInfo.avatarUrl.length <= 0) {
|
||||
// NIMMessageChatroomExtension * ext = message.messageExt;
|
||||
// messageInfo.avatarUrl = ext.roomAvatar;
|
||||
// }
|
||||
YMMessageRemoteExtModel * model = [YMMessageRemoteExtModel modelWithJSON:message.remoteExt[message.from]];
|
||||
// messageInfo.bubbleImageUrl = [self parseMessageBubble:message];
|
||||
NSString * nick = [NSString stringWithFormat:@"%@:", ((NIMMessageChatroomExtension *)message.messageExt).roomNickname];
|
||||
if ([message.from isEqualToString:uid]) {
|
||||
nick = @"我:";
|
||||
}
|
||||
//
|
||||
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
|
||||
// if (model.vipIcon) {//贵族icon
|
||||
// [attribute appendAttributedString:[self createUrlImageAttribute:model.vipIcon size:CGSizeMake(26, 26)]];
|
||||
// [attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
// }
|
||||
//
|
||||
NSMutableParagraphStyle *paraStyle = [[NSMutableParagraphStyle alloc] init];
|
||||
paraStyle.lineSpacing = 2.0f;//行间距
|
||||
// // 强制排版(从左到右)
|
||||
paraStyle.alignment = NSTextAlignmentLeft;
|
||||
paraStyle.baseWritingDirection = NSWritingDirectionLeftToRight;
|
||||
NSMutableAttributedString *nameAtt = [self createTextAttribute:nick color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont];
|
||||
NSMutableAttributedString *nameAtt = [self createTextAttribute:nick color:[ThemeColor messageDefaultTextColor] font:kRoomMessageTextFont];
|
||||
nameAtt.yy_paragraphStyle = paraStyle;
|
||||
[attribute appendAttributedString:nameAtt];
|
||||
// [attribute appendAttributedString:[self createTextAttribute:@"\n" color:[UIColor clearColor] font:kRoomMessageDefalutFont]];
|
||||
//
|
||||
// ///官方新用户
|
||||
// [attribute appendAttributedString:[self createOfficalAndNewuserAttribute:model.defUser newUser:model.newUser fromSayHelloChannel:model.fromSayHelloChannel]];
|
||||
// if ([self isCurrentRoomSuperAdmin:message.from]) {
|
||||
// [attribute appendAttributedString:[self createLocalImageAttribute:@"common_super_admin"]];
|
||||
// }
|
||||
// if (model.experUrl) {
|
||||
// [attribute appendAttributedString:[self createUrlImageAttribute:model.experUrl]];
|
||||
// [attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
// }
|
||||
// if (model.charmUrl) {
|
||||
// [attribute appendAttributedString:[self createUrlImageAttribute:model.charmUrl]];
|
||||
// [attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
// }
|
||||
// if (model.inRoomNameplatePic.length > 0 && model.inRoomNameplateWord.length > 0) { //铭牌有图片加文字
|
||||
// [attribute appendAttributedString:[self createNameplateAttibute:model.inRoomNameplateWord image:model.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
|
||||
// [attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
// } else if (model.inRoomNameplatePic.length > 0) {//铭牌只有图片
|
||||
// [attribute appendAttributedString:[self createUrlImageAttribute:model.inRoomNameplatePic size:CGSizeMake(18, 18)]];
|
||||
// [attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
// }
|
||||
// [attribute appendAttributedString:[self createTextAttribute:@"\n" color:[UIColor clearColor] font:kRoomMessageDefalutFont]];
|
||||
//
|
||||
// [attribute appendAttributedString:[self createSapceAttributeWithHeight:40]];
|
||||
// id nickNameNifo = message.remoteExt[@"atNames"];
|
||||
NSMutableAttributedString *msgStr;
|
||||
if (message.text) {
|
||||
msgStr = [[NSMutableAttributedString alloc] initWithString:message.text];
|
||||
// attribute.yy_color = UIColor.whiteColor;
|
||||
msgStr.yy_color = UIColor.whiteColor;
|
||||
// [self createUrlImageAttribute:model.iosBubbleUrl text:message.text nickNameNifo:nickNameNifo];
|
||||
[attribute appendAttributedString:msgStr];
|
||||
}
|
||||
// [self attributeAddLongPressHihtLight:attribute uid:message.from nick:((NIMMessageChatroomExtension *)message.messageExt).roomNickname];
|
||||
//
|
||||
messageInfo.content = attribute;
|
||||
return messageInfo;
|
||||
}
|
||||
@@ -141,74 +96,24 @@
|
||||
if (giftInfo == nil) {
|
||||
giftInfo = [[YMGiftStorage shareStorage] findGiftInfo:info.giftId];
|
||||
}
|
||||
///官方新用户
|
||||
// [attribute appendAttributedString:[self createOfficalAndNewuserAttribute:sendInfo.defUser newUser:sendInfo.newUser fromSayHelloChannel:sendInfo.fromSayHelloChannel]];
|
||||
|
||||
//nick
|
||||
[attribute appendAttributedString:[self createNickAtrribute:info.nick uid:info.uid.integerValue]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];;
|
||||
if (attachment.second == Custom_Message_Sub_Gift_LuckySend) {
|
||||
//action
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"送出" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
// 福袋名称
|
||||
[attribute appendAttributedString:[self createTextAttribute:info.giftName color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"给" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
//target
|
||||
// [attribute appendAttributedString:[self createNickAtrribute:info.luckyGiftList.user.nick uid:info.luckyGiftList.user.uid]];
|
||||
// [attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
//lucky
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"爆出了" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
// [info.luckyGiftList.giftList enumerateObjectsUsingBlock:^(GiftListsInfo * _Nonnull giftListInfo, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
// GiftInfoModel *luckyGiftInfo = [[YMGiftStorage shareStorage] findGiftInfo:[NSString stringWithFormat:@"%ld", giftListInfo.giftId]];
|
||||
// // 价值
|
||||
// [attribute appendAttributedString: [self createTextAttribute:@"价值" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
// [attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
// // 礼物价格
|
||||
// [attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%ld",(NSInteger)luckyGiftInfo.goldPrice] color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
// // 的礼物
|
||||
// [attribute appendAttributedString: [self createTextAttribute:@"钻石的礼物" color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
// //img
|
||||
// [attribute appendAttributedString:[self createUrlImageAttribute:luckyGiftInfo.giftUrl]];
|
||||
// [attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
// //x N
|
||||
// [attribute appendAttributedString:[self createTextAttribute: [NSString stringWithFormat:@" X%ld",giftListInfo.giftNum] color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
// if (info.luckyGiftList.giftList.count-1 != idx) {
|
||||
// //,
|
||||
// [attribute appendAttributedString: [self createTextAttribute:@"," color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
// }
|
||||
// }];
|
||||
} else {
|
||||
//打赏
|
||||
[attribute appendAttributedString:[self createTextAttribute:@" 打赏 " color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
//target
|
||||
[attribute appendAttributedString: [self createNickAtrribute:info.targetNick uid:info.targetUid.integerValue]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
//img
|
||||
[attribute appendAttributedString:[self createUrlImageAttribute:giftInfo.giftUrl]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
//x N
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@" X%ld",info.giftNum] color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||
}
|
||||
//打赏
|
||||
[attribute appendAttributedString:[self createTextAttribute:@" 打赏 " color:[ThemeColor messageDefaultTextColor] font:kRoomMessageTextFont]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
//target
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
//img
|
||||
[attribute appendAttributedString:[self createUrlImageAttribute:giftInfo.giftUrl]];
|
||||
[attribute appendAttributedString:[self createSapceAttribute:2]];
|
||||
//x N
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@" X%ld",info.giftNum] color:[ThemeColor messageTextColor] font:kRoomMessageTextFont]];
|
||||
|
||||
messageInfo.content = attribute;
|
||||
return messageInfo;
|
||||
}
|
||||
|
||||
///名字点击的
|
||||
- (NSMutableAttributedString *)createNickAtrribute:(NSString *)nick uid:(NSInteger)uid {
|
||||
NSMutableAttributedString * attribute = [self createTextAttribute:nick color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont];
|
||||
[self attributeAddHihtLight:attribute uid:uid];
|
||||
return attribute;
|
||||
}
|
||||
|
||||
- (void)attributeAddHihtLight:(NSMutableAttributedString *)attribute uid:(NSInteger)uid {
|
||||
@kWeakify(self);
|
||||
[attribute yy_setTextHighlightRange:NSMakeRange(0, attribute.length) color:nil backgroundColor:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
@kStrongify(self);
|
||||
if (uid <= 0) {return;}
|
||||
// [self showUserCard:uid];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - NSMutableAttributedString
|
||||
/// 生成本地一个图片的富文本
|
||||
|
@@ -6,14 +6,14 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RoomHostDelegate.h"
|
||||
#import "RoomGuestDelegate.h"
|
||||
#import "CHRoomHostDelegate.h"
|
||||
#import "CHRoomGuestDelegate.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YMRoomMessageContainerView : UIView<RoomGuestDelegate>
|
||||
@interface YMRoomMessageContainerView : UIView<CHRoomGuestDelegate>
|
||||
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
|
||||
- (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#import "YMRoomMessageContainerView.h"
|
||||
/// View
|
||||
#import "MewRoomMessageTableCell.h"
|
||||
#import "XPRoomMessageHeaderView.h"
|
||||
#import "CHRoomMessageHeaderView.h"
|
||||
/// Model
|
||||
#import "YMMessageInfoModel.h"
|
||||
#import "AttachmentModel.h"
|
||||
@@ -28,21 +28,17 @@
|
||||
@interface YMRoomMessageContainerView() <UITableViewDelegate, UITableViewDataSource>
|
||||
|
||||
///房间的代理
|
||||
@property (nonatomic,weak) id<RoomHostDelegate> hostDelegate;
|
||||
@property (nonatomic,weak) id<CHRoomHostDelegate> hostDelegate;
|
||||
|
||||
@property (nonatomic, strong) UITableView *messageTableView;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSMutableArray<YMMessageInfoModel *> *datasource;
|
||||
///临时存放消息的数组
|
||||
@property (nonatomic,strong) NSMutableArray<NIMMessage *> *incomingMessages;
|
||||
///底部有新的消息
|
||||
@property (nonatomic,strong) UIButton *messageTipsBtn;
|
||||
///是否处于正在爬楼
|
||||
@property (nonatomic,assign) BOOL isPending;
|
||||
///messageView 持有这个工具类 进行数据的分发操作 TODO: 有需要在改
|
||||
@property (nonatomic,strong) YMRoomMessageParser *messageParser;
|
||||
@property (nonatomic,strong) YMRoomMessageParser *roomMessageParser;
|
||||
///头部
|
||||
@property (nonatomic,strong) XPRoomMessageHeaderView *headerView;
|
||||
@property (nonatomic,strong) CHRoomMessageHeaderView *headerView;
|
||||
@end
|
||||
|
||||
@implementation YMRoomMessageContainerView
|
||||
@@ -51,7 +47,7 @@
|
||||
}
|
||||
|
||||
#pragma mark - Init
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate {
|
||||
- (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.hostDelegate = delegate;
|
||||
@@ -62,83 +58,39 @@
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - RoomGuestDelegate
|
||||
#pragma mark - CHRoomGuestDelegate
|
||||
- (void)handleNIMTextMessage:(NIMMessage *)message {
|
||||
[self addRoomMessage:message];
|
||||
[self addCurrentRoomMessage:message];
|
||||
|
||||
}
|
||||
|
||||
- (void)handleNIMNotificationMessage:(NIMMessage *)message {
|
||||
NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject;
|
||||
NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content;
|
||||
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;
|
||||
if (content.eventType == NIMChatroomEventTypeEnter) {
|
||||
// if (roomInfo.isCloseScreen) {
|
||||
// AttachmentModel *attachement = [[AttachmentModel alloc]init];
|
||||
// attachement.first = CustomMessageType_Update_RoomInfo;
|
||||
// attachement.second = Custom_Message_Sub_Update_RoomInfo_MessageState;
|
||||
// attachement.data = @{@"roomInfo":self.hostDelegate.getRoomInfo.model2dictionary};
|
||||
// NIMMessage *message = [[NIMMessage alloc]init];
|
||||
// NIMCustomObject *object = [[NIMCustomObject alloc] init];
|
||||
// object.attachment = attachement;
|
||||
// message.messageObject = object;
|
||||
// [self addRoomMessage:message];
|
||||
// return;
|
||||
// } else {
|
||||
NIMChatroomNotificationMember *member = content.targets[0];
|
||||
if (member.userId.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
///自己进房成功后拉取历史消息
|
||||
[self handleFetchHistoryMessage:message];
|
||||
} else {
|
||||
// BOOL hideEnter = [self handleHideEnter:message];
|
||||
// if (!hideEnter) {
|
||||
///插入进房消息及房间公告提示
|
||||
[self addRoomMessage:message];
|
||||
// }
|
||||
}
|
||||
// }
|
||||
} else if(content.eventType == NIMChatroomEventTypeInfoUpdated) {
|
||||
// if (roomInfo.isCloseScreen) {return;}
|
||||
// if (roomInfo.datingState == RoomDatingStateChangeType_Open) {
|
||||
// NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
// NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
||||
// NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
||||
// request.roomId = roomId;
|
||||
// request.userIds = @[uid];
|
||||
// [[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
|
||||
// if (error == nil) {
|
||||
// NIMChatroomMember * member = members.firstObject;
|
||||
// BOOL isCreator = member.type == NIMChatroomMemberTypeCreator;
|
||||
// BOOL isManager = member.type == NIMChatroomMemberTypeManager;
|
||||
// if (isCreator || isManager) {
|
||||
// [self addRoomMessage:message];
|
||||
// }
|
||||
// }
|
||||
// }];
|
||||
// }
|
||||
NIMChatroomNotificationMember *member = content.targets[0];
|
||||
if (member.userId.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
///自己进房成功后拉取历史消息
|
||||
[self handleFetchHistoryMessage:message];
|
||||
} else {
|
||||
///插入进房消息及房间公告提示
|
||||
[self addCurrentRoomMessage:message];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)handleNIMCustomMessage:(NIMMessage *)message {
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if ([self isCanDisplayMessage:message]) {
|
||||
[self addRoomMessage:message];
|
||||
[self addCurrentRoomMessage:message];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)handleFetchHistoryMessage:(NIMMessage *)message {
|
||||
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;
|
||||
NSString *roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
|
||||
NSString *roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInformation.roomId];
|
||||
NIMHistoryMessageSearchOption *option = [[NIMHistoryMessageSearchOption alloc] init];
|
||||
option.limit = [ClientConfig shareConfig].configInfo.roomMessageCount;
|
||||
option.startTime = self.hostDelegate.getRoomInfo.clearScreenTime / 1000.0;
|
||||
option.startTime = self.hostDelegate.getRoomInformation.clearScreenTime / 1000.0;
|
||||
option.order = NIMMessageSearchOrderAsc;
|
||||
option.messageTypes = @[@(NIMMessageTypeText)];
|
||||
[[NIMSDK sharedSDK].chatroomManager fetchMessageHistory:roomId option:option result:^(NSError * _Nullable error, NSArray<NIMMessage *> * _Nullable messages) {
|
||||
@@ -157,33 +109,13 @@
|
||||
}
|
||||
// 执行插入
|
||||
for (NIMMessage *item in messages.reverseObjectEnumerator) {
|
||||
[self.datasource addObject:[self.messageParser parseMessageAttribute:item]];
|
||||
// if (!self.isMiniEnter) {/// 最小化进房的话 不需要重新保存
|
||||
// if (self.hostDelegate.getRoomInfo.isCloseScreen) {
|
||||
// NIMCustomObject *obj = (NIMCustomObject *)item.messageObject;
|
||||
// if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
// AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||
// if (attachment.first == CustomMessageType_Update_RoomInfo && attachment.second == Custom_Message_Sub_Update_RoomInfo_MessageState){
|
||||
// [[XPRoomMiniManager shareManager] saveRoomMessage:item];
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// [[XPRoomMiniManager shareManager] saveRoomMessage:item];
|
||||
// }
|
||||
// }
|
||||
[self.datasource addObject:[self.roomMessageParser parseMessageAttribute:item]];
|
||||
}
|
||||
[self.messageTableView reloadData];
|
||||
//执行插入动画并滚动
|
||||
[self scrollToBottom:YES];
|
||||
// BOOL hideEnter = [self handleHideEnter:message];
|
||||
// if (!hideEnter) {
|
||||
///插入进房消息及房间公告提示
|
||||
[self addRoomMessage:message];
|
||||
// }
|
||||
// if (!roomInfo.hasAnimationEffect) {
|
||||
// [self roomInfoNoGiftAnimationMessage:message];
|
||||
// }
|
||||
// [self createUserEnterRoomAddRoomtopicMessage];
|
||||
[self scrollToBottomAnimated:YES];
|
||||
///插入进房消息及房间公告提示
|
||||
[self addCurrentRoomMessage:message];
|
||||
}];
|
||||
return;
|
||||
}
|
||||
@@ -194,52 +126,26 @@
|
||||
}
|
||||
// 执行插入
|
||||
for (NIMMessage *item in messages) {
|
||||
[self.datasource addObject:[self.messageParser parseMessageAttribute:item]];
|
||||
// if (!self.isMiniEnter) {/// 最小化进房的话 不需要重新保存
|
||||
// if (self.hostDelegate.getRoomInfo.isCloseScreen) {
|
||||
// NIMCustomObject *obj = (NIMCustomObject *)item.messageObject;
|
||||
// if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
// AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||
// if (attachment.first == CustomMessageType_Update_RoomInfo && attachment.second == Custom_Message_Sub_Update_RoomInfo_MessageState){
|
||||
// [[XPRoomMiniManager shareManager] saveRoomMessage:item];
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// [[XPRoomMiniManager shareManager] saveRoomMessage:item];
|
||||
// }
|
||||
// }
|
||||
[self.datasource addObject:[self.roomMessageParser parseMessageAttribute:item]];
|
||||
}
|
||||
[self.messageTableView reloadData];
|
||||
//执行插入动画并滚动
|
||||
[self scrollToBottom:YES];
|
||||
[self scrollToBottomAnimated:YES];
|
||||
}
|
||||
// BOOL hideEnter = [self handleHideEnter:message];
|
||||
// if (!hideEnter) {
|
||||
// ///插入进房消息及房间公告提示
|
||||
// [self addRoomMessage:message];
|
||||
// }
|
||||
// if (!roomInfo.hasAnimationEffect) {
|
||||
// [self roomInfoNoGiftAnimationMessage:message];
|
||||
// }
|
||||
// [self createUserEnterRoomAddRoomtopicMessage];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
///添加信息
|
||||
- (void)addRoomMessage:(NIMMessage *)message {
|
||||
- (void)addCurrentRoomMessage:(NIMMessage *)message {
|
||||
[self.incomingMessages addObject:message];
|
||||
if (self.isPending) {
|
||||
self.messageTipsBtn.hidden = NO;
|
||||
} else {
|
||||
[self appendAndScrollToBottom];
|
||||
}
|
||||
[self appendScrollToBottom];
|
||||
}
|
||||
|
||||
/// 追加信息
|
||||
- (void)appendAndScrollToBottom {
|
||||
- (void)appendScrollToBottom {
|
||||
if (self.incomingMessages.count < 1) {
|
||||
[self scrollToBottom:YES];
|
||||
[self scrollToBottomAnimated:YES];
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -251,8 +157,8 @@
|
||||
|
||||
NSMutableArray *indexPaths = [NSMutableArray array];
|
||||
for (NIMMessage *item in self.incomingMessages) {
|
||||
if ([self.messageParser parseMessageAttribute:item] != nil) {
|
||||
[self.datasource addObject:[self.messageParser parseMessageAttribute:item]];
|
||||
if ([self.roomMessageParser parseMessageAttribute:item] != nil) {
|
||||
[self.datasource addObject:[self.roomMessageParser parseMessageAttribute:item]];
|
||||
[indexPaths addObject:[NSIndexPath indexPathForRow:self.datasource.count - 1 inSection:0]];
|
||||
}
|
||||
|
||||
@@ -262,7 +168,7 @@
|
||||
}
|
||||
|
||||
///执行插入动画并滚动
|
||||
- (void)scrollToBottom:(BOOL)animated {
|
||||
- (void)scrollToBottomAnimated:(BOOL)animated {
|
||||
NSInteger s = [self.messageTableView numberOfSections]; //有多少组
|
||||
if (s<1) return;
|
||||
NSInteger r = [self.messageTableView numberOfRowsInSection:s-1]; //最后一组行
|
||||
@@ -277,26 +183,12 @@
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||
if (attachment.first == CustomMessageType_Face && attachment.second == Custom_Message_Sub_Face_Send) {
|
||||
if ([attachment.data[@"data"] isKindOfClass:[NSArray class]]) {
|
||||
// NSArray * array = [RoomFaceSendInfoModel modelsWithArray:attachment.data[@"data"]];
|
||||
// for (int i = 0; i< array.count; i++) {
|
||||
// RoomFaceSendInfoModel * sendInfo = [array safeObjectAtIndex1:i];
|
||||
// if (sendInfo.resultIndexes.count <=0) {
|
||||
// return NO;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
return [[[YMRoomMessageFilter supportMessageDic] objectForKey:@(attachment.first)] containsObject:@(attachment.second)];
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
- (void)onRoomEntered {
|
||||
// [[XPRoomMiniManager shareManager] resetLocalMessage];
|
||||
self.headerView.bubbleColor = [ThemeColor messageBubbleColor];
|
||||
}
|
||||
|
||||
@@ -380,17 +272,17 @@
|
||||
return _incomingMessages;
|
||||
}
|
||||
|
||||
- (YMRoomMessageParser *)messageParser {
|
||||
if (!_messageParser) {
|
||||
_messageParser = [[YMRoomMessageParser alloc] init];
|
||||
_messageParser.hostDelegate = self.hostDelegate;
|
||||
- (YMRoomMessageParser *)roomMessageParser {
|
||||
if (!_roomMessageParser) {
|
||||
_roomMessageParser = [[YMRoomMessageParser alloc] init];
|
||||
_roomMessageParser.hostDelegate = self.hostDelegate;
|
||||
}
|
||||
return _messageParser;
|
||||
return _roomMessageParser;
|
||||
}
|
||||
|
||||
- (XPRoomMessageHeaderView *)headerView {
|
||||
- (CHRoomMessageHeaderView *)headerView {
|
||||
if (!_headerView) {
|
||||
_headerView = [[XPRoomMessageHeaderView alloc] init];
|
||||
_headerView = [[CHRoomMessageHeaderView alloc] init];
|
||||
}
|
||||
return _headerView;
|
||||
}
|
||||
|
@@ -11,20 +11,20 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/** 麦序数据的协议。
|
||||
RoomVC 的子 View 之间的通信协议,通过 RoomHostDelegate 和 RoomGuestDelegate 继承实现。
|
||||
RoomVC 的子 View 之间的通信协议,通过 CHRoomHostDelegate 和 CHRoomGuestDelegate 继承实现。
|
||||
调用方向:
|
||||
- getMicroQueue:RoomVC 子 View ---> RoomHostDelegate ---> StageView
|
||||
- onMicroQueueUpdate:StageView ---> RoomHostDelegate ---> RoomVC 子 View
|
||||
- getCustomMicroQueue:RoomVC 子 View ---> CHRoomHostDelegate ---> StageView
|
||||
- microQueueUpdate:StageView ---> CHRoomHostDelegate ---> RoomVC 子 View
|
||||
|
||||
*/
|
||||
@protocol MicroQueueProtocol <NSObject>
|
||||
|
||||
@optional
|
||||
/// 获取麦序
|
||||
- (NSMutableDictionary<NSString *, MicroQueueModel *> *)getMicroQueue;
|
||||
- (NSMutableDictionary<NSString *, MicroQueueModel *> *)getCustomMicroQueue;
|
||||
|
||||
/// 麦序更新通知
|
||||
- (void)onMicroQueueUpdate:(NSMutableDictionary<NSString *, MicroQueueModel *> *)queue;
|
||||
- (void)microQueueUpdate:(NSMutableDictionary<NSString *, MicroQueueModel *> *)queue;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -1,25 +0,0 @@
|
||||
//
|
||||
// RoomAnimationProtocol.h
|
||||
// yinmeng-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/21.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
/** XPRoomAnimationView 用到的协议。
|
||||
|
||||
RoomVC 的子 View 之间的通信协议,通过 RoomHostDelegate 和 RoomGuestDelegate 继承实现。
|
||||
|
||||
调用方向:XPRoomAnimationView —> RoomHostDelegate —> RoomAnimationProtocol(RoomGuestDelegate继承)
|
||||
|
||||
*/
|
||||
@protocol RoomAnimationProtocol <NSObject>
|
||||
|
||||
@optional
|
||||
/**
|
||||
* StageView 专用。
|
||||
*/
|
||||
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid;
|
||||
@end
|
||||
|
||||
//NS_ASSUME_NONNULL_END
|
@@ -1,32 +0,0 @@
|
||||
//
|
||||
// RoomHostDelegate.h
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/13.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "MicroQueueProtocol.h"
|
||||
#import "RoomAnimationProtocol.h"
|
||||
@class RoomInfoModel, UserInfoModel;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RoomHostDelegate <NSObject, MicroQueueProtocol,RoomAnimationProtocol>
|
||||
|
||||
// 获取房间信息
|
||||
- (RoomInfoModel *)getRoomInfo;
|
||||
// 获取用户信息
|
||||
- (UserInfoModel *)getUserInfo;
|
||||
|
||||
/// 退出房间
|
||||
- (void)exitRoom;
|
||||
/// 最小化房间
|
||||
- (void)miniRoom;
|
||||
|
||||
/// 获取当前的导航控制器
|
||||
- (UINavigationController *)getCurrentNav;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -6,8 +6,8 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RoomGuestDelegate.h"
|
||||
#import "RoomHostDelegate.h"
|
||||
#import "CHRoomGuestDelegate.h"
|
||||
#import "CHRoomHostDelegate.h"
|
||||
#import "MicroViewProtocol.h"
|
||||
@class MicroQueueModel;
|
||||
|
||||
@@ -62,10 +62,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@end
|
||||
|
||||
|
||||
@interface StageView : UIView <StageViewDelegate, StageViewProtocol, RoomGuestDelegate>
|
||||
@interface CHStageView : UIView <StageViewDelegate, StageViewProtocol, CHRoomGuestDelegate>
|
||||
|
||||
@property (nonatomic, weak, readonly) id<RoomHostDelegate> hostDelegate;
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
|
||||
@property (nonatomic, weak, readonly) id<CHRoomHostDelegate> hostDelegate;
|
||||
- (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate;
|
||||
|
||||
|
||||
@property (nonatomic, strong, readonly) NSString *selectUid;
|
@@ -5,7 +5,7 @@
|
||||
// Created by 触海 on 2023/11/13.
|
||||
//
|
||||
|
||||
#import "StageView.h"
|
||||
#import "CHStageView.h"
|
||||
/// Tool
|
||||
#import "NSArray+Safe.h"
|
||||
#import "RtcManager.h"
|
||||
@@ -25,7 +25,7 @@
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
|
||||
|
||||
@interface StageView()<RtcDelegate>
|
||||
@interface CHStageView()<RtcDelegate>
|
||||
/**云信麦序的 position 和本类 index 的关系
|
||||
* 网易云信返回的麦序(position)从 -1 开始
|
||||
* - 使用者:MicroStateModel、self.micQueue.
|
||||
@@ -41,7 +41,7 @@
|
||||
/// 麦位上用户信息
|
||||
@property (nonatomic, strong) NSMutableDictionary<NSString *, MicroQueueModel *> *micQueue;
|
||||
|
||||
@property (nonatomic, weak) id<RoomHostDelegate> hostDelegate;
|
||||
@property (nonatomic, weak) id<CHRoomHostDelegate> hostDelegate;
|
||||
|
||||
/**
|
||||
* 是否正在上麦。
|
||||
@@ -58,10 +58,10 @@
|
||||
|
||||
@end
|
||||
|
||||
@implementation StageView
|
||||
@implementation CHStageView
|
||||
|
||||
#pragma mark - Init
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate {
|
||||
- (instancetype)initWithDelegate:(id<CHRoomHostDelegate>)delegate {
|
||||
self = [super initWithFrame:CGRectZero];
|
||||
if (self) {
|
||||
_hostDelegate = delegate;
|
||||
@@ -69,7 +69,6 @@
|
||||
for (int i = 0; i < microCount; i++) {
|
||||
UIView *microView = [self microViewForIndex:i];
|
||||
if (microView) {
|
||||
// microView.backgroundColor = UIColor.redColor;
|
||||
microView.tag = i;
|
||||
microView.frame = [self rectForViewAtIndex:i];
|
||||
[self addSubview:microView];
|
||||
@@ -82,7 +81,7 @@
|
||||
make.height.mas_equalTo(self.heightForStageView);
|
||||
}];
|
||||
|
||||
if (_hostDelegate.getRoomInfo) {
|
||||
if (_hostDelegate.getRoomInformation) {
|
||||
[self initRtc];
|
||||
[self initNimMicroQueues];
|
||||
} else {
|
||||
@@ -100,7 +99,7 @@
|
||||
* 目前 init 要么在 【 self initWithSelegate】,要么在【self onRoomEntered】里面延迟初始化,因为初始化依赖房间信息。
|
||||
*/
|
||||
- (void)initRtc {
|
||||
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
|
||||
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInformation;
|
||||
// RTRC的初始化, 进入房间
|
||||
NSInteger roomId = roomInfo.roomId > INT_MAX ? roomInfo.uid : roomInfo.roomId;
|
||||
[RtcManager initEngineWithType:RtcEngineType_TRTC delegate:self];
|
||||
@@ -109,21 +108,8 @@
|
||||
|
||||
/// 获取云信麦位信息
|
||||
- (void)initNimMicroQueues {
|
||||
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
|
||||
// 获取麦位的状态,并初始化self.micQueue.
|
||||
[[NIMSDK sharedSDK].chatroomManager fetchChatroomInfo:[NSString stringWithFormat:@"%ld", (long)roomInfo.roomId] completion:^(NSError * _Nullable error, NIMChatroom * _Nullable chatroom) {
|
||||
if (error) return;
|
||||
|
||||
NSDictionary *info = [chatroom.ext toJSONObject];
|
||||
NSDictionary *micState = [info[@"micQueue"] toJSONObject];
|
||||
for (NSString *position in micState.allKeys) {
|
||||
MicroStateModel *state = [MicroStateModel modelWithJSON:micState[position]];
|
||||
MicroQueueModel *sequence = [self.micQueue objectForKey:position];
|
||||
sequence.microState = state;
|
||||
}
|
||||
[self microQueueUpdated:NO];
|
||||
}];
|
||||
|
||||
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInformation;
|
||||
[self fetchChatroomNIM];
|
||||
|
||||
self.hadGetQueueInfoSuccess = NO;
|
||||
// 获取麦位的用户,并初始化 self.micQueue。
|
||||
@@ -140,13 +126,13 @@
|
||||
}
|
||||
}
|
||||
[self microQueueUpdated:ownerRTCChange];
|
||||
[self.hostDelegate onMicroQueueUpdate:self.micQueue];
|
||||
[self.hostDelegate microQueueUpdate:self.micQueue];
|
||||
self.hadGetQueueInfoSuccess = YES;
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - RoomGuestDelegate
|
||||
#pragma mark - CHRoomGuestDelegate
|
||||
- (void)onRoomEntered {
|
||||
// self.isMiniEnter = NO;
|
||||
///这行代码是为了 拿到房间信息的时候已经确定了是否显示礼物值 如果等到进房成功之后在显示的话可能会有一点卡顿的感觉@fengshuo
|
||||
@@ -155,13 +141,13 @@
|
||||
[self initNIMMicroQueues];
|
||||
}
|
||||
|
||||
- (NSMutableDictionary<NSString *,MicroQueueModel *> *)getMicroQueue {
|
||||
- (NSMutableDictionary<NSString *,MicroQueueModel *> *)getCustomMicroQueue {
|
||||
return self.micQueue;
|
||||
}
|
||||
|
||||
- (void)onRoomUpdate {
|
||||
// self.isMiniEnter = NO;
|
||||
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;
|
||||
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInformation;
|
||||
// for (int i = 0; i < self.countOfMircoView; i++) {
|
||||
// UIView<MicroViewProtocol> * view = [self findMicroViewByIndex:i];
|
||||
// [view showGiftValueMode:roomInfo.showGiftValue];
|
||||
@@ -217,27 +203,6 @@
|
||||
if (changeType == 1) { // 上麦
|
||||
MicroQueueModel *sequence = [self.micQueue objectForKey:position];
|
||||
sequence.userInfo = userInfo;
|
||||
// if (self.hostDelegate.getRoomInfo.showGiftValue && userInfo.uid == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
// RoomInfoModel * roomInfo =self.hostDelegate.getRoomInfo;
|
||||
// NSString * roomUid = [NSString stringWithFormat:@"%ld", roomInfo.uid];
|
||||
// NSString * uid = [NSString stringWithFormat:@"%ld", userInfo.uid];
|
||||
// [Api roomGiftValueUpMic:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
// if (code == 200) {
|
||||
// NIMMessage * message = [[NIMMessage alloc] init];
|
||||
// AttachmentModel * attachMent = [[AttachmentModel alloc] init];
|
||||
// attachMent.first = CustomMessageType_Room_GiftValue;
|
||||
// attachMent.second = Custom_Message_Sub_Room_GiftValue_Sync;
|
||||
// attachMent.data = data.data;
|
||||
// NIMCustomObject *object = [[NIMCustomObject alloc] init];
|
||||
// object.attachment = attachMent;
|
||||
// message.messageObject = object;
|
||||
// //构造会话
|
||||
// NSString * sessionId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
||||
// NIMSession *session = [NIMSession session:sessionId type:NIMSessionTypeChatroom];
|
||||
// [[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session error:nil];
|
||||
// }
|
||||
// } roomUid:roomUid micUid:uid position:position uid:uid];
|
||||
// }
|
||||
//如果是当前用户上麦,关闭自己的麦克风
|
||||
if (sequence && sequence.userInfo.uid == [AccountInfoStorage instance].getUid.integerValue ) {
|
||||
[RtcManager instance].localMuted = NO;
|
||||
@@ -245,10 +210,6 @@
|
||||
}
|
||||
|
||||
microQueueChanged = YES;
|
||||
// if (self.hostDelegate.getRoomInfo.showGiftValue) {
|
||||
// ///更新头像框的💣
|
||||
// [self initGiftValue];
|
||||
// }
|
||||
}
|
||||
break;
|
||||
case NIMChatroomEventTypeExit:
|
||||
@@ -262,10 +223,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (self.hostDelegate.getRoomInfo.showGiftValue) {
|
||||
// ///更新头像框的💣
|
||||
// [self initGiftValue];
|
||||
// }
|
||||
}
|
||||
break;
|
||||
case NIMChatroomEventTypeQueueBatchChange:
|
||||
@@ -281,10 +238,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (self.hostDelegate.getRoomInfo.showGiftValue) {
|
||||
// ///更新头像框的💣
|
||||
// [self initGiftValue];
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -294,9 +247,8 @@
|
||||
}
|
||||
|
||||
if (microQueueChanged) {
|
||||
// self.isMiniEnter = NO;
|
||||
[self microQueueUpdated:ownerRTCChanged];
|
||||
[self.hostDelegate onMicroQueueUpdate:self.micQueue];
|
||||
[self.hostDelegate microQueueUpdate:self.micQueue];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,73 +256,9 @@
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||
|
||||
if(attachment.first == CustomMessageType_Room_GiftValue && attachment.second == Custom_Message_Sub_Room_GiftValue_Sync) {
|
||||
[self giftValueUpdate:attachment.data];
|
||||
// if (self.hostDelegate.getRoomInfo.showGiftValue) {
|
||||
// ///更新头像框的💣
|
||||
// [self initGiftValue];
|
||||
// }
|
||||
} else if(attachment.first == CustomMessageType_Gift && (attachment.second == Custom_Message_Sub_Gift_Send)) {
|
||||
[self giftValueUpdate:attachment.data];
|
||||
// if (self.hostDelegate.getRoomInfo.showGiftValue) {
|
||||
// ///更新头像框的💣
|
||||
// [self initGiftValue];
|
||||
// }
|
||||
}
|
||||
// else if(attachment.first == CustomMessageType_AllMicroSend && (attachment.second == Custom_Message_Sub_AllMicroSend || attachment.second == Custom_Message_Sub_AllBatchSend || attachment.second == Custom_Message_Sub_AllMicroLuckySend || attachment.second == Custom_Message_Sub_AllBatchMicroLuckySend)) {
|
||||
// [self giftValueUpdate:attachment.data];
|
||||
//// if (self.hostDelegate.getRoomInfo.showGiftValue) {
|
||||
//// ///更新头像框的💣
|
||||
//// [self initGiftValue];
|
||||
//// };
|
||||
// }
|
||||
else if (attachment.first == CustomMessageType_Face && attachment.second == Custom_Message_Sub_Face_Send) { //表情
|
||||
// [self showUserFace:attachment.data];
|
||||
}
|
||||
// else if (attachment.first == CustomMessageType_Room_PK && attachment.second == Custom_Message_Sub_Room_PK_Manager_Up_Mic) {
|
||||
// NSDictionary * dic = attachment.data;
|
||||
// ///更新麦序
|
||||
// NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
// if (dic.allKeys.count > 0 && [dic.allKeys containsObject:uid] && [dic objectForKey:uid]) {
|
||||
//// RoomPKChooseUserModel * pkUserInfo = [RoomPKChooseUserModel modelWithDictionary:[dic objectForKey:uid]];
|
||||
// NSString * position = @"";
|
||||
//// [NSString stringWithFormat:@"%d", pkUserInfo.position];
|
||||
// NSString* roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
|
||||
// MicroQueueModel *micro = [self.micQueue objectForKey:position];
|
||||
//// if (micro && micro.userInfo && micro.userInfo.uid != pkUserInfo.uid.integerValue) return;
|
||||
// UserInfoModel * userInfo = self.hostDelegate.getUserInfo;
|
||||
// userInfo.groupType = pkUserInfo.groupType;
|
||||
// NIMChatroomQueueUpdateRequest *request = [[NIMChatroomQueueUpdateRequest alloc]init];
|
||||
// request.key = position;
|
||||
// NSMutableDictionary *curUserInfo = [[NSMutableDictionary alloc]initWithDictionary:[self userInfoToQueueExt:userInfo]];
|
||||
// [curUserInfo setValue:@(YES) forKey:@"isNoProhibitMic"];
|
||||
// request.value = [curUserInfo toJSONString];
|
||||
// request.roomId = roomId;
|
||||
// request.transient = YES;
|
||||
// [[NIMSDK sharedSDK].chatroomManager updateChatroomQueueObject:request completion:^(NSError * _Nullable error) {
|
||||
// if (error) return;
|
||||
// }];
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
- (void)giftValueUpdate:(NSDictionary *)dic {
|
||||
// [self resetAllPositionItemGiftValue];
|
||||
// GiftValueInfoModel * model = [GiftValueInfoModel modelWithDictionary:dic];
|
||||
// for (int i = 0; i < model.giftValueVos.count; i++) {
|
||||
// GiftValueDetailModel * giftValueModel = [model.giftValueVos safeObjectAtIndex1:i];
|
||||
// UIView<MicroViewProtocol> * view = [self findMicroViewByUid:giftValueModel.uid];
|
||||
// if (self.hostDelegate.getRoomInfo.leaveMode && giftValueModel.uid.integerValue == self.hostDelegate.getRoomInfo.uid) {
|
||||
// view = [self findMicroViewByIndex:0];
|
||||
// }
|
||||
// if (view == nil) continue;
|
||||
// [view configGiftValue:giftValueModel.giftValue];
|
||||
// }
|
||||
// [self updatePostionItemWithRoomOnMicGiftValue:model];
|
||||
}
|
||||
|
||||
#pragma mark - update views as data changed
|
||||
/** 麦位状态或者麦上用户发生改变后,通过该方法刷新麦位的界面状态。
|
||||
* 且会根据当前用户和麦位状态等,决定音频推拉流
|
||||
@@ -378,20 +266,15 @@
|
||||
*/
|
||||
- (void)microQueueUpdated:(BOOL)isHandleRTC {
|
||||
BOOL selfNeedBroadcast = NO;
|
||||
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
|
||||
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInformation;
|
||||
BOOL leaveMode = roomInfo.leaveMode;
|
||||
NSMutableArray *statisMicArray = [NSMutableArray array];
|
||||
|
||||
for (UIView<MicroViewProtocol> *view in self.microViews) {
|
||||
// if ([view isMemberOfClass:[MewSocialStageView Class]]) {
|
||||
view.layer.borderColor = UIColor.clearColor.CGColor;
|
||||
view.layer.borderWidth = 0.0;
|
||||
self.selectUid = @"";
|
||||
self.isSelectMicUser = NO;
|
||||
// [self getMewMicroSelectUid];
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -402,15 +285,13 @@
|
||||
[view configRoomInfo:roomInfo];
|
||||
[view configMicQueue:self.micQueue];
|
||||
[view configMicroView:model];
|
||||
if (self.hostDelegate.getUserInfo.uid && model.userInfo.uid == self.hostDelegate.getUserInfo.uid) {
|
||||
if (self.hostDelegate.getUserInformation.uid && model.userInfo.uid == self.hostDelegate.getUserInformation.uid) {
|
||||
selfNeedBroadcast = model.microState.micState == MicroMicStateType_Open;
|
||||
}
|
||||
if (model.microState.micState == MicroMicStateType_Close) {
|
||||
[RtcManager instance].localMuted = YES;
|
||||
}
|
||||
|
||||
// [view showLeaveMode:(i == 0 && leaveMode)];
|
||||
|
||||
}
|
||||
|
||||
if (!isHandleRTC) {
|
||||
@@ -449,15 +330,14 @@
|
||||
- (void)didSelectAtIndex:(NSInteger)index {
|
||||
|
||||
MicroQueueModel* micModel = [self.micQueue objectForKey:[self indexToPosition:index]];
|
||||
UserInfoModel* userInfo = self.hostDelegate.getUserInfo;
|
||||
RoomInfoModel* roomInfo = self.hostDelegate.getRoomInfo;
|
||||
UserInfoModel* userInfo = self.hostDelegate.getUserInformation;
|
||||
RoomInfoModel* roomInfo = self.hostDelegate.getRoomInformation;
|
||||
NSString* position = [self indexToPosition:index];
|
||||
NSString* uid = [NSString stringWithFormat:@"%ld", userInfo.uid];
|
||||
NSString* roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
||||
|
||||
|
||||
// 1. 麦位上有人,弹窗用户资料卡
|
||||
|
||||
NSString * targetUid;
|
||||
if (roomInfo.leaveMode && [position isEqualToString:@"-1"]) {
|
||||
targetUid = [NSString stringWithFormat:@"%ld", roomInfo.uid];
|
||||
@@ -479,20 +359,6 @@
|
||||
UIView<MicroViewProtocol> *selectMicroView = [self findMicroViewByIndex:index];
|
||||
selectMicroView.layer.borderColor = self.isSelectMicUser ? [ThemeColor colorWithHexString:@"#9552FF"].CGColor : UIColor.clearColor.CGColor;
|
||||
selectMicroView.layer.borderWidth = self.isSelectMicUser ? 2.0 : 0.0;
|
||||
|
||||
// XPUserCardInfoModel * model = [[XPUserCardInfoModel alloc] init];
|
||||
// model.uid = targetUid;
|
||||
// model.position = position;
|
||||
// model.posState = micModel.microState.posState;
|
||||
// model.micState = micModel.microState.micState;
|
||||
// model.nick = userInfo.nick;
|
||||
// model.roomInfo = roomInfo;
|
||||
// model.micQueue = self.micQueue;
|
||||
// model.delegate = self.hostDelegate;
|
||||
// model.superMangerList = self.hostDelegate.getRoomSuperAdminList;
|
||||
// XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
|
||||
// [self.hostDelegate.getCurrentNav presentViewController:userCardVC animated:YES completion:nil];
|
||||
// [StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"userCard"}];
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -555,7 +421,7 @@
|
||||
if (member.type == NIMTeamMemberTypeOwner || member.type == NIMTeamMemberTypeManager) {
|
||||
// 2.1.1 上麦
|
||||
TTActionSheetConfig *upMic = [TTActionSheetConfig normalTitle:@"上麦" clickAction:^{
|
||||
NSString* selfUid = [NSString stringWithFormat:@"%ld", (long)self.hostDelegate.getUserInfo.uid];
|
||||
NSString* selfUid = [NSString stringWithFormat:@"%ld", (long)self.hostDelegate.getUserInformation.uid];
|
||||
UIView* microView = [self findMicroViewByUid:selfUid];
|
||||
if (microView) {
|
||||
nimDownQueue([self indexToPosition:microView.tag], position);
|
||||
@@ -563,62 +429,8 @@
|
||||
nimUpQueue(position, NO);
|
||||
}
|
||||
}];
|
||||
|
||||
// 2.1.2 锁麦/解锁
|
||||
// NSString * lockTitle;
|
||||
// if (roomInfo.roomModeType == RoomModeType_Open_Micro_Mode) {
|
||||
// lockTitle = micModel.microState.posState == MicroPosStateType_Free ? @"切换为排麦" : @"切换为自由麦";
|
||||
// }else {
|
||||
// lockTitle = micModel.microState.posState == MicroPosStateType_Free ? @"锁麦" : @"解锁";
|
||||
// }
|
||||
// TTActionSheetConfig *lockMic = [TTActionSheetConfig normalTitle:lockTitle clickAction:^{
|
||||
// NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
// NSString * state = micModel.microState.posState == MicroPosStateType_Free ? @"1" : @"0";
|
||||
// NSString * ticket = [[AccountInfoStorage instance] getTicket];
|
||||
// NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
// [Api microLockCompletion:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
//
|
||||
// } roomUid:roomUid state:state position:position ticket:ticket uid:uid];
|
||||
// }];
|
||||
|
||||
// 2.1.3 闭麦/开麦
|
||||
// NSString * muteTitle = micModel.microState.micState == MicroMicStateType_Open ? @"闭麦" : @"开麦";
|
||||
// TTActionSheetConfig *muteMic = [TTActionSheetConfig normalTitle:muteTitle clickAction:^{
|
||||
// NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
|
||||
// NSString * state = micModel.microState.micState == MicroMicStateType_Open ? @"1" : @"0";
|
||||
// NSString * ticket = [[AccountInfoStorage instance] getTicket];
|
||||
// NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
// [Api microMuteCompletion:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
//
|
||||
// } roomUid:roomUid state:state position:position ticket:ticket uid:uid];
|
||||
// }];
|
||||
|
||||
// 抱Ta上麦
|
||||
// NSString * inviteTitle = ([position isEqualToString:@"-1"] && roomInfo.roomModeType == RoomModeType_Open_Blind) ? @"抱Ta上麦当主持" : @"抱Ta上麦";
|
||||
// TTActionSheetConfig *inviteMic = [TTActionSheetConfig normalTitle:inviteTitle clickAction:^{
|
||||
// XPRoomInviteUserViewController * inviteUserMicVC = [[XPRoomInviteUserViewController alloc] init];
|
||||
// inviteUserMicVC.isManagerOrOwner = ([position isEqualToString:@"-1"] && roomInfo.roomModeType == RoomModeType_Open_Blind);
|
||||
// inviteUserMicVC.roomId = roomId;
|
||||
// inviteUserMicVC.position = position;
|
||||
// inviteUserMicVC.blindDateVipUid = roomInfo.blindDateVipUid;
|
||||
// [self.hostDelegate.getCurrentNav pushViewController:inviteUserMicVC animated:YES];
|
||||
// }];
|
||||
//
|
||||
// [TTPopup actionSheetWithItems:@[upMic,inviteMic, lockMic, muteMic]];
|
||||
} else {
|
||||
// 2.2 非管理员点击了空麦位
|
||||
// if (micModel.microState.posState == MicroPosStateType_Lock) {
|
||||
// if (roomInfo.roomModeType == RoomModeType_Open_Micro_Mode) {
|
||||
// if ([self getIndexByUid:[AccountInfoStorage instance].getUid] != -1) {
|
||||
// [XCHUDTool showErrorWithMessage:@"你已经在麦上了"];
|
||||
// } else {
|
||||
// [XCHUDTool showErrorWithMessage:@"需要排麦才可以上麦哦~"];
|
||||
// }
|
||||
// }
|
||||
// return;
|
||||
// };
|
||||
|
||||
NSString* selfUid = [NSString stringWithFormat:@"%ld", (long)self.hostDelegate.getUserInfo.uid];
|
||||
NSString* selfUid = [NSString stringWithFormat:@"%ld", (long)self.hostDelegate.getUserInformation.uid];
|
||||
UIView* microView = [self findMicroViewByUid:selfUid];
|
||||
if (microView) {
|
||||
if (self.isUpingMic) {
|
||||
@@ -645,7 +457,7 @@
|
||||
return;
|
||||
}
|
||||
for (NSString* uid in uids) {
|
||||
if ([RtcManager instance].isLocalMuted && uid.integerValue == self.hostDelegate.getUserInfo.uid) {
|
||||
if ([RtcManager instance].isLocalMuted && uid.integerValue == self.hostDelegate.getUserInformation.uid) {
|
||||
continue;
|
||||
}
|
||||
UIView<MicroViewProtocol>* microView = [self findMicroViewByUid:uid];
|
||||
@@ -723,33 +535,19 @@
|
||||
extModel.avatar = userInfo.avatar;
|
||||
extModel.uid = userInfo.uid;
|
||||
extModel.nick = userInfo.nick;
|
||||
// extModel.headWearUrl = userInfo.headwearEffect.length > 0 ? userInfo.headwearEffect : userInfo.headwearPic;
|
||||
// extModel.micCircle = userInfo.micCircle;
|
||||
extModel.micNickColor = userInfo.micNickColor;
|
||||
extModel.preventKick = userInfo.userVipInfoVO.preventKick;
|
||||
extModel.enterHide = userInfo.userVipInfoVO.enterHide;
|
||||
// extModel.groupType = userInfo.groupType;
|
||||
return [extModel model2dictionary];
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)initNIMMicroQueues {
|
||||
RoomInfoModel* roomInfo = self.hostDelegate.getRoomInfo;
|
||||
RoomInfoModel* roomInfo = self.hostDelegate.getRoomInformation;
|
||||
// 获取麦位的状态,并初始化 self.micQueue 。
|
||||
[[NIMSDK sharedSDK].chatroomManager fetchChatroomInfo:[NSString stringWithFormat:@"%ld", (long)roomInfo.roomId] completion:^(NSError * _Nullable error, NIMChatroom * _Nullable chatroom) {
|
||||
if (error) {
|
||||
return;
|
||||
}
|
||||
NSDictionary *info = (NSDictionary *)[chatroom.ext toJSONObject];
|
||||
NSDictionary *micState = [info[@"micQueue"] toJSONObject];
|
||||
for (NSString *position in micState.allKeys) {
|
||||
MicroStateModel *state = [MicroStateModel modelWithJSON:micState[position]];
|
||||
MicroQueueModel *sequence = [self.micQueue objectForKey:position];
|
||||
sequence.microState = state;
|
||||
}
|
||||
[self microQueueUpdated: NO];
|
||||
}];
|
||||
[self fetchChatroomNIM];
|
||||
|
||||
self.hadGetQueueInfoSuccess = NO;
|
||||
// 获取麦位的用户,并初始化 self.micQueue 。
|
||||
[[NIMSDK sharedSDK].chatroomManager fetchChatroomQueue:[NSString stringWithFormat:@"%ld", (long)roomInfo.roomId] completion:^(NSError * _Nullable error, NSArray<NSDictionary<NSString *,NSString *> *> * _Nullable info) {
|
||||
@@ -765,12 +563,9 @@
|
||||
}
|
||||
}
|
||||
[self microQueueUpdated:ownerRTCChange];
|
||||
[self.hostDelegate onMicroQueueUpdate:self.micQueue];
|
||||
[self.hostDelegate microQueueUpdate:self.micQueue];
|
||||
self.hadGetQueueInfoSuccess = YES;
|
||||
}];
|
||||
|
||||
// 拿到麦序后初始化礼物值
|
||||
// [self initGiftValue];
|
||||
}
|
||||
|
||||
#pragma mark - Action Event
|
||||
@@ -778,6 +573,24 @@
|
||||
[self didSelectAtIndex:tap.view.tag];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)fetchChatroomNIM {
|
||||
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInformation;
|
||||
// 获取麦位的状态,并初始化self.micQueue.
|
||||
[[NIMSDK sharedSDK].chatroomManager fetchChatroomInfo:[NSString stringWithFormat:@"%ld", (long)roomInfo.roomId] completion:^(NSError * _Nullable error, NIMChatroom * _Nullable chatroom) {
|
||||
if (error) return;
|
||||
|
||||
NSDictionary *info = [chatroom.ext toJSONObject];
|
||||
NSDictionary *micState = [info[@"micQueue"] toJSONObject];
|
||||
for (NSString *position in micState.allKeys) {
|
||||
MicroStateModel *state = [MicroStateModel modelWithJSON:micState[position]];
|
||||
MicroQueueModel *sequence = [self.micQueue objectForKey:position];
|
||||
sequence.microState = state;
|
||||
}
|
||||
[self microQueueUpdated:NO];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Get
|
||||
- (NSMutableArray *)microViews {
|
||||
if (!_microViews) {
|
@@ -1,17 +0,0 @@
|
||||
//
|
||||
// MicroNobleWaveView.h
|
||||
// yinmeng-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/21.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MicroNobleWaveView : UIView
|
||||
///开始展示声波动画
|
||||
- (void)startWaveAnimationWithUrl:(NSString *)url;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,93 +0,0 @@
|
||||
//
|
||||
// MicroNobleWaveView.m
|
||||
// yinmeng-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/21.
|
||||
//
|
||||
|
||||
#import "MicroNobleWaveView.h"
|
||||
//SVGA动画播放
|
||||
#import "SVGA.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import "YMMacro.h"
|
||||
|
||||
@interface MicroNobleWaveView()<SVGAPlayerDelegate>
|
||||
|
||||
@property (nonatomic, strong) SVGAImageView *svgDisplayView;
|
||||
|
||||
@property (strong, nonatomic) SVGAParser *parser;
|
||||
|
||||
//是否正在动画中
|
||||
@property (nonatomic,assign) BOOL isAnimationing;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MicroNobleWaveView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Public Method
|
||||
///开始展示声波动画
|
||||
- (void)startWaveAnimationWithUrl:(NSString *)url {
|
||||
if (self.isAnimationing) {
|
||||
return;
|
||||
}
|
||||
@kWeakify(self);
|
||||
[self.parser parseWithURL:[NSURL URLWithString:url] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
|
||||
@kStrongify(self);
|
||||
self.svgDisplayView.loops = 1;
|
||||
self.svgDisplayView.clearsAfterStop = YES;
|
||||
self.svgDisplayView.videoItem = videoItem;
|
||||
self.isAnimationing = YES;
|
||||
[self.svgDisplayView startAnimation];
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
}];
|
||||
}
|
||||
|
||||
///结束声波动画
|
||||
- (void)stopWaveAnimation {
|
||||
self.isAnimationing = NO;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.svgDisplayView];
|
||||
self.svgDisplayView.delegate = self;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.svgDisplayView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - SVGAPlayerDelegate
|
||||
- (void)svgaPlayerDidFinishedAnimation:(SVGAPlayer *)player {
|
||||
[self stopWaveAnimation];
|
||||
}
|
||||
|
||||
- (SVGAImageView *)svgDisplayView {
|
||||
if (!_svgDisplayView) {
|
||||
_svgDisplayView = [[SVGAImageView alloc] init];
|
||||
_svgDisplayView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _svgDisplayView;
|
||||
}
|
||||
|
||||
- (SVGAParser *)parser {
|
||||
if (!_parser) {
|
||||
_parser = [[SVGAParser alloc]init];
|
||||
}
|
||||
return _parser;
|
||||
}
|
||||
|
||||
@end
|
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// MicroWaveView.h
|
||||
// yinmeng-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/21.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MicroWaveView : UIView
|
||||
///开始展示声波动画
|
||||
- (void)startWaveAnimation;
|
||||
|
||||
///结束声波动画
|
||||
- (void)stopWaveAnimation;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,115 +0,0 @@
|
||||
//
|
||||
// MicroWaveView.m
|
||||
// yinmeng-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/21.
|
||||
//
|
||||
|
||||
#import "MicroWaveView.h"
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <POP.h>
|
||||
|
||||
@interface MicroWaveView ()
|
||||
//声波动画图层
|
||||
@property (nonatomic,strong) UIView * firstView;
|
||||
//是否正在动画中
|
||||
@property (nonatomic,assign) BOOL isAnimationing;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MicroWaveView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
self.firstView.layer.cornerRadius = self.frame.size.width / 2;
|
||||
}
|
||||
|
||||
#pragma mark - Public Method
|
||||
///开始展示声波动画
|
||||
- (void)startWaveAnimation {
|
||||
if (self.isAnimationing) {
|
||||
return;
|
||||
}
|
||||
self.isAnimationing = YES;
|
||||
self.firstView.hidden = NO;
|
||||
[self animationWithLayer:self.firstView];
|
||||
|
||||
}
|
||||
///结束声波动画
|
||||
- (void)stopWaveAnimation {
|
||||
self.isAnimationing = NO;
|
||||
self.firstView.hidden = YES;
|
||||
[self.firstView.layer removeAllAnimations];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.firstView];
|
||||
self.firstView.hidden = YES;
|
||||
}
|
||||
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.firstView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)animationWithLayer:(UIView *)view {
|
||||
int animtionDura = 1;
|
||||
POPBasicAnimation *animation2 = [POPBasicAnimation animationWithPropertyNamed:kPOPLayerScaleXY];
|
||||
animation2.beginTime = CACurrentMediaTime();
|
||||
animation2.duration = animtionDura;
|
||||
animation2.fromValue = [NSValue valueWithCGSize:CGSizeMake(1.f, 1.f)];
|
||||
animation2.toValue = [NSValue valueWithCGSize:CGSizeMake(1.4f, 1.4f)];
|
||||
|
||||
POPBasicAnimation *animation3 = [POPBasicAnimation animationWithPropertyNamed:kPOPLayerOpacity];
|
||||
animation3.duration = 0.6 * animtionDura;
|
||||
animation3.beginTime = CACurrentMediaTime();
|
||||
animation3.fromValue = @1.0;
|
||||
animation3.toValue = @0.8;
|
||||
animation3.repeatCount = 1;
|
||||
animation3.removedOnCompletion = YES;
|
||||
|
||||
POPBasicAnimation *animation4 = [POPBasicAnimation animationWithPropertyNamed:kPOPLayerOpacity];
|
||||
animation4.duration = 0.4* animtionDura;
|
||||
animation4.beginTime = CACurrentMediaTime() + 0.6 * animtionDura;
|
||||
animation4.fromValue = @0.8;
|
||||
animation4.toValue = @0.0;
|
||||
animation4.repeatCount = 1;
|
||||
animation4.removedOnCompletion = YES;
|
||||
|
||||
if (view == self.firstView) {
|
||||
[animation4 setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
self.isAnimationing = NO;
|
||||
}];
|
||||
}
|
||||
|
||||
[view.layer pop_addAnimation:animation2 forKey:@"animation2"];
|
||||
[view.layer pop_addAnimation:animation3 forKey:@"animation3"];
|
||||
[view.layer pop_addAnimation:animation4 forKey:@"animation4"];
|
||||
|
||||
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (UIView *)firstView {
|
||||
if (!_firstView) {
|
||||
_firstView = [[UIView alloc] init];
|
||||
_firstView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.3];
|
||||
_firstView.layer.borderWidth = 1;
|
||||
_firstView.layer.borderColor = [UIColor whiteColor].CGColor;
|
||||
}
|
||||
return _firstView;
|
||||
}
|
||||
@end
|
@@ -19,16 +19,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong, readonly) UILabel *postionLabel;
|
||||
///用户名/号麦位
|
||||
@property (nonatomic,strong, readonly) UILabel *nickLabel;
|
||||
///头饰
|
||||
//@property (nonatomic,strong, readonly) YYAnimatedImageView *headWearImageView;
|
||||
///礼物值
|
||||
//@property (nonatomic,strong, readonly) MicroGiftValueView *giftValueView;
|
||||
///离开模式
|
||||
@property (nonatomic,strong, readonly) UILabel *leaveLabel;
|
||||
///坑位是否闭麦的
|
||||
@property (nonatomic,strong, readonly) UIImageView *micStateImageView;
|
||||
///声波动画
|
||||
//@property (nonatomic,strong, readonly) MicroWaveView *animationView;
|
||||
///0 号麦位显示性别
|
||||
@property (nonatomic,strong, readonly) UIImageView *sexImageView;
|
||||
///昵称容器
|
||||
|
@@ -6,7 +6,6 @@
|
||||
//
|
||||
|
||||
#import "MicroView.h"
|
||||
#import "MicroWaveView.h"
|
||||
/// Model
|
||||
#import "UserInfoModel.h"
|
||||
#import "RoomInfoModel.h"
|
||||
@@ -40,8 +39,6 @@
|
||||
@property (nonatomic,strong) RoomInfoModel *roomInfo;
|
||||
///当前的麦序
|
||||
@property (nonatomic,strong) NSMutableDictionary<NSString *,MicroQueueModel *> *micQueue;
|
||||
///声波动画
|
||||
@property (nonatomic,strong) MicroWaveView *animationView;
|
||||
@end
|
||||
|
||||
@implementation MicroView
|
||||
@@ -56,15 +53,8 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Init View
|
||||
|
||||
|
||||
|
||||
|
||||
#pragma mark - MicroViewProtocol
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.animationView];
|
||||
[self addSubview:self.avatarImageView];
|
||||
[self addSubview:self.micStateImageView];
|
||||
self.stackView.hidden = [self isHiddenMicroUserInfoView];
|
||||
@@ -75,10 +65,6 @@
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
// [self.animationView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.mas_equalTo(self.avatarImageView);
|
||||
// }];
|
||||
//
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self);
|
||||
make.height.mas_equalTo(self.mas_height);
|
||||
@@ -148,7 +134,7 @@
|
||||
}
|
||||
|
||||
/** 获取当前房间的信息 */
|
||||
- (RoomInfoModel *)getRoomInfo {
|
||||
- (RoomInfoModel *)getRoomInformation {
|
||||
return self.roomInfo;
|
||||
}
|
||||
|
||||
@@ -158,18 +144,13 @@
|
||||
}
|
||||
|
||||
/** 获取当前的麦序 */
|
||||
- (NSMutableDictionary<NSString *,MicroQueueModel *> *)getMicroQueue {
|
||||
- (NSMutableDictionary<NSString *,MicroQueueModel *> *)getCustomMicroQueue {
|
||||
return self.micQueue;
|
||||
}
|
||||
|
||||
/** 用户正在讲话(播放光圈)。*/
|
||||
- (void)userSpeaking {
|
||||
UserInfoModel * userInfo = self.microModel.userInfo;
|
||||
// if (!userInfo.micCircle.length) {
|
||||
[self.animationView startWaveAnimation];
|
||||
// return;
|
||||
// }
|
||||
// [self.nobleWaveView startWaveAnimationWithUrl:userInfo.micCircle];
|
||||
// [self.animationView startWaveAnimation];
|
||||
}
|
||||
|
||||
|
||||
@@ -199,8 +180,6 @@
|
||||
if (!_avatarImageView) {
|
||||
_avatarImageView = [[NetImageView alloc] init];
|
||||
_avatarImageView.userInteractionEnabled = YES;
|
||||
// _avatarImageView.layer.cornerRadius = 70/2.0;
|
||||
// _avatarImageView.layer.masksToBounds = YES;
|
||||
}
|
||||
return _avatarImageView;
|
||||
}
|
||||
@@ -273,12 +252,12 @@
|
||||
return _leaveLabel ;
|
||||
}
|
||||
|
||||
- (MicroWaveView *)animationView {
|
||||
if (!_animationView) {
|
||||
_animationView = [[MicroWaveView alloc] init];
|
||||
}
|
||||
return _animationView;
|
||||
}
|
||||
//- (MicroWaveView *)animationView {
|
||||
// if (!_animationView) {
|
||||
// _animationView = [[MicroWaveView alloc] init];
|
||||
// }
|
||||
// return _animationView;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
@@ -17,9 +17,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/** 给子view 添加约束 */
|
||||
- (void)initSubViewConstraints;
|
||||
|
||||
/** 离开模式。 */
|
||||
- (void)showLeaveMode:(BOOL)isLeaveMode;
|
||||
|
||||
/** 设置麦位信息。 */
|
||||
- (void)configMicroView:(MicroQueueModel *)model;
|
||||
|
||||
@@ -35,13 +32,13 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)configRoomInfo:(RoomInfoModel *)roomInfo;
|
||||
|
||||
/** 获取当前房间的信息 */
|
||||
- (RoomInfoModel *)getRoomInfo;
|
||||
- (RoomInfoModel *)getRoomInformation;
|
||||
|
||||
/** 设置当前房间的麦序 */
|
||||
- (void)configMicQueue:(NSMutableDictionary <NSString *, MicroQueueModel *> *)micQueue;
|
||||
|
||||
/** 获取当前的麦序 */
|
||||
- (NSMutableDictionary<NSString *, MicroQueueModel *>*)getMicroQueue;
|
||||
- (NSMutableDictionary<NSString *, MicroQueueModel *>*)getCustomMicroQueue;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -21,10 +21,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
+ (UIColor *)positionFemaleNickBackColor;
|
||||
/// 没有用户的 坑位的背景色
|
||||
+ (UIColor *)positionNormalNickBackColor;
|
||||
///老板位 坑位开始背景色
|
||||
+ (UIColor *)positionBossBackStartColor;
|
||||
///老板位 坑位结束背景色
|
||||
+ (UIColor *)positionBossBackEndColor;
|
||||
///坑位的昵称的颜色 0xFFFFFF
|
||||
+ (UIColor *)positionNickColor;
|
||||
// ------公屏相关颜色 Start------ /
|
||||
@@ -32,32 +28,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
+ (UIColor *)messageBubbleColor;
|
||||
///公屏文字的颜色
|
||||
+ (UIColor *)messageTextColor;
|
||||
///公屏名字的颜色
|
||||
+ (UIColor *)messageNickColor;
|
||||
///默认的文字的颜色
|
||||
+ (UIColor *)messageDefaultTextColor;
|
||||
///获取公屏提示 颜色 #FFFFFE 0.5
|
||||
+ (UIColor *)messageViewTipColor;
|
||||
// ------公屏相关颜色 END------ /
|
||||
|
||||
// ------房间内礼物 Start------ /
|
||||
///礼物广播显示 个数的颜色 #FEF563
|
||||
+ (UIColor *)giftBroadcastNumberColor;
|
||||
///礼物广播 显示的名字的颜色 #2F0060
|
||||
+ (UIColor *)giftBroadcastNickColor;
|
||||
// ------房间内礼物 End------ /
|
||||
|
||||
/// 糖果树记录钻石的颜色
|
||||
+ (UIColor *)candyTreeDiamondColor;
|
||||
/// 糖果树名字的颜色
|
||||
+ (UIColor *)candyTreeNickColor;
|
||||
/// 糖果树的分割线颜色
|
||||
+ (UIColor *)candyTreeDividerColor;
|
||||
|
||||
///动画礼物个数的颜色 0xFFF226
|
||||
+ (UIColor *)animationGiftNumberColor;
|
||||
///更多menu文字颜色 0xFFFFFF
|
||||
+ (UIColor *)roomMoreMenuTextColor;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -40,15 +40,6 @@
|
||||
return [UIColor colorWithWhite:1 alpha:0.2];
|
||||
}
|
||||
|
||||
///老板位 坑位开始背景色
|
||||
+ (UIColor *)positionBossBackStartColor {
|
||||
return UIColorFromRGB(0xEFCC95);
|
||||
}
|
||||
|
||||
///老板位 坑位结束背景色
|
||||
+ (UIColor *)positionBossBackEndColor {
|
||||
return UIColorFromRGB(0xF1B54D);
|
||||
}
|
||||
// ------公屏相关颜色 Start------ /
|
||||
|
||||
///公屏默认背景的颜色
|
||||
@@ -59,55 +50,12 @@
|
||||
+ (UIColor *)messageTextColor {
|
||||
return [UIColor whiteColor];
|
||||
}
|
||||
///公屏名字的颜色
|
||||
+ (UIColor *)messageNickColor {
|
||||
return UIColorFromRGB(0xFFD98C);
|
||||
}
|
||||
|
||||
///默认的文字的颜色
|
||||
+ (UIColor *)messageDefaultTextColor {
|
||||
return [UIColor colorWithWhite:1 alpha:0.5];
|
||||
}
|
||||
|
||||
///获取公屏提示 颜色 #FFFFFE 0.5
|
||||
+ (UIColor *)messageViewTipColor{
|
||||
return UIColorRGBAlpha(0xfffffe, 0.5);
|
||||
}
|
||||
|
||||
// ------公屏相关颜色 END------ /
|
||||
|
||||
///礼物广播 显示的名字的颜色 #2F0060
|
||||
+ (UIColor *)giftBroadcastNickColor {
|
||||
return UIColorFromRGB(0xFFFFFF);
|
||||
}
|
||||
|
||||
///礼物广播显示 个数的颜色 #FEF563
|
||||
+ (UIColor *)giftBroadcastNumberColor {
|
||||
return UIColorFromRGB(0xFEF563);
|
||||
}
|
||||
|
||||
|
||||
/// 糖果树记录钻石的颜色
|
||||
+ (UIColor *)candyTreeDiamondColor {
|
||||
return UIColorFromRGB(0x1194F5);
|
||||
}
|
||||
|
||||
/// 糖果树的分割线颜色
|
||||
+ (UIColor *)candyTreeDividerColor {
|
||||
return UIColorFromRGB(0xEDEDED);
|
||||
}
|
||||
|
||||
/// 糖果树名字的颜色
|
||||
+ (UIColor *)candyTreeNickColor {
|
||||
return UIColorFromRGB(0x333333);
|
||||
}
|
||||
|
||||
///动画礼物个数的颜色 0xFFF226
|
||||
+ (UIColor *)animationGiftNumberColor {
|
||||
return UIColorFromRGB(0xFFF226);
|
||||
}
|
||||
|
||||
///更多menu文字颜色 0xFFFFFF
|
||||
+ (UIColor *)roomMoreMenuTextColor {
|
||||
return UIColorFromRGB(0xFFFFFF);
|
||||
}
|
||||
@end
|
||||
|
@@ -1,37 +0,0 @@
|
||||
//
|
||||
// YMRoomMiniManager.h
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/7.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
@class RoomInfoModel, NIMMessage, UserInfoModel;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface YMRoomMiniManager : NSObject
|
||||
+ (instancetype)shareManager;
|
||||
|
||||
/// 获取房间信息
|
||||
- (RoomInfoModel *)getRoomInfo;
|
||||
/// 获取用户信息
|
||||
- (UserInfoModel *)getUserInfo;
|
||||
|
||||
/// 配置用户信息
|
||||
/// - Parameter userInfo: 用户信息
|
||||
- (void)configUserInfo:(UserInfoModel * _Nullable)userInfo;
|
||||
/// 配置房间信息
|
||||
/// - Parameter userInfo: 房间信息
|
||||
- (void)configRoomInfo:(RoomInfoModel * _Nullable)roomInfo;
|
||||
|
||||
///保存一下 房间的公屏防止最小化出去之后 被清空了
|
||||
- (void)saveRoomMessage:(NIMMessage *)message;
|
||||
/// 获取当前房间保存的信息
|
||||
- (NSArray<NIMMessage *> *)getLocalCurrentRoomMessage;
|
||||
/// 充值本地保存的信息
|
||||
- (void)resetLocalMessage;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,78 +0,0 @@
|
||||
//
|
||||
// YMRoomMiniManager.m
|
||||
// mew-ios
|
||||
//
|
||||
// Created by 触海 on 2023/11/7.
|
||||
//
|
||||
|
||||
#import "YMRoomMiniManager.h"
|
||||
#import "YMRoomMessageConstant.h"
|
||||
|
||||
@interface YMRoomMiniManager()
|
||||
///公屏消息
|
||||
@property (nonatomic,strong) NSMutableArray *messageArray;
|
||||
///房间信息
|
||||
@property (nonatomic,strong) RoomInfoModel *roomInfo;
|
||||
///用户信息
|
||||
@property (nonatomic,strong) UserInfoModel *userInfo;
|
||||
@end
|
||||
|
||||
@implementation YMRoomMiniManager
|
||||
|
||||
#pragma mark - Public Method
|
||||
+ (instancetype)shareManager {
|
||||
static dispatch_once_t onceToken;
|
||||
static YMRoomMiniManager *instance;
|
||||
dispatch_once(&onceToken, ^{
|
||||
instance = [[YMRoomMiniManager alloc] init];
|
||||
});
|
||||
return instance;
|
||||
}
|
||||
|
||||
- (RoomInfoModel *)getRoomInfo {
|
||||
return self.roomInfo;
|
||||
}
|
||||
|
||||
- (void)configRoomInfo:(RoomInfoModel *_Nullable)roomInfo {
|
||||
self.roomInfo = roomInfo;
|
||||
}
|
||||
|
||||
- (UserInfoModel *)getUserInfo {
|
||||
return self.userInfo;
|
||||
}
|
||||
|
||||
- (void)configUserInfo:(UserInfoModel * _Nullable)userInfo {
|
||||
self.userInfo = userInfo;
|
||||
}
|
||||
|
||||
|
||||
///保存一下 房间的公屏防止最小化出去之后 被清空了
|
||||
- (void)saveRoomMessage:(NIMMessage *)message {
|
||||
[self.messageArray addObject:message];
|
||||
if (self.messageArray.count > kRoomMessageMaxLength) {
|
||||
NSIndexSet *set = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, kRoomMessageMaxLength/2)];
|
||||
NSArray *needRemoveMsgArray = [self.messageArray objectsAtIndexes:set];
|
||||
[self.messageArray removeObjectsInArray:needRemoveMsgArray];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSArray<NIMMessage *> *)getLocalCurrentRoomMessage {
|
||||
return [self.messageArray copy];
|
||||
}
|
||||
|
||||
|
||||
- (void)resetLocalMessage {
|
||||
[self.messageArray removeAllObjects];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Get
|
||||
- (NSMutableArray *)messageArray {
|
||||
if (!_messageArray) {
|
||||
_messageArray = [NSMutableArray array];
|
||||
}
|
||||
return _messageArray;
|
||||
}
|
||||
|
||||
|
||||
@end
|
Reference in New Issue
Block a user