Commit b850bf2baa4c1cbb43f54a22c353d6eab3f0f814

Authored by 朱林
2 parents 1d5064a8 0782c6e7

Merge branch 'master' of bj.gitlab.cnlive.com:ios-team/LiveVideoCloud

Conflicts:
	LiveVideoCloud/LiveVideoCloud.xcodeproj/project.pbxproj
Showing 88 changed files with 2777 additions and 216 deletions
LiveVideoCloud/LiveVideoCloud.xcodeproj/project.pbxproj
... ... @@ -21,12 +21,8 @@
21 21 810B65071E779B1F00133E15 /* ViewController+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 810B64FD1E779B1F00133E15 /* ViewController+MASAdditions.m */; };
22 22 810B650A1E77B39D00133E15 /* LVCFullScreenPlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 810B65091E77B39D00133E15 /* LVCFullScreenPlayerController.m */; };
23 23 8112D4311E7927A5002E00F6 /* LVCPlayerLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */; };
24   - 811BB67A1E80F6F6005C6291 /* LVCChatView.m in Sources */ = {isa = PBXBuildFile; fileRef = 811BB6791E80F6F6005C6291 /* LVCChatView.m */; };
25 24 812E50531E7699DC004F5FCD /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 812E50501E7699DC004F5FCD /* CNLivePlayerSDK.framework */; };
26   - 812E50551E7699E9004F5FCD /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 812E504F1E7699DC004F5FCD /* CNLiveMsgTools.framework */; };
27   - 812E50561E7699E9004F5FCD /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 812E504F1E7699DC004F5FCD /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
28 25 812E50581E7699E9004F5FCD /* CNLivePlayerSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 812E50501E7699DC004F5FCD /* CNLivePlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
29   - 814FC9661E7FB62F00944D7D /* LVCInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 814FC9651E7FB62F00944D7D /* LVCInputView.m */; };
30 26 81FB5B3C1E7A6FFC00F98E1D /* SevenSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = 81FB5B3B1E7A6FFC00F98E1D /* SevenSwitch.m */; };
31 27 D2029B861E6EAAA50027CD92 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029B851E6EAAA50027CD92 /* main.m */; };
32 28 D2029B911E6EAAA50027CD92 /* animation.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D2029B901E6EAAA50027CD92 /* animation.xcassets */; };
... ... @@ -133,6 +129,11 @@
133 129 D22830FC1E77C2D900627701 /* BottomToolView.m in Sources */ = {isa = PBXBuildFile; fileRef = D22830FB1E77C2D900627701 /* BottomToolView.m */; };
134 130 D22830FF1E77C69E00627701 /* GiftListView.m in Sources */ = {isa = PBXBuildFile; fileRef = D22830FE1E77C69E00627701 /* GiftListView.m */; };
135 131 D22831091E77D8D500627701 /* GiftModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D22831081E77D8D500627701 /* GiftModel.m */; };
  132 + D236967E1E7F9E4100E4BF71 /* GiftPayButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D236967D1E7F9E4100E4BF71 /* GiftPayButton.m */; };
  133 + D23696841E7FC6A900E4BF71 /* chatListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D23696831E7FC6A900E4BF71 /* chatListCell.m */; };
  134 + D236968D1E7FC7C200E4BF71 /* CNBarrageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D236968A1E7FC7C200E4BF71 /* CNBarrageManager.m */; };
  135 + D236968E1E7FC7C200E4BF71 /* CNBarrageView.m in Sources */ = {isa = PBXBuildFile; fileRef = D236968C1E7FC7C200E4BF71 /* CNBarrageView.m */; };
  136 + D23696921E7FC83800E4BF71 /* chatMsgModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D23696911E7FC83800E4BF71 /* chatMsgModel.m */; };
136 137 D25530001E7909AC00DF38A5 /* GiftAnimOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = D2552FFF1E7909AC00DF38A5 /* GiftAnimOperation.m */; };
137 138 D25530031E79115100DF38A5 /* AnimQueueManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D25530021E79115100DF38A5 /* AnimQueueManager.m */; };
138 139 D25530061E7911A800DF38A5 /* GiftAnimationAction.m in Sources */ = {isa = PBXBuildFile; fileRef = D25530051E7911A800DF38A5 /* GiftAnimationAction.m */; };
... ... @@ -150,6 +151,18 @@
150 151 D25BF87A1E7B8A82007FB138 /* FilterFunctionView.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF8771E7B8A82007FB138 /* FilterFunctionView.m */; };
151 152 D25BF87B1E7B8A82007FB138 /* SliderView.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF8791E7B8A82007FB138 /* SliderView.m */; };
152 153 D25BF87D1E7B8C78007FB138 /* KSYGPUResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D25BF87C1E7B8C78007FB138 /* KSYGPUResource.bundle */; };
  154 + D25BF8801E7BD266007FB138 /* LVCUGCLivePlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF87F1E7BD266007FB138 /* LVCUGCLivePlayerController.m */; };
  155 + D25BF8831E7F775F007FB138 /* LVCUGCPlayerLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF8821E7F775F007FB138 /* LVCUGCPlayerLoadingView.m */; };
  156 + D25BF8901E7F7F8F007FB138 /* UGCLoading.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = D25BF88F1E7F7F8F007FB138 /* UGCLoading.jpeg */; };
  157 + D25BF8931E7FBAEA007FB138 /* LVCUGCBackgroundView.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF8921E7FBAEA007FB138 /* LVCUGCBackgroundView.m */; };
  158 + D25BF8971E7FE01B007FB138 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */; };
  159 + D25BF8991E7FE033007FB138 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */; };
  160 + D25BF89A1E7FE046007FB138 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */; };
  161 + D25BF89B1E7FE046007FB138 /* CNLiveChatManager.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
  162 + D25BF89C1E7FE049007FB138 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */; };
  163 + D25BF89D1E7FE049007FB138 /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
  164 + D25BF8A01E80C4BD007FB138 /* UIImage+LVCVagueImage.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF89F1E80C4BD007FB138 /* UIImage+LVCVagueImage.m */; };
  165 + D25BF8A31E80C4FC007FB138 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8A21E80C4FC007FB138 /* Accelerate.framework */; };
153 166 D2888D941E6EB8B4003A77C8 /* LVCTabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888D931E6EB8B4003A77C8 /* LVCTabBar.m */; };
154 167 D2888D9E1E6EBF1B003A77C8 /* LVCLiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888D9B1E6EBF1B003A77C8 /* LVCLiveViewController.m */; };
155 168 D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB01E6EC05F003A77C8 /* TempViewController.m */; };
... ... @@ -181,8 +194,9 @@
181 194 dstPath = "";
182 195 dstSubfolderSpec = 10;
183 196 files = (
184   - 812E50561E7699E9004F5FCD /* CNLiveMsgTools.framework in Embed Frameworks */,
185 197 812E50581E7699E9004F5FCD /* CNLivePlayerSDK.framework in Embed Frameworks */,
  198 + D25BF89B1E7FE046007FB138 /* CNLiveChatManager.framework in Embed Frameworks */,
  199 + D25BF89D1E7FE049007FB138 /* CNLiveMsgTools.framework in Embed Frameworks */,
186 200 );
187 201 name = "Embed Frameworks";
188 202 runOnlyForDeploymentPostprocessing = 0;
... ... @@ -223,12 +237,7 @@
223 237 810B65091E77B39D00133E15 /* LVCFullScreenPlayerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCFullScreenPlayerController.m; sourceTree = "<group>"; };
224 238 8112D42F1E7927A5002E00F6 /* LVCPlayerLoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCPlayerLoadingView.h; sourceTree = "<group>"; };
225 239 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCPlayerLoadingView.m; sourceTree = "<group>"; };
226   - 811BB6781E80F6F6005C6291 /* LVCChatView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCChatView.h; sourceTree = "<group>"; };
227   - 811BB6791E80F6F6005C6291 /* LVCChatView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCChatView.m; sourceTree = "<group>"; };
228   - 812E504F1E7699DC004F5FCD /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; };
229 240 812E50501E7699DC004F5FCD /* CNLivePlayerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLivePlayerSDK.framework; sourceTree = "<group>"; };
230   - 814FC9641E7FB62F00944D7D /* LVCInputView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCInputView.h; sourceTree = "<group>"; };
231   - 814FC9651E7FB62F00944D7D /* LVCInputView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCInputView.m; sourceTree = "<group>"; };
232 241 81FB5B3A1E7A6FFC00F98E1D /* SevenSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SevenSwitch.h; sourceTree = "<group>"; };
233 242 81FB5B3B1E7A6FFC00F98E1D /* SevenSwitch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SevenSwitch.m; sourceTree = "<group>"; };
234 243 D2029B811E6EAAA50027CD92 /* LiveVideoCloud.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LiveVideoCloud.app; sourceTree = BUILT_PRODUCTS_DIR; };
... ... @@ -447,8 +456,8 @@
447 456 D217A2471E7B76C7003B44CB /* PresentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PresentView.m; sourceTree = "<group>"; };
448 457 D217A2481E7B76C7003B44CB /* PresentViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PresentViewCell.h; sourceTree = "<group>"; };
449 458 D217A2491E7B76C7003B44CB /* PresentViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PresentViewCell.m; sourceTree = "<group>"; };
450   - D217A24C1E7B77C7003B44CB /* ComboCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComboCell.h; sourceTree = "<group>"; };
451   - D217A24D1E7B77C7003B44CB /* ComboCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ComboCell.m; sourceTree = "<group>"; };
  459 + D217A24C1E7B77C7003B44CB /* ComboCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ComboCell.h; path = Present/ComboCell.h; sourceTree = "<group>"; };
  460 + D217A24D1E7B77C7003B44CB /* ComboCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ComboCell.m; path = Present/ComboCell.m; sourceTree = "<group>"; };
452 461 D22830EF1E778C0F00627701 /* LiveBaseView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveBaseView.h; sourceTree = "<group>"; };
453 462 D22830F01E778C0F00627701 /* LiveBaseView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveBaseView.m; sourceTree = "<group>"; };
454 463 D22830FA1E77C2D900627701 /* BottomToolView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BottomToolView.h; sourceTree = "<group>"; };
... ... @@ -457,6 +466,16 @@
457 466 D22830FE1E77C69E00627701 /* GiftListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GiftListView.m; sourceTree = "<group>"; };
458 467 D22831071E77D8D500627701 /* GiftModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GiftModel.h; sourceTree = "<group>"; };
459 468 D22831081E77D8D500627701 /* GiftModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GiftModel.m; sourceTree = "<group>"; };
  469 + D236967C1E7F9E4100E4BF71 /* GiftPayButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GiftPayButton.h; sourceTree = "<group>"; };
  470 + D236967D1E7F9E4100E4BF71 /* GiftPayButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GiftPayButton.m; sourceTree = "<group>"; };
  471 + D23696821E7FC6A900E4BF71 /* chatListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chatListCell.h; sourceTree = "<group>"; };
  472 + D23696831E7FC6A900E4BF71 /* chatListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = chatListCell.m; sourceTree = "<group>"; };
  473 + D23696891E7FC7C200E4BF71 /* CNBarrageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNBarrageManager.h; sourceTree = "<group>"; };
  474 + D236968A1E7FC7C200E4BF71 /* CNBarrageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNBarrageManager.m; sourceTree = "<group>"; };
  475 + D236968B1E7FC7C200E4BF71 /* CNBarrageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNBarrageView.h; sourceTree = "<group>"; };
  476 + D236968C1E7FC7C200E4BF71 /* CNBarrageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNBarrageView.m; sourceTree = "<group>"; };
  477 + D23696901E7FC83800E4BF71 /* chatMsgModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chatMsgModel.h; sourceTree = "<group>"; };
  478 + D23696911E7FC83800E4BF71 /* chatMsgModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = chatMsgModel.m; sourceTree = "<group>"; };
460 479 D2552FFE1E7909AC00DF38A5 /* GiftAnimOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GiftAnimOperation.h; sourceTree = "<group>"; };
461 480 D2552FFF1E7909AC00DF38A5 /* GiftAnimOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GiftAnimOperation.m; sourceTree = "<group>"; };
462 481 D25530011E79115100DF38A5 /* AnimQueueManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimQueueManager.h; sourceTree = "<group>"; };
... ... @@ -489,6 +508,18 @@
489 508 D25BF8781E7B8A82007FB138 /* SliderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SliderView.h; sourceTree = "<group>"; };
490 509 D25BF8791E7B8A82007FB138 /* SliderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SliderView.m; sourceTree = "<group>"; };
491 510 D25BF87C1E7B8C78007FB138 /* KSYGPUResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = KSYGPUResource.bundle; sourceTree = "<group>"; };
  511 + D25BF87E1E7BD266007FB138 /* LVCUGCLivePlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLivePlayerController.h; sourceTree = "<group>"; };
  512 + D25BF87F1E7BD266007FB138 /* LVCUGCLivePlayerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLivePlayerController.m; sourceTree = "<group>"; };
  513 + D25BF8811E7F775F007FB138 /* LVCUGCPlayerLoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCPlayerLoadingView.h; sourceTree = "<group>"; };
  514 + D25BF8821E7F775F007FB138 /* LVCUGCPlayerLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCPlayerLoadingView.m; sourceTree = "<group>"; };
  515 + D25BF88F1E7F7F8F007FB138 /* UGCLoading.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = UGCLoading.jpeg; sourceTree = "<group>"; };
  516 + D25BF8911E7FBAEA007FB138 /* LVCUGCBackgroundView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCBackgroundView.h; sourceTree = "<group>"; };
  517 + D25BF8921E7FBAEA007FB138 /* LVCUGCBackgroundView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCBackgroundView.m; sourceTree = "<group>"; };
  518 + D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; };
  519 + D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; };
  520 + D25BF89E1E80C4BD007FB138 /* UIImage+LVCVagueImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+LVCVagueImage.h"; sourceTree = "<group>"; };
  521 + D25BF89F1E80C4BD007FB138 /* UIImage+LVCVagueImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+LVCVagueImage.m"; sourceTree = "<group>"; };
  522 + D25BF8A21E80C4FC007FB138 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
492 523 D2888D921E6EB8B4003A77C8 /* LVCTabBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCTabBar.h; sourceTree = "<group>"; };
493 524 D2888D931E6EB8B4003A77C8 /* LVCTabBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCTabBar.m; sourceTree = "<group>"; };
494 525 D2888D9A1E6EBF1B003A77C8 /* LVCLiveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCLiveViewController.h; sourceTree = "<group>"; };
... ... @@ -506,9 +537,13 @@
506 537 isa = PBXFrameworksBuildPhase;
507 538 buildActionMask = 2147483647;
508 539 files = (
  540 + D25BF8A31E80C4FC007FB138 /* Accelerate.framework in Frameworks */,
509 541 D2575C7D1E76A4F300E3A8FC /* NHGiftAnimtionSDK.a in Frameworks */,
510 542 812E50531E7699DC004F5FCD /* CNLivePlayerSDK.framework in Frameworks */,
511   - 812E50551E7699E9004F5FCD /* CNLiveMsgTools.framework in Frameworks */,
  543 + D25BF89A1E7FE046007FB138 /* CNLiveChatManager.framework in Frameworks */,
  544 + D25BF8971E7FE01B007FB138 /* CNLiveMsgTools.framework in Frameworks */,
  545 + D25BF8991E7FE033007FB138 /* CNLiveChatManager.framework in Frameworks */,
  546 + D25BF89C1E7FE049007FB138 /* CNLiveMsgTools.framework in Frameworks */,
512 547 );
513 548 runOnlyForDeploymentPostprocessing = 0;
514 549 };
... ... @@ -572,24 +607,14 @@
572 607 812E504E1E7699B9004F5FCD /* CNLiveSDK */ = {
573 608 isa = PBXGroup;
574 609 children = (
  610 + D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */,
  611 + D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */,
575 612 D25BF87C1E7B8C78007FB138 /* KSYGPUResource.bundle */,
576   - 812E504F1E7699DC004F5FCD /* CNLiveMsgTools.framework */,
577 613 812E50501E7699DC004F5FCD /* CNLivePlayerSDK.framework */,
578 614 );
579 615 path = CNLiveSDK;
580 616 sourceTree = "<group>";
581 617 };
582   - 814FC9531E7F6B5D00944D7D /* ChatView */ = {
583   - isa = PBXGroup;
584   - children = (
585   - 814FC9641E7FB62F00944D7D /* LVCInputView.h */,
586   - 814FC9651E7FB62F00944D7D /* LVCInputView.m */,
587   - 811BB6781E80F6F6005C6291 /* LVCChatView.h */,
588   - 811BB6791E80F6F6005C6291 /* LVCChatView.m */,
589   - );
590   - path = ChatView;
591   - sourceTree = "<group>";
592   - };
593 618 81FB5B391E7A6FFC00F98E1D /* SevenSwitch */ = {
594 619 isa = PBXGroup;
595 620 children = (
... ... @@ -606,6 +631,7 @@
606 631 D2029B9D1E6EAAA50027CD92 /* LiveVideoCloudTests */,
607 632 D2029BA81E6EAAA50027CD92 /* LiveVideoCloudUITests */,
608 633 D2029B821E6EAAA50027CD92 /* Products */,
  634 + D25BF8A11E80C4FC007FB138 /* Frameworks */,
609 635 );
610 636 sourceTree = "<group>";
611 637 };
... ... @@ -627,7 +653,7 @@
627 653 D2029CDC1E6EAE2E0027CD92 /* UtilKits */,
628 654 D2029BD01E6EADE10027CD92 /* Classes */,
629 655 D2029CD11E6EADE70027CD92 /* HttpService */,
630   - D2029CD71E6EAE140027CD92 /* Resource */,
  656 + D25BF88A1E7F7F77007FB138 /* Resource */,
631 657 D2029B901E6EAAA50027CD92 /* animation.xcassets */,
632 658 D2029CD61E6EADFB0027CD92 /* PrefixHeader.pch */,
633 659 D2029B841E6EAAA50027CD92 /* Supporting Files */,
... ... @@ -1081,45 +1107,6 @@
1081 1107 path = HttpService;
1082 1108 sourceTree = "<group>";
1083 1109 };
1084   - D2029CD71E6EAE140027CD92 /* Resource */ = {
1085   - isa = PBXGroup;
1086   - children = (
1087   - D2029CD81E6EAE140027CD92 /* Fonts */,
1088   - D2029CD91E6EAE140027CD92 /* Images */,
1089   - D2029CDA1E6EAE140027CD92 /* Sound */,
1090   - D2029CDB1E6EAE140027CD92 /* Videos */,
1091   - );
1092   - path = Resource;
1093   - sourceTree = "<group>";
1094   - };
1095   - D2029CD81E6EAE140027CD92 /* Fonts */ = {
1096   - isa = PBXGroup;
1097   - children = (
1098   - );
1099   - path = Fonts;
1100   - sourceTree = "<group>";
1101   - };
1102   - D2029CD91E6EAE140027CD92 /* Images */ = {
1103   - isa = PBXGroup;
1104   - children = (
1105   - );
1106   - path = Images;
1107   - sourceTree = "<group>";
1108   - };
1109   - D2029CDA1E6EAE140027CD92 /* Sound */ = {
1110   - isa = PBXGroup;
1111   - children = (
1112   - );
1113   - path = Sound;
1114   - sourceTree = "<group>";
1115   - };
1116   - D2029CDB1E6EAE140027CD92 /* Videos */ = {
1117   - isa = PBXGroup;
1118   - children = (
1119   - );
1120   - path = Videos;
1121   - sourceTree = "<group>";
1122   - };
1123 1110 D2029CDC1E6EAE2E0027CD92 /* UtilKits */ = {
1124 1111 isa = PBXGroup;
1125 1112 children = (
... ... @@ -1151,6 +1138,8 @@
1151 1138 D2029CE91E6EAE2E0027CD92 /* UILabel+labelFitSize.m */,
1152 1139 D2029CEA1E6EAE2E0027CD92 /* UIView+Extension.h */,
1153 1140 D2029CEB1E6EAE2E0027CD92 /* UIView+Extension.m */,
  1141 + D25BF89E1E80C4BD007FB138 /* UIImage+LVCVagueImage.h */,
  1142 + D25BF89F1E80C4BD007FB138 /* UIImage+LVCVagueImage.m */,
1154 1143 );
1155 1144 path = Category;
1156 1145 sourceTree = "<group>";
... ... @@ -1221,8 +1210,6 @@
1221 1210 D217A2471E7B76C7003B44CB /* PresentView.m */,
1222 1211 D217A2481E7B76C7003B44CB /* PresentViewCell.h */,
1223 1212 D217A2491E7B76C7003B44CB /* PresentViewCell.m */,
1224   - D217A24C1E7B77C7003B44CB /* ComboCell.h */,
1225   - D217A24D1E7B77C7003B44CB /* ComboCell.m */,
1226 1213 );
1227 1214 path = Present;
1228 1215 sourceTree = "<group>";
... ... @@ -1232,6 +1219,8 @@
1232 1219 children = (
1233 1220 D22830FD1E77C69E00627701 /* GiftListView.h */,
1234 1221 D22830FE1E77C69E00627701 /* GiftListView.m */,
  1222 + D236967C1E7F9E4100E4BF71 /* GiftPayButton.h */,
  1223 + D236967D1E7F9E4100E4BF71 /* GiftPayButton.m */,
1235 1224 );
1236 1225 path = GiftViews;
1237 1226 sourceTree = "<group>";
... ... @@ -1239,6 +1228,8 @@
1239 1228 D22830F61E77C26C00627701 /* Chat */ = {
1240 1229 isa = PBXGroup;
1241 1230 children = (
  1231 + D23696881E7FC7C200E4BF71 /* Barrage */,
  1232 + D236968F1E7FC83800E4BF71 /* ChatMsgModel */,
1242 1233 D22830F71E77C27A00627701 /* ChatViews */,
1243 1234 );
1244 1235 path = Chat;
... ... @@ -1247,6 +1238,8 @@
1247 1238 D22830F71E77C27A00627701 /* ChatViews */ = {
1248 1239 isa = PBXGroup;
1249 1240 children = (
  1241 + D23696821E7FC6A900E4BF71 /* chatListCell.h */,
  1242 + D23696831E7FC6A900E4BF71 /* chatListCell.m */,
1250 1243 );
1251 1244 path = ChatViews;
1252 1245 sourceTree = "<group>";
... ... @@ -1276,6 +1269,26 @@
1276 1269 path = GiftModel;
1277 1270 sourceTree = "<group>";
1278 1271 };
  1272 + D23696881E7FC7C200E4BF71 /* Barrage */ = {
  1273 + isa = PBXGroup;
  1274 + children = (
  1275 + D23696891E7FC7C200E4BF71 /* CNBarrageManager.h */,
  1276 + D236968A1E7FC7C200E4BF71 /* CNBarrageManager.m */,
  1277 + D236968B1E7FC7C200E4BF71 /* CNBarrageView.h */,
  1278 + D236968C1E7FC7C200E4BF71 /* CNBarrageView.m */,
  1279 + );
  1280 + path = Barrage;
  1281 + sourceTree = "<group>";
  1282 + };
  1283 + D236968F1E7FC83800E4BF71 /* ChatMsgModel */ = {
  1284 + isa = PBXGroup;
  1285 + children = (
  1286 + D23696901E7FC83800E4BF71 /* chatMsgModel.h */,
  1287 + D23696911E7FC83800E4BF71 /* chatMsgModel.m */,
  1288 + );
  1289 + path = ChatMsgModel;
  1290 + sourceTree = "<group>";
  1291 + };
1279 1292 D2575C431E76846900E3A8FC /* InteractionSections */ = {
1280 1293 isa = PBXGroup;
1281 1294 children = (
... ... @@ -1307,6 +1320,8 @@
1307 1320 isa = PBXGroup;
1308 1321 children = (
1309 1322 D217A2441E7B76C7003B44CB /* Present */,
  1323 + D217A24C1E7B77C7003B44CB /* ComboCell.h */,
  1324 + D217A24D1E7B77C7003B44CB /* ComboCell.m */,
1310 1325 D25530041E7911A800DF38A5 /* GiftAnimationAction.h */,
1311 1326 D25530051E7911A800DF38A5 /* GiftAnimationAction.m */,
1312 1327 D25530011E79115100DF38A5 /* AnimQueueManager.h */,
... ... @@ -1360,6 +1375,54 @@
1360 1375 path = View;
1361 1376 sourceTree = "<group>";
1362 1377 };
  1378 + D25BF88A1E7F7F77007FB138 /* Resource */ = {
  1379 + isa = PBXGroup;
  1380 + children = (
  1381 + D25BF88C1E7F7F77007FB138 /* Images */,
  1382 + D25BF88B1E7F7F77007FB138 /* Fonts */,
  1383 + D25BF88D1E7F7F77007FB138 /* Sound */,
  1384 + D25BF88E1E7F7F77007FB138 /* Videos */,
  1385 + );
  1386 + path = Resource;
  1387 + sourceTree = "<group>";
  1388 + };
  1389 + D25BF88B1E7F7F77007FB138 /* Fonts */ = {
  1390 + isa = PBXGroup;
  1391 + children = (
  1392 + );
  1393 + path = Fonts;
  1394 + sourceTree = "<group>";
  1395 + };
  1396 + D25BF88C1E7F7F77007FB138 /* Images */ = {
  1397 + isa = PBXGroup;
  1398 + children = (
  1399 + D25BF88F1E7F7F8F007FB138 /* UGCLoading.jpeg */,
  1400 + );
  1401 + path = Images;
  1402 + sourceTree = "<group>";
  1403 + };
  1404 + D25BF88D1E7F7F77007FB138 /* Sound */ = {
  1405 + isa = PBXGroup;
  1406 + children = (
  1407 + );
  1408 + path = Sound;
  1409 + sourceTree = "<group>";
  1410 + };
  1411 + D25BF88E1E7F7F77007FB138 /* Videos */ = {
  1412 + isa = PBXGroup;
  1413 + children = (
  1414 + );
  1415 + path = Videos;
  1416 + sourceTree = "<group>";
  1417 + };
  1418 + D25BF8A11E80C4FC007FB138 /* Frameworks */ = {
  1419 + isa = PBXGroup;
  1420 + children = (
  1421 + D25BF8A21E80C4FC007FB138 /* Accelerate.framework */,
  1422 + );
  1423 + name = Frameworks;
  1424 + sourceTree = "<group>";
  1425 + };
1363 1426 D2888D911E6EB897003A77C8 /* View */ = {
1364 1427 isa = PBXGroup;
1365 1428 children = (
... ... @@ -1391,7 +1454,6 @@
1391 1454 D2888DA71E6EC014003A77C8 /* homeSections */ = {
1392 1455 isa = PBXGroup;
1393 1456 children = (
1394   - 814FC9531E7F6B5D00944D7D /* ChatView */,
1395 1457 D2888DA81E6EC014003A77C8 /* Controller */,
1396 1458 D2888DA91E6EC014003A77C8 /* Model */,
1397 1459 D2888DAA1E6EC014003A77C8 /* View */,
... ... @@ -1408,6 +1470,8 @@
1408 1470 810B64E21E779AFE00133E15 /* LVCLivePlayerController.m */,
1409 1471 810B65081E77B39D00133E15 /* LVCFullScreenPlayerController.h */,
1410 1472 810B65091E77B39D00133E15 /* LVCFullScreenPlayerController.m */,
  1473 + D25BF87E1E7BD266007FB138 /* LVCUGCLivePlayerController.h */,
  1474 + D25BF87F1E7BD266007FB138 /* LVCUGCLivePlayerController.m */,
1411 1475 );
1412 1476 path = Controller;
1413 1477 sourceTree = "<group>";
... ... @@ -1426,6 +1490,10 @@
1426 1490 810B64DF1E779AE900133E15 /* LVCPlayer.m */,
1427 1491 8112D42F1E7927A5002E00F6 /* LVCPlayerLoadingView.h */,
1428 1492 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */,
  1493 + D25BF8811E7F775F007FB138 /* LVCUGCPlayerLoadingView.h */,
  1494 + D25BF8821E7F775F007FB138 /* LVCUGCPlayerLoadingView.m */,
  1495 + D25BF8911E7FBAEA007FB138 /* LVCUGCBackgroundView.h */,
  1496 + D25BF8921E7FBAEA007FB138 /* LVCUGCBackgroundView.m */,
1429 1497 );
1430 1498 path = View;
1431 1499 sourceTree = "<group>";
... ... @@ -1575,6 +1643,7 @@
1575 1643 D2029C971E6EADE10027CD92 /* Info.plist in Resources */,
1576 1644 D2575C7F1E76A4F300E3A8FC /* NHPlaneViews.xib in Resources */,
1577 1645 D2575C7B1E76A4F300E3A8FC /* NHCarViews.xib in Resources */,
  1646 + D25BF8901E7F7F8F007FB138 /* UGCLoading.jpeg in Resources */,
1578 1647 D2029CC91E6EADE10027CD92 /* SVProgressHUD.bundle in Resources */,
1579 1648 D2575C801E76A4F300E3A8FC /* resource.bundle in Resources */,
1580 1649 D2029B941E6EAAA50027CD92 /* LaunchScreen.storyboard in Resources */,
... ... @@ -1608,8 +1677,8 @@
1608 1677 files = (
1609 1678 D2029CC31E6EADE10027CD92 /* UIImageView+HighlightedWebCache.m in Sources */,
1610 1679 D22830FF1E77C69E00627701 /* GiftListView.m in Sources */,
1611   - 814FC9661E7FB62F00944D7D /* LVCInputView.m in Sources */,
1612 1680 D2029CC01E6EADE10027CD92 /* UIImage+GIF.m in Sources */,
  1681 + D25BF8831E7F775F007FB138 /* LVCUGCPlayerLoadingView.m in Sources */,
1613 1682 D2029BCF1E6EADD70027CD92 /* ZXTabBarController.m in Sources */,
1614 1683 D2029D071E6EAE2E0027CD92 /* ZXConst.m in Sources */,
1615 1684 D2029CB81E6EADE10027CD92 /* SDImageCache.m in Sources */,
... ... @@ -1617,14 +1686,15 @@
1617 1686 D2029CA71E6EADE10027CD92 /* MJRefreshAutoGifFooter.m in Sources */,
1618 1687 D2029CC11E6EADE10027CD92 /* UIImage+MultiFormat.m in Sources */,
1619 1688 D2029C861E6EADE10027CD92 /* Tools.m in Sources */,
  1689 + D25BF8931E7FBAEA007FB138 /* LVCUGCBackgroundView.m in Sources */,
1620 1690 D2029CA01E6EADE10027CD92 /* NSObject+MJProperty.m in Sources */,
1621 1691 D2029CB51E6EADE10027CD92 /* SDiOSVersion.m in Sources */,
1622 1692 D2029C9C1E6EADE10027CD92 /* MJPropertyType.m in Sources */,
1623   - 811BB67A1E80F6F6005C6291 /* LVCChatView.m in Sources */,
1624 1693 D22831091E77D8D500627701 /* GiftModel.m in Sources */,
1625 1694 D2029CCD1E6EADE10027CD92 /* SearchModel.m in Sources */,
1626 1695 810B65051E779B1F00133E15 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */,
1627 1696 D2029CCB1E6EADE10027CD92 /* SVRadialGradientLayer.m in Sources */,
  1697 + D23696841E7FC6A900E4BF71 /* chatListCell.m in Sources */,
1628 1698 D2029CAF1E6EADE10027CD92 /* MJRefreshStateHeader.m in Sources */,
1629 1699 D2029C941E6EADE10027CD92 /* UIRefreshControl+AFNetworking.m in Sources */,
1630 1700 D2029C911E6EADE10027CD92 /* UIButton+AFNetworking.m in Sources */,
... ... @@ -1664,6 +1734,7 @@
1664 1734 D2575C4A1E7685DE00E3A8FC /* UIView+Bubbling.m in Sources */,
1665 1735 D2029CA61E6EADE10027CD92 /* MJRefreshHeader.m in Sources */,
1666 1736 D2029CC41E6EADE10027CD92 /* UIImageView+WebCache.m in Sources */,
  1737 + D236967E1E7F9E4100E4BF71 /* GiftPayButton.m in Sources */,
1667 1738 D2029CC81E6EADE10027CD92 /* SVProgressAnimatedView.m in Sources */,
1668 1739 D2029C961E6EADE10027CD92 /* MBProgressHUD.m in Sources */,
1669 1740 810B65071E779B1F00133E15 /* ViewController+MASAdditions.m in Sources */,
... ... @@ -1674,6 +1745,7 @@
1674 1745 D2029C981E6EADE10027CD92 /* MJExtensionConst.m in Sources */,
1675 1746 D2575C671E76A25400E3A8FC /* LVCInteractionController.m in Sources */,
1676 1747 D2029CAE1E6EADE10027CD92 /* MJRefreshNormalHeader.m in Sources */,
  1748 + D23696921E7FC83800E4BF71 /* chatMsgModel.m in Sources */,
1677 1749 D2029C901E6EADE10027CD92 /* UIActivityIndicatorView+AFNetworking.m in Sources */,
1678 1750 D2029CC61E6EADE10027CD92 /* SSKeychain.m in Sources */,
1679 1751 D2029C8B1E6EADE10027CD92 /* AFURLResponseSerialization.m in Sources */,
... ... @@ -1685,9 +1757,11 @@
1685 1757 D2029D041E6EAE2E0027CD92 /* UILabel+ContentSize.m in Sources */,
1686 1758 D25530031E79115100DF38A5 /* AnimQueueManager.m in Sources */,
1687 1759 D2029C871E6EADE10027CD92 /* AFHTTPSessionManager.m in Sources */,
  1760 + D236968D1E7FC7C200E4BF71 /* CNBarrageManager.m in Sources */,
1688 1761 D2029B861E6EAAA50027CD92 /* main.m in Sources */,
1689 1762 D2029C8C1E6EADE10027CD92 /* AFURLSessionManager.m in Sources */,
1690 1763 D2029C9F1E6EADE10027CD92 /* NSObject+MJKeyValue.m in Sources */,
  1764 + D25BF8A01E80C4BD007FB138 /* UIImage+LVCVagueImage.m in Sources */,
1691 1765 D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */,
1692 1766 810B65021E779B1F00133E15 /* MASViewAttribute.m in Sources */,
1693 1767 D2029CAC1E6EADE10027CD92 /* MJRefreshBackStateFooter.m in Sources */,
... ... @@ -1701,6 +1775,7 @@
1701 1775 D2029BCA1E6EADD70027CD92 /* BaseModel.m in Sources */,
1702 1776 D25BF87B1E7B8A82007FB138 /* SliderView.m in Sources */,
1703 1777 810B65041E779B1F00133E15 /* NSArray+MASAdditions.m in Sources */,
  1778 + D25BF8801E7BD266007FB138 /* LVCUGCLivePlayerController.m in Sources */,
1704 1779 D2029D031E6EAE2E0027CD92 /* UIImage+ZXExtension.m in Sources */,
1705 1780 D2029D0A1E6EAE2E0027CD92 /* ZXServerUrl.m in Sources */,
1706 1781 D2029CCA1E6EADE10027CD92 /* SVProgressHUD.m in Sources */,
... ... @@ -1715,6 +1790,7 @@
1715 1790 D2029BCD1E6EADD70027CD92 /* BaseViewController.m in Sources */,
1716 1791 810B64E01E779AE900133E15 /* LVCPlayer.m in Sources */,
1717 1792 810B64FF1E779B1F00133E15 /* MASConstraint.m in Sources */,
  1793 + D236968E1E7FC7C200E4BF71 /* CNBarrageView.m in Sources */,
1718 1794 D25BF87A1E7B8A82007FB138 /* FilterFunctionView.m in Sources */,
1719 1795 D2029D001E6EAE2E0027CD92 /* NSNumber+ScaleHeight.m in Sources */,
1720 1796 D2888D9E1E6EBF1B003A77C8 /* LVCLiveViewController.m in Sources */,
... ... @@ -1924,6 +2000,7 @@
1924 2000 buildSettings = {
1925 2001 BUNDLE_LOADER = "$(TEST_HOST)";
1926 2002 INFOPLIST_FILE = LiveVideoCloudTests/Info.plist;
  2003 + IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1927 2004 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1928 2005 PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.zhangxu.LiveVideoCloudTests;
1929 2006 PRODUCT_NAME = "$(TARGET_NAME)";
... ... @@ -1936,6 +2013,7 @@
1936 2013 buildSettings = {
1937 2014 BUNDLE_LOADER = "$(TEST_HOST)";
1938 2015 INFOPLIST_FILE = LiveVideoCloudTests/Info.plist;
  2016 + IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1939 2017 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1940 2018 PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.zhangxu.LiveVideoCloudTests;
1941 2019 PRODUCT_NAME = "$(TARGET_NAME)";
... ... @@ -1947,6 +2025,7 @@
1947 2025 isa = XCBuildConfiguration;
1948 2026 buildSettings = {
1949 2027 INFOPLIST_FILE = LiveVideoCloudUITests/Info.plist;
  2028 + IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1950 2029 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1951 2030 PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.zhangxu.LiveVideoCloudUITests;
1952 2031 PRODUCT_NAME = "$(TARGET_NAME)";
... ... @@ -1958,6 +2037,7 @@
1958 2037 isa = XCBuildConfiguration;
1959 2038 buildSettings = {
1960 2039 INFOPLIST_FILE = LiveVideoCloudUITests/Info.plist;
  2040 + IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1961 2041 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1962 2042 PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.zhangxu.LiveVideoCloudUITests;
1963 2043 PRODUCT_NAME = "$(TARGET_NAME)";
... ...
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/CNLiveChatManager 0 → 100755
No preview for this file type
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Headers/CNLiveChatManager.h 0 → 100644
  1 +//
  2 +// CNLiveChatManager.h
  3 +// CNLiveChatManager
  4 +//
  5 +// Created by cnliveJunBo on 17/2/27.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +#import "CNLiveChatUserInfo.h"
  11 +#import "CNLiveChatStatusDefine.h"
  12 +#import "CNLiveChatMessage.h"
  13 +
  14 +@protocol CNLiveChatManagerDelegate <NSObject>
  15 +
  16 +@optional
  17 +/**
  18 + 连接状态的的监听器
  19 +
  20 + @param status 网络连接状态码
  21 + */
  22 +- (void)onConnectionStatusChanged:(CNLiveConnectionStatus)status;
  23 +
  24 +
  25 +/**
  26 + 加入聊天室成功的监听
  27 + @param chatroomId 聊天室ID
  28 + */
  29 +- (void)onChatRoomJoined:(NSString *)chatroomId;
  30 +
  31 +
  32 +/*!
  33 + 加入聊天室失败的监听
  34 +
  35 + @param chatroomId 聊天室ID
  36 + @param errorCode 加入失败的错误码
  37 +
  38 + @discussion 如果错误码是CNLive_KICKED_FROM_CHATROOM或CNLive_CHATROOM_NOT_EXIST,则不会自动重新加入聊天室,App需要按照自己的逻辑处理。
  39 + */
  40 +- (void)onChatRoomJoinFailed:(NSString *)chatroomId
  41 + errorCode:(CNLiveChatErrorCode)errorCode;
  42 +
  43 +/**
  44 + 接收消息监听
  45 +
  46 + @param message 消息实体类型对象(包括消息内容,消息ID,会话类型,目标ID,发送者的用户信息)
  47 + */
  48 +- (void)onReceived:(CNLiveChatMessage *)message;
  49 +
  50 +
  51 +/**
  52 + 当前用户在其他设备上登录,此设备被踢下线。
  53 + */
  54 +- (void)kickedByAnotherDevice;
  55 +
  56 +@end
  57 +
  58 +@interface CNLiveChatManager : NSObject
  59 +
  60 +/**
  61 + 聊天SDK代理,设置代理后,实现代理方法。
  62 + */
  63 +@property (nonatomic, weak) id<CNLiveChatManagerDelegate> delegate;
  64 +
  65 +/**
  66 + 当前登录用户的用户信息
  67 +
  68 + @discussion 用于与融云服务器建立连接之后,获取&设置当前用户的用户信息。
  69 + 用户ID不允许重新设置,只能设置昵称&头像。
  70 + */
  71 +@property(nonatomic, strong) CNLiveChatUserInfo *currentUserInfo;
  72 +
  73 +/**
  74 + 获取SDK版本号
  75 +
  76 + @return SDK版本号
  77 + */
  78 ++ (NSString *)getVersion;
  79 +
  80 +
  81 +/**
  82 + 获取视讯聊天核心类单例
  83 +
  84 + @return 视讯聊天核心类单例
  85 +
  86 + @discussion 您可以通过此方法,获取视讯聊天的单例,访问对象中的属性和方法。
  87 + */
  88 ++ (instancetype)sharedCNLiveChatManager;
  89 +
  90 +
  91 +/**
  92 + 初始化SDK方法
  93 +
  94 + @param appKey 从视讯云平台获取到的appKey
  95 + @param appId 从视讯云平台获取到的appId
  96 + @warning 必传参数
  97 + @discussion 您在使用聊天SDK所有功能之前,您必须先调用此方法初始化SDK。
  98 + 在App整个生命周期中,您只需要执行一次初始化。
  99 + */
  100 +- (void)initWithAppKey:(NSString *)appKey appId:(NSString *)appId;
  101 +
  102 +
  103 +/**
  104 + 连接到视讯云服务器
  105 +
  106 + @param successBlock 连接建立成功的回调。
  107 + @param errorBlock 连接建立成功的回调,返回错误码。
  108 + 注:连接服务器成功后才能使用聊天功能(如:单聊、加入聊天室、聊天室内 聊天);
  109 + */
  110 +- (void)connectServerSuccess:(void (^)())successBlock
  111 + error:(void (^)(CNLiveChatConnectErrorCode errors))errorBlock;
  112 +
  113 +/**
  114 + 以用户信息登陆到视讯云服务器
  115 +
  116 + @param userInfo 用户信息
  117 + @param successBlock 登陆成功的回调,返回登陆成功的用户ID。
  118 + @param errorBlock 登陆失败的回调,返回错误码。
  119 + 注:连接服务器成功后才能使用聊天功能(如:单聊、加入聊天室、聊天室内 聊天);
  120 + */
  121 +- (void)loginServer:(CNLiveChatUserInfo *)userInfo
  122 + success:(void (^)(NSString *userId))successBlock
  123 + error:(void (^)(CNLiveChatConnectErrorCode errors))errorBlock;
  124 +
  125 +
  126 +/**
  127 + 当前用户登出服务器
  128 + */
  129 +- (void)logoutServer;
  130 +
  131 +
  132 +/**
  133 + 断开与服务器的连接
  134 +
  135 + @param isReceivePush 与服务器断开后,是否还接收远程推送
  136 + */
  137 +- (void)disconnectServer:(BOOL)isReceivePush;
  138 +
  139 +
  140 +/**
  141 + 加入已经存在的聊天室(如果不存在或超限会返回聊天室不存在错误23410 或 人数超限23411)
  142 +
  143 + @param targetId 要加入的聊天室ID
  144 + @param messageCount 进入聊天室时获取历史消息的数量,-1<=messageCount<=50
  145 + -1表示不获取任何历史消息,0表示不特殊设置而使用SDK默认的设置(默认为获取10条),0<messageCount<=50为具体获取的消息数量,最大值为50。
  146 + @param successBlock 加入聊天室成功的回调,返回成功加入的聊天室ID。
  147 + @param errorBlock 加入聊天室失败的回调,返回错误码以及加入失败的聊天室ID。
  148 + */
  149 +- (void)joinExistChatRoom:(NSString *)targetId
  150 + messageCount:(int)messageCount
  151 + success:(void (^)(NSString *targetId))successBlock
  152 + error:(void (^)(CNLiveChatErrorCode errors, NSString *targetId))errorBlock;
  153 +
  154 +
  155 +/**
  156 + 加入聊天室,若不存在自动创建聊天室
  157 +
  158 + @param targetId 要加入的聊天室ID
  159 + @param messageCount 进入聊天室时获取历史消息的数量,-1<=messageCount<=50
  160 + -1表示不获取任何历史消息,0表示不特殊设置而使用SDK默认的设置(默认为获取10条),0<messageCount<=50为具体获取的消息数量,最大值为50。
  161 + @param successBlock 加入聊天室成功的回调,返回成功加入的聊天室ID
  162 + @param errorBlock 加入聊天室失败的回调,返回错误码以及加入失败的聊天室ID
  163 + */
  164 +- (void)joinChatRoom:(NSString *)targetId
  165 + messageCount:(int)messageCount
  166 + success:(void (^)(NSString *targetId))successBlock
  167 + error:(void (^)(CNLiveChatErrorCode errors, NSString *targetId))errorBlock;
  168 +
  169 +
  170 +/**
  171 + 退出聊天室
  172 +
  173 + @param targetId 要退出的聊天室ID
  174 + @param successBlock 退出聊天室成功的回调,返回成功退出的聊天室ID
  175 + @param errorBlock 退出聊天室失败的回调,返回失败的错误码以及退出失败的聊天室的ID
  176 + */
  177 +- (void)quitChatRoom:(NSString *)targetId
  178 + success:(void (^)(NSString *targetId))successBlock
  179 + error:(void (^)(CNLiveChatErrorCode errors, NSString *targetId))errorBlock;
  180 +
  181 +
  182 +/**
  183 + 发送消息
  184 +
  185 + @param message 消息内容
  186 + @param type 会话类型(私聊 / 聊天室)
  187 + @param targetId 会话目标ID(私聊:用户ID / 聊天室:聊天室ID)
  188 + @param successBlock 发送消息成功的回调,消息实体类型对象(包括消息内容,消息ID,会话类型,目标ID,发送者的用户信息)
  189 + @param errorBlock 发送消息失败的回调,返回错误码,消息ID,目标ID
  190 + */
  191 +- (void)sendMessage:(NSString *)message
  192 + type:(CNLiveConversationType)type
  193 + targetId:(NSString *)targetId
  194 + success:(void (^)(CNLiveChatMessage *message))successBlock
  195 + error:(void (^)(CNLiveChatErrorCode errors, NSString *messageId, NSString *targetId))errorBlock;
  196 +
  197 +
  198 +/**
  199 + 获取当前SDK的连接状态
  200 +
  201 + @return 当前SDK的连接状态
  202 + */
  203 +- (CNLiveConnectionStatus)getConnectionStatus;
  204 +
  205 +
  206 +/**
  207 + 获取某个会话中指定数量的最新消息
  208 +
  209 + @param conversationType 会话类型(私聊 / 聊天室)
  210 + @param targetId 会话目标ID(私聊:用户ID / 聊天室:聊天室ID)
  211 + @param count 所要获取的消息数量
  212 +
  213 + @return 消息数组(CNLiveChatMessage类型)
  214 + @discussion
  215 + 此方法会获取该会话中指定数量的最新消息实体,返回的消息实体按照时间从新到旧排列。
  216 + 如果会话中的消息数量小于参数count的值,会将该会话中的所有消息返回。
  217 + */
  218 +- (NSArray *)getLatestMessages:(CNLiveConversationType)conversationType
  219 + targetId:(NSString *)targetId
  220 + count:(int)count;
  221 +
  222 +
  223 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Headers/CNLiveChatMessage.h 0 → 100644
  1 +//
  2 +// CNLiveChatMessage.h
  3 +// CNLiveChatManager
  4 +//
  5 +// Created by cnliveJunBo on 17/3/3.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +#import "CNLiveChatStatusDefine.h"
  11 +#import "CNLiveChatUserInfo.h"
  12 +
  13 +@interface CNLiveChatMessage : NSObject
  14 +
  15 +/**
  16 + 会话类型(私聊 / 聊天室)
  17 + */
  18 +@property (nonatomic, assign) CNLiveConversationType conversationType;
  19 +
  20 +/**
  21 + 目标ID(消息来自聊天室的ID / 接收者ID)
  22 + */
  23 +@property (nonatomic, assign) NSString *targetId;
  24 +
  25 +/**
  26 + 消息ID(本地存储的消息的唯一值(数据库索引唯一值))
  27 + */
  28 +@property (nonatomic, assign) NSString *messageId;
  29 +
  30 +/**
  31 + 消息内容
  32 + */
  33 +@property (nonatomic, strong) NSString *messageContent;
  34 +
  35 +/**
  36 + 发送者的用户信息(userId, name, portraitUri)
  37 + */
  38 +@property (nonatomic, strong) CNLiveChatUserInfo *userInfo;
  39 +
  40 +/**
  41 + 消息的接收时间(Unix时间戳、毫秒)
  42 + */
  43 +@property(nonatomic, assign) long long receivedTime;
  44 +
  45 +/**
  46 + 消息的发送时间(Unix时间戳、毫秒)
  47 + */
  48 +@property(nonatomic, assign) long long sentTime;
  49 +
  50 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Headers/CNLiveChatStatusDefine.h 0 → 100644
  1 +//
  2 +// CNLiveChatStatusDefine.h
  3 +// CNLiveChatManager
  4 +//
  5 +// Created by cnliveJunBo on 17/3/1.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +#pragma mark - 错误码相关
  12 +
  13 +#pragma mark CNLiveChatConnectErrorCode - 建立连接返回的错误码
  14 +/*!
  15 + 建立连接返回的错误码
  16 +
  17 + @discussion
  18 + 开发者仅需要关注以下几种连接错误码,其余错误码SDK均会进行自动重连,开发者无须处理。
  19 + CNLive_CONN_ID_REJECT, CNLive_CONN_TOKEN_INCORRECT, CNLive_CONN_NOT_AUTHRORIZED,
  20 + CNLive_CONN_PACKAGE_NAME_INVALID, CNLive_CONN_APP_BLOCKED_OR_DELETED,
  21 + CNLive_CONN_USER_BLOCKED, CNLive_DISCONN_KICK, CNLive_CLIENT_NOT_INIT, CNLive_INVALID_PARAMETER, CNLive_INVALID_ARGUMENT
  22 + */
  23 +typedef NS_ENUM(NSInteger, CNLiveChatConnectErrorCode) {
  24 +
  25 + /*!
  26 + 连接已被释放
  27 +
  28 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  29 + */
  30 + CNLive_NET_CHANNEL_INVALID = 30001,
  31 +
  32 + /*!
  33 + 连接不可用
  34 +
  35 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  36 + */
  37 + CNLive_NET_UNAVAILABLE = 30002,
  38 +
  39 + /*!
  40 + 导航HTTP发送失败
  41 +
  42 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  43 + */
  44 + CNLive_NAVI_REQUEST_FAIL = 30004,
  45 +
  46 + /*!
  47 + 导航HTTP请求失败
  48 +
  49 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  50 + */
  51 + CNLive_NAVI_RESPONSE_ERROR = 30007,
  52 +
  53 + /*!
  54 + 导航HTTP返回数据格式错误
  55 +
  56 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  57 + */
  58 + CNLive_NODE_NOT_FOUND = 30008,
  59 +
  60 + /*!
  61 + 创建Socket连接失败
  62 +
  63 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  64 + */
  65 + CNLive_SOCKET_NOT_CONNECTED = 30010,
  66 +
  67 + /*!
  68 + Socket断开
  69 +
  70 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  71 + */
  72 + CNLive_SOCKET_DISCONNECTED = 30011,
  73 +
  74 + /*!
  75 + PING失败
  76 +
  77 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  78 + */
  79 + CNLive_PING_SEND_FAIL = 30012,
  80 +
  81 + /*!
  82 + PING超时
  83 +
  84 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  85 + */
  86 + CNLive_PONG_RECV_FAIL = 30013,
  87 +
  88 + /*!
  89 + 信令发送失败
  90 +
  91 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  92 + */
  93 + CNLive_MSG_SEND_FAIL = 30014,
  94 +
  95 + /*!
  96 + 连接过于频繁
  97 +
  98 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  99 + */
  100 + CNLive_CONN_OVERFREQUENCY = 30015,
  101 +
  102 + /*!
  103 + 连接ACK超时
  104 +
  105 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  106 + */
  107 + CNLive_CONN_ACK_TIMEOUT = 31000,
  108 +
  109 + /*!
  110 + 信令版本错误
  111 +
  112 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  113 + */
  114 + CNLive_CONN_PROTO_VERSION_ERROR = 31001,
  115 +
  116 + /*!
  117 + AppKey错误
  118 +
  119 + @discussion 请检查您使用的AppKey是否正确。(*自行处理)
  120 + */
  121 + CNLive_CONN_ID_REJECT = 31002,
  122 +
  123 + /*!
  124 + 服务器当前不可用(预留)
  125 +
  126 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  127 + */
  128 + CNLive_CONN_SERVER_UNAVAILABLE = 31003,
  129 +
  130 + /*!
  131 + Token无效
  132 +
  133 + @discussion Token无效一般有以下两种原因。(*自行处理)
  134 + 一是token错误,请您检查客户端初始化使用的AppKey和您服务器获取token使用的AppKey是否一致;
  135 + 二是token过期,是因为您在开发者后台设置了token过期时间,您需要请求您的服务器重新获取token并再次用新的token建立连接。
  136 + */
  137 + CNLive_CONN_TOKEN_INCORRECT = 31004,
  138 +
  139 + /*!
  140 + AppKey与Token不匹配
  141 +
  142 + @discussion
  143 + 请检查您使用的AppKey与Token是否正确,是否匹配。一般有以下两种原因。(*自行处理)
  144 + 一是token错误,请您检查客户端初始化使用的AppKey和您服务器获取token使用的AppKey是否一致;
  145 + 二是token过期,是因为您在开发者后台设置了token过期时间,您需要请求您的服务器重新获取token并再次用新的token建立连接。
  146 + */
  147 + CNLive_CONN_NOT_AUTHRORIZED = 31005,
  148 +
  149 + /*!
  150 + 连接重定向
  151 +
  152 + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。
  153 + */
  154 + CNLive_CONN_REDIRECTED = 31006,
  155 +
  156 + /*!
  157 + BundleID不正确
  158 +
  159 + @discussion 请检查您App的BundleID是否正确。(*自行处理)
  160 + */
  161 + CNLive_CONN_PACKAGE_NAME_INVALID = 31007,
  162 +
  163 + /*!
  164 + AppKey被封禁或已删除
  165 +
  166 + @discussion 请检查您使用的AppKey是否正确。(*自行处理)
  167 + */
  168 + CNLive_CONN_APP_BLOCKED_OR_DELETED = 31008,
  169 +
  170 + /*!
  171 + 用户被封禁
  172 +
  173 + @discussion 请检查您使用的Token是否正确,以及对应的UserId是否被封禁。(*自行处理)
  174 + */
  175 + CNLive_CONN_USER_BLOCKED = 31009,
  176 +
  177 + /*!
  178 + Token请求失败
  179 +
  180 + @discussion 请检查连接服务器方法的参数是否正确,特别是用户信息中的用户ID。也可能是无网络。(*自行处理)
  181 + */
  182 + CNLive_CONN_TOKEN_NULL = 31012,
  183 +
  184 + /*!
  185 + 当前用户在其他设备上登陆,此设备被踢下线。(*自行处理)
  186 + */
  187 + CNLive_DISCONN_KICK = 31010,
  188 +
  189 + /*!
  190 + SDK没有初始化
  191 +
  192 + @discussion 在使用SDK任何功能之前,必须先Init。(*自行处理)
  193 + */
  194 + CNLive_CONN_CLIENT_NOT_INIT = 33001,
  195 +
  196 + /*!
  197 + 开发者接口调用时传入的参数错误
  198 +
  199 + @discussion 请检查接口调用时传入的参数类型和值。(*自行处理)
  200 + */
  201 + CNLive_CONN_INVALID_PARAMETER = 33003,
  202 +
  203 + /*!
  204 + Connection已经存在
  205 +
  206 + @discussion
  207 + 调用过connect之后,建议在token错误或者被踢下线或者用户logout的情况下才需要再次调用connect。SDK会自动重连,不需要应用多次调用connect来保证连接性。(*自行处理)
  208 + */
  209 + CNLive_CONNECTION_EXIST = 34001,
  210 +
  211 + /*!
  212 + Connection正在连接
  213 +
  214 + @discussion
  215 + Connection正在连接,此时不能再次做connect操作,稍后再做操作(*自行处理)
  216 + */
  217 + CNLive_CONNECTION_CONNING = 34002,
  218 +
  219 + /*!
  220 + 开发者接口调用时传入的参数错误
  221 +
  222 + @discussion 请检查接口调用时传入的参数类型和值。(*自行处理)
  223 + */
  224 + CNLive_INVALID_ARGUMENT = -1000
  225 +};
  226 +
  227 +#pragma mark CNLiveChatErrorCode - 具体业务错误码
  228 +/*!
  229 + 具体业务错误码
  230 + */
  231 +typedef NS_ENUM(NSInteger, CNLiveChatErrorCode) {
  232 + /*!
  233 + 未知错误(预留)
  234 + */
  235 + CNLive_ERRORCODE_UNKNOWN = -1,
  236 +
  237 + /*!
  238 + token错误
  239 + */
  240 + CNLive_ERRORCODE_BY_TOKENERROR = 302,
  241 +
  242 + /*!
  243 + 鉴权失败 此AppId无权加入此targetId的聊天室
  244 + */
  245 + CNLive_ERRORCODE_BY_AUTHENTICATIONERROR = 303,
  246 +
  247 + /*!
  248 + 不合法的 targetId
  249 + */
  250 + CNLive_ERRORCODE_BY_TARGETIDERROR = 304,
  251 +
  252 + /*!
  253 + 不合法的 会话类型 type
  254 + */
  255 + CNLive_ERRORCODE_BY_CONVERSATIONTYPEERROR = 305,
  256 +
  257 + /*!
  258 + 已被对方加入黑名单
  259 + */
  260 + CNLive_REJECTED_BY_BLACKLIST = 405,
  261 +
  262 + /*!
  263 + 超时
  264 + */
  265 + CNLive_ERRORCODE_TIMEOUT = 5004,
  266 +
  267 + /*!
  268 + 发送消息频率过高,1秒钟最多只允许发送5条消息
  269 + */
  270 + CNLive_SEND_MSG_FREQUENCY_OVERRUN = 20604,
  271 +
  272 + /*!
  273 + 不在该聊天室中
  274 + */
  275 + CNLive_NOT_IN_CHATROOM = 23406,
  276 +
  277 + /*!
  278 + 在该聊天室中已被禁言
  279 + */
  280 + CNLive_FORBIDDEN_IN_CHATROOM = 23408,
  281 +
  282 + /*!
  283 + 已被踢出聊天室
  284 + */
  285 + CNLive_KICKED_FROM_CHATROOM = 23409,
  286 +
  287 + /*!
  288 + 聊天室不存在
  289 + */
  290 + CNLive_CHATROOM_NOT_EXIST = 23410,
  291 +
  292 + /*!
  293 + 聊天室成员超限
  294 + */
  295 + CNLive_CHATROOM_IS_FULL = 23411,
  296 +
  297 + /*!
  298 + 聊天室接口参数无效
  299 + */
  300 + CNLive_PARAMETER_INVALID_CHATROOM = 23412,
  301 +
  302 + /*!
  303 + 聊天室云存储业务未开通
  304 + */
  305 + CNLive_ROAMING_SERVICE_UNAVAILABLE_CHATROOM = 23414,
  306 +
  307 + /*!
  308 + 当前连接不可用(连接已经被释放)
  309 + */
  310 + CNLive_CHANNEL_INVALID = 30001,
  311 +
  312 + /*!
  313 + 当前连接不可用
  314 + */
  315 + CNLive_NETWORK_UNAVAILABLE = 30002,
  316 +
  317 + /*!
  318 + 消息响应超时
  319 + */
  320 + CNLive_MSG_RESPONSE_TIMEOUT = 30003,
  321 +
  322 + /*!
  323 + SDK没有初始化
  324 +
  325 + @discussion 在使用SDK任何功能之前,必须先Init。
  326 + */
  327 + CNLive_CLIENT_NOT_INIT = 33001,
  328 +
  329 + /*!
  330 + 数据库错误
  331 +
  332 + @discussion 请检查您使用的Token和userId是否正确。
  333 + */
  334 + CNLive_DATABASE_ERROR = 33002,
  335 +
  336 + /*!
  337 + 开发者接口调用时传入的参数错误
  338 +
  339 + @discussion 请检查接口调用时传入的参数类型和值。
  340 + */
  341 + CNLive_INVALID_PARAMETER = 33003,
  342 +
  343 + /*!
  344 + 历史消息云存储业务未开通
  345 + */
  346 + CNLive_MSG_ROAMING_SERVICE_UNAVAILABLE = 33007,
  347 +
  348 + /*!
  349 + 消息大小超限,消息体(序列化成json格式之后的内容)最大128k bytes。
  350 + */
  351 + CNLive_MSG_SIZE_OUT_OF_LIMIT = 30016
  352 +};
  353 +
  354 +#pragma mark - 会话相关
  355 +
  356 +#pragma mark CNLiveConversationType - 会话类型
  357 +/*!
  358 + 会话类型
  359 + */
  360 +typedef NS_ENUM(NSUInteger, CNLiveConversationType) {
  361 + /*!
  362 + 私聊
  363 + */
  364 + CNLive_ConversationType_PRIVATE = 1,
  365 +
  366 + /*!
  367 + 聊天室
  368 + */
  369 + CNLive_ConversationType_CHATROOM = 4,
  370 +};
  371 +
  372 +#pragma mark - 线上状态
  373 +
  374 +#pragma mark CNLiveConnectionStatus - 网络连接状态码
  375 +/*!
  376 + 网络连接状态码
  377 +
  378 + @discussion 开发者仅需要关注以下几种连接状态,其余状态SDK均会进行自动重连。
  379 + CNLive_ConnectionStatus_Connected, CNLive_ConnectionStatus_Connecting,
  380 + CNLive_ConnectionStatus_Unconnected,
  381 + CNLive_ConnectionStatus_SignUp, CNLive_ConnectionStatus_KICKED_OFFLINE_BY_OTHER_CLIENT,
  382 + CNLive_ConnectionStatus_TOKEN_INCORRECT
  383 + */
  384 +typedef NS_ENUM(NSInteger, CNLiveConnectionStatus) {
  385 + /*!
  386 + 未知状态
  387 +
  388 + @discussion 建立连接中出现异常的临时状态,SDK会做好自动重连,开发者无须处理。
  389 + */
  390 + CNLive_ConnectionStatus_UNKNOWN = -1,
  391 +
  392 + /*!
  393 + 连接成功
  394 + */
  395 + CNLive_ConnectionStatus_Connected = 0,
  396 +
  397 + /*!
  398 + 当前设备网络不可用
  399 +
  400 + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。
  401 + */
  402 + CNLive_ConnectionStatus_NETWORK_UNAVAILABLE = 1,
  403 +
  404 + /*!
  405 + 当前设备切换到飞行模式
  406 +
  407 + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。
  408 + */
  409 + CNLive_ConnectionStatus_AIRPLANE_MODE = 2,
  410 +
  411 + /*!
  412 + 当前设备切换到 2G(GPRS、EDGE)低速网络
  413 +
  414 + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。
  415 + */
  416 + CNLive_ConnectionStatus_Cellular_2G = 3,
  417 +
  418 + /*!
  419 + 当前设备切换到 3G 或 4G 高速网络
  420 +
  421 + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。
  422 + */
  423 + CNLive_ConnectionStatus_Cellular_3G_4G = 4,
  424 +
  425 + /*!
  426 + 当前设备切换到 WIFI 网络
  427 +
  428 + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。
  429 + */
  430 + CNLive_ConnectionStatus_WIFI = 5,
  431 +
  432 + /*!
  433 + 当前用户在其他设备上登录,此设备被踢下线
  434 + */
  435 + CNLive_ConnectionStatus_KICKED_OFFLINE_BY_OTHER_CLIENT = 6,
  436 +
  437 + /*!
  438 + 当前用户在 Web 端登录
  439 +
  440 + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。
  441 + */
  442 + CNLive_ConnectionStatus_LOGIN_ON_WEB = 7,
  443 +
  444 + /*!
  445 + 服务器异常
  446 +
  447 + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。
  448 + */
  449 + CNLive_ConnectionStatus_SERVER_INVALID = 8,
  450 +
  451 + /*!
  452 + 连接验证异常
  453 +
  454 + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。
  455 + */
  456 + CNLive_ConnectionStatus_VALIDATE_INVALID = 9,
  457 +
  458 + /*!
  459 + 连接中
  460 + */
  461 + CNLive_ConnectionStatus_Connecting = 10,
  462 +
  463 + /*!
  464 + 连接失败或未连接
  465 + */
  466 + CNLive_ConnectionStatus_Unconnected = 11,
  467 +
  468 + /*!
  469 + 已注销
  470 + */
  471 + CNLive_ConnectionStatus_SignUp = 12,
  472 +
  473 + /*!
  474 + Token无效
  475 +
  476 + @discussion
  477 + Token无效一般有两种原因。一是token错误,请您检查客户端初始化使用的AppKey和您服务器获取token使用的AppKey是否一致;二是token过期,是因为您在开发者后台设置了token过期时间,您需要请求您的服务器重新获取token并再次用新的token建立连接。
  478 + */
  479 + CNLive_ConnectionStatus_TOKEN_INCORRECT = 31004,
  480 +
  481 + /*!
  482 + 与服务器的连接已断开
  483 +
  484 + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。
  485 + */
  486 + CNLive_ConnectionStatus_DISCONN_EXCEPTION = 31011,
  487 +
  488 + /*!
  489 + 与服务器的连接已断开
  490 +
  491 + @discussion 无法自动重连,需手动重新连接服务器connectServerSuccess:error:。
  492 + */
  493 + CNLive_ConnectionStatus_DISCONN_MANUALCONN = 32011
  494 +};
  495 +
  496 +
... ...
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Headers/CNLiveChatUserInfo.h 0 → 100644
  1 +//
  2 +// CNLiveChatUserInfo.h
  3 +// CNLiveChatManager
  4 +//
  5 +// Created by cnliveJunBo on 17/3/1.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface CNLiveChatUserInfo : NSObject
  12 +
  13 +/*!
  14 + 用户ID(一旦以一个用户ID连接到服务器,就不能再修改用户ID了,如果修改也会被忽略)
  15 + */
  16 +@property(nonatomic, strong, readonly) NSString *userId;
  17 +
  18 +/*!
  19 + 用户名称
  20 + */
  21 +@property(nonatomic, strong) NSString *name;
  22 +
  23 +/*!
  24 + 用户头像的URL
  25 + */
  26 +@property(nonatomic, strong) NSString *portraitUri;
  27 +
  28 +/*!
  29 + 用户信息的初始化方法,
  30 +
  31 + @param userId 用户ID
  32 + @param username 用户名称
  33 + @param portrait 用户头像的URL
  34 + @return 用户信息对象
  35 + */
  36 +- (instancetype)initWithUserId:(NSString *)userId
  37 + name:(NSString *)username
  38 + portrait:(NSString *)portrait;
  39 +
  40 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Info.plist 0 → 100644
No preview for this file type
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Modules/module.modulemap 0 → 100644
  1 +framework module CNLiveChatManager {
  2 + umbrella header "CNLiveChatManager.h"
  3 +
  4 + export *
  5 + module * { export * }
  6 +}
... ...
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveMsgTools.framework/CNLiveMsgTools
No preview for this file type
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveMsgTools.framework/Headers/CNLiveMsgManager.h
... ... @@ -17,9 +17,8 @@
17 17 + (instancetype)sharedCNLiveMsgManager;
18 18  
19 19  
20   -- (void)setToolsInfoWithInfoId:(NSString *)infoId
21   - infoName:(NSString *)infoName
22   - infoUrl:(NSString *)infoUrl;
  20 +- (void)setToolsInfoWithInfoName:(NSString *)infoName
  21 + infoUrl:(NSString *)infoUrl;
23 22  
24 23  
25 24 - (NSDictionary *)getToolsInfo;
... ... @@ -72,8 +71,8 @@
72 71 - (void)sendCarrier:(NSString *)carrier
73 72 type:(NSInteger)type
74 73 targetId:(NSString *)targetId
75   - success:(void (^)(NSString *carrier, NSString *targetId, NSInteger type, NSString *infoId, NSString *infoName, NSString *infoUrl))successBlock
76   - error:(void (^)(NSInteger errors, NSString *targetId, NSInteger type))errorBlock;
  74 + success:(void (^)(NSString *carrier, NSString *messageId, NSString *targetId, NSInteger type, NSString *infoId, NSString *infoName, NSString *infoUrl, long long goTime, long long comeTime))successBlock
  75 + error:(void (^)(NSInteger errors, NSString *messageId, NSString *targetId))errorBlock;
77 76  
78 77  
79 78 - (NSInteger)getOnLineStatus;
... ...
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveMsgTools.framework/Info.plist
No preview for this file type
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/BottomToolView/BottomToolView.m
... ... @@ -31,12 +31,16 @@
31 31 #pragma mark - buttonClick
32 32 - (void)chatAction
33 33 {
34   -
  34 + if ([self.delegate respondsToSelector:@selector(bottomActionWithType:)]) {
  35 + [self.delegate bottomActionWithType:BtnClickTypeChat];
  36 + }
35 37 }
36 38  
37 39 - (void)privateChatAction
38 40 {
39   -
  41 + if ([self.delegate respondsToSelector:@selector(bottomActionWithType:)]) {
  42 + [self.delegate bottomActionWithType:BtnClickTypePriChat];
  43 + }
40 44 }
41 45  
42 46 - (void)giftAction
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/Barrage/CNBarrageManager.h 0 → 100644
  1 +//
  2 +// CNBarrageManager.h
  3 +// personalXmppChatDemo
  4 +//
  5 +// Created by 张旭 on 2016/12/10.
  6 +// Copyright © 2016年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@class CNBarrageView;
  12 +@class chatMsgModel;
  13 +@interface CNBarrageManager : NSObject
  14 +
  15 +@property (nonatomic, copy) void(^generateBarrageBlock)(CNBarrageView *view);//生成弹幕View回调
  16 +@property (nonatomic) BOOL isStopBarrage;//是否关闭了弹幕
  17 +/**
  18 + 开始弹幕根据新消息数组
  19 +
  20 + @param newBarrageArray 新消息数组
  21 + */
  22 +- (void)startBarrageWithNewArray:(NSMutableArray <chatMsgModel *>*)newBarrageArray;
  23 +
  24 +/**
  25 + 停止弹幕
  26 + */
  27 +- (void)stopBarrage;
  28 +
  29 +
  30 +
  31 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/Barrage/CNBarrageManager.m 0 → 100644
  1 +//
  2 +// CNBarrageManager.m
  3 +// personalXmppChatDemo
  4 +//
  5 +// Created by 张旭 on 2016/12/10.
  6 +// Copyright © 2016年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "CNBarrageManager.h"
  10 +#import "CNBarrageView.h"
  11 +#import "chatMsgModel.h"
  12 +
  13 +#define MAX_OVERLAP_COUNT 100
  14 +
  15 +@interface CNBarrageManager ()
  16 +
  17 +@property (nonatomic, strong) NSMutableArray *_Nullable allComments;//所有评论
  18 +@property (nonatomic, strong) NSMutableArray *_Nullable tmpComments;//临时评论
  19 +@property (nonatomic ,strong) NSMutableArray *_Nullable barrageQueue;//评论管理队列数组
  20 +@property (nonatomic ,strong) NSMutableArray *_Nullable trajectoryArr;//弹幕轨迹数组
  21 +
  22 +@property BOOL isStarted;//标记是否开始弹幕
  23 +@property BOOL isStopAnimation;//标记是否停止弹幕
  24 +
  25 +@end
  26 +
  27 +@implementation CNBarrageManager
  28 +
  29 +/**
  30 + 开始弹幕根据新消息数组
  31 +
  32 + @param newBarrageArray 新消息数组
  33 + */
  34 +- (void)startBarrageWithNewArray:(NSMutableArray <chatMsgModel *>*)newBarrageArray
  35 +{
  36 + if (self.isStopAnimation && _isStopBarrage) {
  37 + return;
  38 + }
  39 + [self.allComments addObjectsFromArray:newBarrageArray];
  40 +
  41 + [self startBarrage];
  42 +}
  43 +
  44 +/**
  45 + 开始弹幕
  46 + */
  47 +- (void)startBarrage
  48 +{
  49 + if (self.tmpComments.count == 0) {
  50 + [self.tmpComments addObjectsFromArray:self.allComments];
  51 + [self.allComments removeAllObjects];
  52 + }
  53 +
  54 + self.isStarted = YES;
  55 + self.isStopAnimation = NO;
  56 + [self initBarrageCommentView];
  57 +}
  58 +
  59 +/**
  60 + 停止弹幕
  61 + */
  62 +- (void)stopBarrage
  63 +{
  64 + self.isStopAnimation = YES;
  65 +
  66 + [self.barrageQueue enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
  67 + CNBarrageView *view = obj;
  68 + [view stopAnimation];
  69 + view = nil;
  70 + self.tmpComments = nil;
  71 + self.allComments = nil;
  72 + self.trajectoryArr = nil;
  73 + }];
  74 + self.barrageQueue = nil;
  75 +}
  76 +
  77 +/**
  78 + 初始化弹幕的评论View
  79 + */
  80 +- (void)initBarrageCommentView
  81 +{
  82 + if(self.isStopAnimation)return;
  83 + //初始化轨道位置随机
  84 + long count = self.tmpComments.count;
  85 + for (int i = 0; i < count; i ++) {
  86 + chatMsgModel *model = [self.tmpComments firstObject];
  87 + NSString *comment = model.content;
  88 + NSString *userName = model.name;
  89 + if (comment) {
  90 + [self.tmpComments removeObjectAtIndex:0];
  91 + //根据当前未发送弹幕数量生成轨迹
  92 + NSString *trajectory;
  93 + if (self.tmpComments.count > MAX_OVERLAP_COUNT)
  94 + {//数量较多轨迹可重叠
  95 + trajectory = [self trajectoryOverlap:YES];
  96 + }else
  97 + {//数量较少轨迹可能不重叠,但频率高会使轨迹数组已满,造成重叠
  98 + trajectory = [self trajectoryOverlap:NO];
  99 + }
  100 + [self createBarrageComment:comment userName:userName trajectory:trajectory isMine:model.isMine]; //trajectory:trajectory isMine:model.isMine];
  101 + }
  102 + else {
  103 + //当弹幕没有时跳出循环
  104 + break;
  105 + }
  106 + }
  107 +}
  108 +
  109 +/**
  110 + 生成评论弹幕轨迹
  111 +
  112 + @param isOverlap 是否重叠
  113 + @return 根据轨迹是否可重叠,生成对应的新轨迹
  114 + */
  115 +- (NSString *)trajectoryOverlap:(BOOL)isOverlap
  116 +{
  117 + NSString *trajectory = @"";
  118 + long arcIndex = arc4random() % MAX_BARRAGE_VERTICAL_COUNT;
  119 + CGFloat tra = arcIndex * BARRAGE_VERTICAL_HEIGHT + (arcIndex - 1) * BARRAGE_VERTICAL_MARGIN;
  120 +// NSLog(@"trajectory = %f ,%ld,%f,%ld,%f",tra,arcIndex,BARRAGE_VERTICAL_MARGIN,MAX_BARRAGE_VERTICAL_COUNT,BARRAGE_VERTICAL_MARGIN);
  121 + if (isOverlap) {
  122 + //生成可重叠的轨迹
  123 + trajectory = [NSString stringWithFormat:@"%f",tra];
  124 + [self.trajectoryArr addObject:trajectory];
  125 + return [NSString stringWithFormat:@"%f",tra];
  126 + }
  127 + //生成不重叠的轨迹
  128 + do {
  129 + arcIndex = arc4random() % MAX_BARRAGE_VERTICAL_COUNT;
  130 + tra = arcIndex * BARRAGE_VERTICAL_HEIGHT + (arcIndex - 1) * BARRAGE_VERTICAL_MARGIN;
  131 + trajectory = [NSString stringWithFormat:@"%f",tra];
  132 + if (self.trajectoryArr.count >= MAX_BARRAGE_VERTICAL_COUNT) break;
  133 +
  134 + } while ([self.trajectoryArr containsObject:trajectory]);
  135 + if (self.trajectoryArr.count >= MAX_BARRAGE_VERTICAL_COUNT)
  136 + {//当前轨迹数组已满,弹幕需要重叠显示
  137 +
  138 + }else
  139 + {//当前轨迹数组还没满,弹幕无需重叠
  140 + [self.trajectoryArr addObject:trajectory];
  141 + }
  142 + return trajectory;
  143 +}
  144 +
  145 +/**
  146 + 下一条评论
  147 +
  148 + @return 返回当前tmpComments的下一条评论数据
  149 + */
  150 +- (NSString *)nextComment {
  151 + chatMsgModel *model = [self.tmpComments firstObject];
  152 + if (model.content) {
  153 + [self.tmpComments removeObjectAtIndex:0];
  154 + }
  155 + return model.content;
  156 +}
  157 +
  158 +/**
  159 + 创建评论弹幕,根据评论内容和弹幕轨迹
  160 +
  161 + @param comment 评论内容
  162 + @param userName 用户名字
  163 + @param trajectory 弹幕轨迹
  164 + @param isMine 是否是我发的弹幕
  165 + */
  166 +- (void)createBarrageComment:(NSString *)comment userName:(NSString *)userName trajectory:(NSString *)trajectory isMine:(BOOL)isMine
  167 +{
  168 + if (self.isStopAnimation) {
  169 + return;
  170 + }
  171 + //创建一个弹幕view
  172 + CNBarrageView *view = [[CNBarrageView alloc] initWithContent:comment userName:userName isMine:isMine];
  173 +
  174 + //设置运行轨迹
  175 + view.trajectory = [trajectory floatValue];
  176 + weakself
  177 + __weak CNBarrageView *weakBarrageView = view;
  178 + view.moveBlock = ^(CommentMoveState status){
  179 + strongself
  180 + if (self.isStopAnimation) {
  181 + return;
  182 + }
  183 + switch (status) {
  184 + case CommentMoveStateStart:
  185 + {
  186 + //弹幕开始,将view加入弹幕管理数组
  187 + [self.barrageQueue addObject:weakBarrageView];
  188 + }
  189 + break;
  190 + case CommentMoveStateEnter:
  191 + {
  192 + [self.trajectoryArr removeObject:trajectory];
  193 + //弹幕完全进入屏幕,判断接下来是否还有内容,如果有则在该弹幕轨迹队列中创建弹幕
  194 + NSString *comment = [self nextComment];
  195 + if (comment) {
  196 + [self createBarrageComment:comment userName:userName trajectory:trajectory isMine:isMine];
  197 +// [self createBarrageComment:comment trajectory:trajectory isMine:isMine];
  198 + }
  199 + else {
  200 + //没有评论了
  201 + }
  202 + }
  203 + break;
  204 + case CommentMoveStateEnd:
  205 + {
  206 + //弹幕飞出屏幕后从弹幕管理队列中删除
  207 + if ([self.barrageQueue containsObject:weakBarrageView]) {
  208 + [self.barrageQueue removeObject:weakBarrageView];
  209 + }
  210 + }
  211 + break;
  212 + default:
  213 + break;
  214 + }
  215 + };
  216 + //弹幕生成后,传到Controller进行页面展示
  217 + if (self.generateBarrageBlock) {
  218 + self.generateBarrageBlock(view);
  219 + }
  220 +}
  221 +
  222 +#pragma mark - getter
  223 +
  224 +- (NSMutableArray *)allComments {
  225 + if (!_allComments) {
  226 + _allComments = [NSMutableArray array];
  227 + }
  228 + return _allComments;
  229 +}
  230 +
  231 +- (NSMutableArray *)tmpComments {
  232 + if (!_tmpComments) {
  233 + _tmpComments = [NSMutableArray array];
  234 + }
  235 + return _tmpComments;
  236 +}
  237 +
  238 +- (NSMutableArray *)barrageQueue {
  239 + if (!_barrageQueue) {
  240 + _barrageQueue = [NSMutableArray array];
  241 + }
  242 + return _barrageQueue;
  243 +}
  244 +
  245 +- (NSMutableArray *)trajectoryArr {
  246 + if (!_trajectoryArr) {
  247 + _trajectoryArr = [NSMutableArray array];
  248 + }
  249 + return _trajectoryArr;
  250 +}
  251 +
  252 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/Barrage/CNBarrageView.h 0 → 100644
  1 +//
  2 +// CNBarrageView.h
  3 +// personalXmppChatDemo
  4 +//
  5 +// Created by 张旭 on 2016/12/10.
  6 +// Copyright © 2016年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +#define BARRAGE_VERTICAL_HEIGHT 25.f //每个弹幕View在垂直方向上的高度
  12 +#define MAX_BARRAGE_VERTICAL_COUNT (long)([UIScreen mainScreen].bounds.size.height * 1.0/BARRAGE_VERTICAL_HEIGHT) //垂直方向上的弹幕最大数量
  13 +#define BARRAGE_VERTICAL_MARGIN ([UIScreen mainScreen].bounds.size.height - BARRAGE_VERTICAL_HEIGHT * MAX_BARRAGE_VERTICAL_COUNT) * 1.0 / (MAX_BARRAGE_VERTICAL_COUNT - 1) //垂直方向上弹幕之间的间隙
  14 +
  15 +typedef NS_ENUM(NSInteger, CommentMoveState){//弹幕移动的状态
  16 + CommentMoveStateStart = 0,//将要进入屏幕
  17 + CommentMoveStateEnter ,//完全进入
  18 + CommentMoveStateEnd //完全移除屏幕
  19 +};
  20 +
  21 +
  22 +@interface CNBarrageView : UIView
  23 +
  24 +@property (nonatomic ,copy) void (^moveBlock) (CommentMoveState state);//弹幕移动的状态
  25 +@property (nonatomic) CGFloat trajectory;//弹幕的移动轨迹
  26 +
  27 +/**
  28 + 初始化弹幕View根据评论内容,消息是否是自己发送
  29 +
  30 + @param content 评论内容
  31 + @param userName 用户名字
  32 + @param isMine 是否是自己的评论弹幕
  33 + @return 弹幕View
  34 + */
  35 +- (instancetype)initWithContent:(NSString *)content userName:(NSString *)userName isMine:(BOOL)isMine;
  36 +
  37 +/**
  38 + 开始移动动画
  39 + */
  40 +- (void)startAnimation;
  41 +
  42 +/**
  43 + 停止移动动画
  44 + */
  45 +- (void)stopAnimation;
  46 +
  47 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/Barrage/CNBarrageView.m 0 → 100644
  1 +
  2 +//
  3 +// CNBarrageView.m
  4 +// personalXmppChatDemo
  5 +//
  6 +// Created by 张旭 on 2016/12/10.
  7 +// Copyright © 2016年 cnlive. All rights reserved.
  8 +//
  9 +
  10 +#import "CNBarrageView.h"
  11 +
  12 +#define TotalDuration 5 //弹幕飘过总时间
  13 +#define BARRAGE_Horizontal_Margin 5 //弹幕间水平间隙
  14 +
  15 +@interface CNBarrageView ()
  16 +
  17 +@property (nonatomic ,strong) UILabel * _Nullable commentLabel;//评论Label
  18 +@property BOOL isDealloc;//标记资源是否已释放
  19 +
  20 +@end
  21 +
  22 +@implementation CNBarrageView
  23 +
  24 +/**
  25 + 销毁对象及动画
  26 + */
  27 +- (void)dealloc
  28 +{
  29 + [self stopAnimation];
  30 + self.moveBlock = nil;
  31 +}
  32 +
  33 +/**
  34 + 初始化弹幕View根据评论内容,消息是否是自己发送
  35 +
  36 + @param content 评论内容
  37 + @param userName 用户名字
  38 + @param isMine 是否是自己的评论弹幕
  39 + @return 弹幕View
  40 + */
  41 +- (instancetype)initWithContent:(NSString *)content userName:(NSString *)userName isMine:(BOOL)isMine
  42 +{
  43 + if (self = [super init])
  44 + {
  45 + content = [NSString stringWithFormat:@"%@:%@",userName,content];
  46 + NSDictionary *attributes = @{NSFontAttributeName:[UIFont systemFontOfSize:14]};
  47 + float width = [content sizeWithAttributes:attributes].width;
  48 +// float height = [content sizeWithAttributes:attributes].height;//16.707031
  49 + self.bounds = CGRectMake(0, 0, width + BARRAGE_Horizontal_Margin * 2, BARRAGE_VERTICAL_HEIGHT);
  50 + self.commentLabel.text = content;
  51 + self.commentLabel.frame = CGRectMake(BARRAGE_Horizontal_Margin, 0, width, BARRAGE_VERTICAL_HEIGHT);
  52 + if(isMine)
  53 + {
  54 + self.commentLabel.textColor = [UIColor redColor];
  55 + }else
  56 + {
  57 + self.commentLabel.textColor = [UIColor lightGrayColor];
  58 + }
  59 +
  60 + }
  61 + return self;
  62 +}
  63 +
  64 +/**
  65 + 开始移动动画
  66 + */
  67 +- (void)startAnimation
  68 +{
  69 + CGFloat wholeWidth = self.width + SCREEN_WIDTH + 50;//总轨迹长度
  70 + CGFloat speed = wholeWidth / TotalDuration;//速度
  71 + CGFloat duration = (self.width + 50) / speed;//完全进入屏幕的时间
  72 +
  73 + if (self.moveBlock) {
  74 + //弹幕开始进入屏幕
  75 + self.moveBlock(CommentMoveStateStart);
  76 + }
  77 +
  78 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(duration * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  79 + //避免重复,若资源已释放 不再操作
  80 + if (self.isDealloc) {
  81 + return;
  82 + }
  83 + //duration时间后弹幕完全进入屏幕
  84 + if (self.moveBlock) {
  85 + self.moveBlock(CommentMoveStateEnter);
  86 + }
  87 + });
  88 +
  89 + weakself
  90 + //弹幕完全离开屏幕
  91 + [UIView animateWithDuration:TotalDuration delay:0 options:UIViewAnimationOptionCurveLinear animations:^{
  92 + strongself
  93 + self.left = - self.width;
  94 + } completion:^(BOOL finished) {
  95 + if (self.moveBlock) {
  96 + self.moveBlock(CommentMoveStateEnd);
  97 + }
  98 + [self removeFromSuperview];
  99 + }];
  100 +
  101 +}
  102 +
  103 +/**
  104 + 停止移动动画
  105 + */
  106 +- (void)stopAnimation
  107 +{
  108 + self.isDealloc = YES;
  109 + [self.layer removeAllAnimations];
  110 + [self removeFromSuperview];
  111 +}
  112 +
  113 +#pragma mark getter
  114 +
  115 +- (UILabel *)commentLabel
  116 +{
  117 + if (!_commentLabel) {
  118 + _commentLabel = [[UILabel alloc] init];
  119 + _commentLabel.backgroundColor = [UIColor clearColor];
  120 + _commentLabel.font = [UIFont systemFontOfSize:14.f];
  121 + _commentLabel.textColor = [UIColor lightGrayColor];
  122 + [self addSubview:self.commentLabel];
  123 + }
  124 + return _commentLabel;
  125 +}
  126 +
  127 +/*
  128 +// Only override drawRect: if you perform custom drawing.
  129 +// An empty implementation adversely affects performance during animation.
  130 +- (void)drawRect:(CGRect)rect {
  131 + // Drawing code
  132 +}
  133 +*/
  134 +
  135 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/ChatMsgModel/chatMsgModel.h 0 → 100644
  1 +//
  2 +// chatMsgModel.h
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by 张旭 on 2017/3/20.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "BaseModel.h"
  10 +
  11 +@interface chatMsgModel : BaseModel
  12 +
  13 +@property (nonatomic ,copy ) NSString * _Nullable icon;//头像
  14 +@property (nonatomic ,copy ) NSString * _Nullable name;//姓名
  15 +@property (nonatomic ,copy ) NSString * _Nullable content;//内容
  16 +
  17 +@property (nonatomic ,assign) CGFloat cellWidth;//内容宽度
  18 +@property (nonatomic ,assign) CGFloat cellHeight;//内容高度
  19 +
  20 +@property (nonatomic) BOOL isMine;//消息是否是自己发送
  21 +
  22 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/ChatMsgModel/chatMsgModel.m 0 → 100644
  1 +//
  2 +// chatMsgModel.m
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by 张旭 on 2017/3/20.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "chatMsgModel.h"
  10 +
  11 +#define ChatCellMargin 10
  12 +
  13 +@implementation chatMsgModel
  14 +
  15 +- (CGFloat)cellHeight
  16 +{
  17 + //如果计算过高度,直接返回
  18 + if (_cellHeight) return _cellHeight;
  19 +
  20 + //头像
  21 + _cellHeight = 40;
  22 + //文字
  23 + CGFloat textMaxW = self.cellWidth - 2 * ChatCellMargin;
  24 + CGSize textMaxSize = CGSizeMake(textMaxW, MAXFLOAT);
  25 + CGSize textSize = [self.content boundingRectWithSize:textMaxSize options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:16]} context:nil].size;
  26 +
  27 + //底部空隙
  28 + _cellHeight += textSize.height + ChatCellMargin;
  29 + // NSLog(@"cellHeight = %f",_cellHeight);
  30 + return _cellHeight;
  31 +}
  32 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/ChatViews/chatListCell.h 0 → 100644
  1 +//
  2 +// chatListCell.h
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by 张旭 on 2017/3/20.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "BaseTableViewCell.h"
  10 +@class chatMsgModel;
  11 +@interface chatListCell : BaseTableViewCell
  12 +
  13 +- (void)loadUIWithModel:(chatMsgModel *)model;
  14 +
  15 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/ChatViews/chatListCell.m 0 → 100644
  1 +//
  2 +// chatListCell.m
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by 张旭 on 2017/3/20.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "chatListCell.h"
  10 +#import "chatMsgModel.h"
  11 +@interface chatListCell ()
  12 +
  13 +@property (nonatomic ,strong) UIImageView * _Nullable iconImageView;//头像图片
  14 +@property (nonatomic ,strong) UILabel * _Nullable nameLabel;//名字
  15 +@property (nonatomic ,strong) UILabel * _Nullable contentLabel;//内容
  16 +@property (nonatomic ,strong) UIImageView * _Nullable lineImageView;//分割线
  17 +
  18 +@property (nonatomic ,strong) chatMsgModel * _Nullable model;
  19 +
  20 +@end
  21 +
  22 +@implementation chatListCell
  23 +
  24 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  25 +{
  26 + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  27 + if (self) {
  28 + self.backgroundColor = [UIColor clearColor];
  29 + self.selectionStyle = UITableViewCellSelectionStyleNone;
  30 + }
  31 + return self;
  32 +}
  33 +
  34 +- (void)loadUIWithModel:(chatMsgModel *)model
  35 +{
  36 + model.cellWidth = self.width;
  37 + _model = model;
  38 +
  39 + [self bindView];//更新cell高度后再初始化UI
  40 + [self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.icon] placeholderImage:nil];
  41 + // self.iconImageView.backgroundColor = [UIColor greenColor];
  42 + self.nameLabel.text = [NSString stringWithFormat:@"%@:",model.name];
  43 + CGSize labelSize = [self.nameLabel labelSize];
  44 + self.nameLabel.frame = CGRectMake(self.iconImageView.right + 10, self.iconImageView.top, labelSize.width, labelSize.height);
  45 + self.nameLabel.centerY = self.iconImageView.centerY;
  46 + self.contentLabel.text = model.content;
  47 + CGSize contentLabelSize = [self.contentLabel labelSizeWithWidth:self.width - 2 * self.iconImageView.left];
  48 + self.contentLabel.frame = CGRectMake(self.iconImageView.left, self.iconImageView.bottom + 10, contentLabelSize.width, contentLabelSize.height);
  49 +
  50 + self.lineImageView.frame = CGRectMake(self.iconImageView.left, self.contentLabel.bottom + 5, self.width - self.iconImageView.left * 2, 1);
  51 +}
  52 +
  53 +- (void)bindView
  54 +{
  55 + self.iconImageView.frame = CGRectMake(10, 10, 30, 30);
  56 + self.nameLabel.frame = CGRectMake(self.iconImageView.right + 10, self.iconImageView.top, self.width - self.iconImageView.right - 20, 25);
  57 + self.nameLabel.centerY = self.iconImageView.centerY;
  58 + self.contentLabel.frame = CGRectMake(self.iconImageView.left, self.iconImageView.bottom + 10, self.width - 2 * self.iconImageView.left, 25);
  59 +}
  60 +
  61 +#pragma mark - getter
  62 +- (UILabel * _Nullable)nameLabel
  63 +{
  64 + if (!_nameLabel)
  65 + {
  66 + _nameLabel = [[UILabel alloc] init];
  67 + _nameLabel.textAlignment = NSTextAlignmentLeft;
  68 + _nameLabel.textColor = [UIColor redColor];
  69 + _nameLabel.font = [UIFont systemFontOfSize:15.f];
  70 + [self addSubview:_nameLabel];
  71 + }
  72 + return _nameLabel;
  73 +}
  74 +
  75 +- (UILabel * _Nullable)contentLabel
  76 +{
  77 + if (!_contentLabel)
  78 + {
  79 + _contentLabel = [[UILabel alloc] init];
  80 + _contentLabel.textAlignment = NSTextAlignmentLeft;
  81 + _contentLabel.textColor = [UIColor lightGrayColor];
  82 + _contentLabel.numberOfLines = 0;
  83 + _contentLabel.font = [UIFont systemFontOfSize:12.f];
  84 + [self addSubview:_contentLabel];
  85 + }
  86 + return _contentLabel;
  87 +}
  88 +
  89 +- (UIImageView * _Nullable)iconImageView
  90 +{
  91 + if (!_iconImageView)
  92 + {
  93 + _iconImageView = [[UIImageView alloc] init];
  94 + _iconImageView.layer.masksToBounds = YES;
  95 + _iconImageView.layer.cornerRadius = 15.f;
  96 + [self addSubview:_iconImageView];
  97 + }
  98 + return _iconImageView;
  99 +}
  100 +
  101 +- (UIImageView * _Nullable)lineImageView
  102 +{
  103 + if (!_lineImageView)
  104 + {
  105 + _lineImageView = [[UIImageView alloc] init];
  106 + _lineImageView.image = [UIImage imageNamed:@"分割线(聊天复用)"];
  107 + [self addSubview:_lineImageView];
  108 + }
  109 + return _lineImageView;
  110 +}
  111 +
  112 +
  113 +/*
  114 +// Only override drawRect: if you perform custom drawing.
  115 +// An empty implementation adversely affects performance during animation.
  116 +- (void)drawRect:(CGRect)rect {
  117 + // Drawing code
  118 +}
  119 +*/
  120 +
  121 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/AnimQueueManager.m
... ... @@ -57,20 +57,21 @@
57 57 @param model modelobj
58 58 */
59 59 - (void)addAnimationWithModel:(GiftModel *)model animContentView:(UIView *)animContentView{
60   -
  60 +
  61 + GiftAnimOperation *op = [GiftAnimOperation addGiftAnimOperationWithGiftModel:model animContentView:animContentView];
61 62 switch (model.giftStyle) {
62 63 case GiftStylePorsch:
63 64 {
64   - GiftAnimOperation *op = [GiftAnimOperation addGiftAnimOperationWithGiftModel:model animContentView:animContentView];
65 65 [self.expenAnimationQueue addOperation:op];
66 66 }
67 67 break;
68   -// case GiftStyleFighter:
69   -// [self.expenAnimationQueue addOperation:op];
70   -// break;
  68 + case GiftStyleFighter:
  69 + {
  70 + [self.expenAnimationQueue addOperation:op];
  71 + }
  72 + break;
71 73 case GiftStylePlane:
72 74 {
73   - GiftAnimOperation *op = [GiftAnimOperation addGiftAnimOperationWithGiftModel:model animContentView:animContentView];
74 75 [self.expenAnimationQueue addOperation:op];
75 76 }
76 77 break;
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftAnimOperation.m
... ... @@ -11,8 +11,8 @@
11 11 #import "NHCarViews.h"
12 12 #import "NHPlaneViews.h"
13 13 #import "GiftAnimationAction.h"
14   -//#import "NHFighterView.h"
15   -//#import "NHFighterView+animDelegagte.h"
  14 +#import "NHFighterView.h"
  15 +#import "NHFighterView+animDelegagte.h"
16 16  
17 17 @interface GiftAnimOperation ()
18 18 {
... ... @@ -21,7 +21,7 @@
21 21 }
22 22  
23 23 @property (nonatomic, strong)NHCarViews *giftCarView; //跑车动画
24   -//@property (nonatomic, strong)NHFighterView *giftFighterView; //歼灭机动画
  24 +@property (nonatomic, strong)NHFighterView *giftFighterView; //歼灭机动画
25 25 @property (nonatomic, strong)NHPlaneViews *giftPlaneView; //客机动画
26 26 @property (nonatomic, strong)GiftModel *model; //model
27 27 @property (nonatomic,strong) UIView *animContentView; //需要显示动画的view
... ... @@ -72,9 +72,9 @@
72 72 case GiftStylePorsch:
73 73 [self porschAnimation];
74 74 break;
75   -// case GiftStyleFighter:
76   -// [self fighterAnimation];
77   -// break;
  75 + case GiftStyleFighter:
  76 + [self fighterAnimation];
  77 + break;
78 78 case GiftStylePlane:
79 79 [self planeAnimation];
80 80 break;
... ... @@ -105,24 +105,25 @@
105 105 });
106 106 }
107 107  
108   -//- (void)fighterAnimation
109   -//{
110   -// weakself
111   -// dispatch_async(dispatch_get_main_queue(), ^{
112   -// strongself
113   -//
114   -// [self.giftFighterView addAnimationsMoveToPoint:CGPointMake(SCREEN_WIDTH, 60) endPoint:CGPointMake( -500, 600)];
115   -// [self.animContentView addSubview:self.giftFighterView];
116   -// [self.giftFighterView startFighterAnimationWithCompletion:^{
117   -// [self willChangeValueForKey:@"isFinished"];
118   -//
119   -// _finished = YES;
120   -//
121   -// [self didChangeValueForKey:@"isFinished"];
122   -// }];
123   -//
124   -// });
125   -//}
  108 +- (void)fighterAnimation
  109 +{
  110 + weakself
  111 + dispatch_async(dispatch_get_main_queue(), ^{
  112 + strongself
  113 +
  114 + [self.giftFighterView addAnimationsMoveToPoint:CGPointMake(SCREEN_WIDTH, 60) endPoint:CGPointMake( -500, 600)];
  115 + [self.animContentView addSubview:self.giftFighterView];
  116 +
  117 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(12 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  118 + [self willChangeValueForKey:@"isFinished"];
  119 +
  120 + _finished = YES;
  121 +
  122 + [self didChangeValueForKey:@"isFinished"];
  123 +
  124 + });
  125 + });
  126 +}
126 127  
127 128 - (void)planeAnimation
128 129 {
... ... @@ -169,12 +170,12 @@
169 170  
170 171 @return 连击view
171 172 */
172   -//- (NHFighterView *)giftFighterView{
173   -// if (_giftFighterView == nil) {
174   -// _giftFighterView = [NHFighterView loadFighterViewWithPoint:CGPointMake(10, 100)];
175   -// }
176   -// return _giftFighterView;
177   -//}
  173 +- (NHFighterView *)giftFighterView{
  174 + if (_giftFighterView == nil) {
  175 + _giftFighterView = [NHFighterView loadFighterViewWithPoint:CGPointMake(10, 100)];
  176 + }
  177 + return _giftFighterView;
  178 +}
178 179  
179 180 /**
180 181 客机动画
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftAnimationAction.h
... ... @@ -23,11 +23,6 @@ typedef void(^giftAnimationCompletion)();
23 23 - (void)startPorschAnimationWithCompletion:(giftAnimationCompletion)Completion;
24 24  
25 25 /**
26   - 歼灭机动画
27   - */
28   -//- (void)startFighterAnimationWithCompletion:(giftAnimationCompletion)Completion;
29   -
30   -/**
31 26 客机动画
32 27 */
33 28 - (void)startPlaneAnimationWithCompletion:(giftAnimationCompletion)Completion;
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftAnimationAction.m
... ... @@ -11,45 +11,6 @@
11 11 @implementation GiftAnimationAction
12 12  
13 13 /**
14   - 连击横屏动画
15   - */
16   -- (void)startComboAnimationWithCompletion:(giftAnimationCompletion)Completion{
17   - _giftAnimationCompletion = Completion;
18   - [self animationWithDuration:4
19   - YValues:@[@(0 - self.width), @(115), @(110), @(110), @(0 - self.width)]
20   - keyTimes:@[@0.0, @0.2, @0.3, @0.8, @1.0]
21   - timingFunctions:@[
22   - [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseOut],
23   - [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault],
24   - [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault],
25   - [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]
26   - ]
27   - addView:self];
28   -}
29   -
30   -/**
31   - 位移动画具体实现
32   -
33   - @param duration 动画持续时间
34   - @param YValues 动画帧数组
35   - @param keyTimes 动画帧时间
36   - @param timingFunctions 动画方式数组
37   - @param addView 需要添加的view
38   - */
39   -- (void)animationWithDuration:(float)duration YValues:(NSArray *)YValues keyTimes:(NSArray *)keyTimes timingFunctions:(NSArray *)timingFunctions addView:(UIView *)addView{
40   - CAKeyframeAnimation *rocketAnim = [CAKeyframeAnimation animation];
41   - rocketAnim.keyPath = @"position.x";
42   - rocketAnim.values = YValues;
43   - rocketAnim.keyTimes = keyTimes;
44   - rocketAnim.timingFunctions = timingFunctions;
45   - rocketAnim.duration = duration;
46   - rocketAnim.fillMode = kCAFillModeForwards;
47   - rocketAnim.removedOnCompletion = NO;
48   - rocketAnim.delegate = self;
49   - [addView.layer addAnimation:rocketAnim forKey:@"positionY"];
50   -}
51   -
52   -/**
53 14 跑车动画
54 15 */
55 16 - (void)startPorschAnimationWithCompletion:(giftAnimationCompletion)Completion
... ... @@ -58,14 +19,6 @@
58 19 }
59 20  
60 21 /**
61   - 歼灭机动画
62   - */
63   -//- (void)startFighterAnimationWithCompletion:(giftAnimationCompletion)Completion
64   -//{
65   -// _giftAnimationCompletion = Completion;
66   -//}
67   -
68   -/**
69 22 客机动画
70 23 */
71 24 - (void)startPlaneAnimationWithCompletion:(giftAnimationCompletion)Completion
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftModel/GiftModel.h
... ... @@ -11,7 +11,7 @@
11 11 typedef NS_ENUM(NSInteger, GiftStyle) {//礼物类型
12 12 GiftStyleCombo = 1,//普通可连击礼物
13 13 GiftStylePorsch ,//豪华跑车礼物
14   -// GiftStyleFighter ,//豪华歼灭机礼物
  14 + GiftStyleFighter ,//豪华歼灭机礼物
15 15 GiftStylePlane ,//豪华客机礼物
16 16 };
17 17  
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftResource/NHFighterView+animDelegagte.m
... ... @@ -7,6 +7,7 @@
7 7 //
8 8  
9 9 #import "NHFighterView+animDelegagte.h"
  10 +#import "GiftAnimationAction.h"
10 11  
11 12 @implementation NHFighterView (animDelegagte)
12 13  
... ... @@ -17,7 +18,8 @@
17 18  
18 19 - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag
19 20 {
20   - _giftAnimationCompletion(-1);
  21 +// _giftAnimationCompletion();
  22 +
21 23 NSLog(@"did stop");
22 24 }
23 25  
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftResource/NHFighterView.h
... ... @@ -7,9 +7,8 @@
7 7 //
8 8  
9 9 #import <UIKit/UIKit.h>
10   -#import "GiftAnimationAction.h"
11 10  
12   -@interface NHFighterView :GiftAnimationAction
  11 +@interface NHFighterView :UIView
13 12  
14 13 /**
15 14 * 需要几个控制点就设置几个:
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftViews/GiftListView.m
... ... @@ -10,13 +10,20 @@
10 10 #import "GiftModel.h"
11 11 #import "LiveBaseView.h"
12 12 #import "AnimQueueManager.h"
  13 +#import "GiftPayButton.h"
13 14  
14 15 #define MAX_LINE_COUNT 4
15 16 #define MAX_ROW_COUNT 2
16 17  
  18 +#define GiftPayViewHeight 50
  19 +
17 20 @interface GiftListView ()
18 21  
19 22 @property (nonatomic ,strong) NSArray <GiftModel *>* _Nullable giftArray;
  23 +@property (nonatomic ,strong) NSArray <NSString *>* _Nullable images;
  24 +@property (nonatomic ,strong) NSArray <NSString *>* _Nullable giftNames;
  25 +@property (nonatomic ,strong) NSArray <NSString *>* _Nullable prices;
  26 +@property (nonatomic ,strong) NSArray <NSString *>* _Nullable types;
20 27 @property (nonatomic ,weak ) LiveBaseView * _Nullable liveBaseView;
21 28 @property (nonatomic, strong) AnimQueueManager * animQueueManager;
22 29 @property (nonatomic ,strong) GiftModel * _Nullable model;
... ... @@ -28,17 +35,22 @@
28 35 - (instancetype)initWithFrame:(CGRect)frame liveBaseView:(LiveBaseView *_Nullable)liveBaseView
29 36 {
30 37 if (self = [super initWithFrame:frame]) {
  38 +
  39 + _images = [NSArray arrayWithObjects:@"porsch_small80",@"fighter_small80",@"plane_small80",@"love_gift",@"beer",@"chicken",@"cucumber",@"flower",@"hug",@"mouth",@"ring",@"rose",@"sticks",nil];
  40 + _giftNames = [NSArray arrayWithObjects:@"跑车",@"歼灭机",@"飞机",@"大大的爱心",@"啤酒",@"小鸡",@"小黄瓜",@"鲜花",@"抱抱",@"亲吻",@"戒指",@"玫瑰花",@"荧光棒",nil];
  41 + _prices = [NSArray arrayWithObjects:@"300000000",@"300000000",@"300000",@"30",@"30",@"3",@"3",@"1",@"3",@"1",@"3",@"30",@"300", nil];
  42 + _types = [NSArray arrayWithObjects:@2,@3,@4,@1,@1,@1,@1,@1,@1,@1,@1,@1,@1, nil];
  43 +
31 44 self.liveBaseView = liveBaseView;
32 45 self.animQueueManager = [AnimQueueManager sharedAnimQueueManager];
33 46  
34   - UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.width, self.height - 30)];
35   - scrollView.contentSize = CGSizeMake(self.width *(self.giftArray.count/(MAX_ROW_COUNT*MAX_LINE_COUNT) + 1), self.height - 30);
  47 + UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, self.width, self.height - GiftPayViewHeight)];
  48 + scrollView.contentSize = CGSizeMake(self.width *(self.giftArray.count/(MAX_ROW_COUNT*MAX_LINE_COUNT) + 1), self.height - GiftPayViewHeight);
36 49 scrollView.pagingEnabled = YES;
37 50 scrollView.bounces = NO;
38 51 scrollView.showsVerticalScrollIndicator = NO;
39 52 scrollView.showsHorizontalScrollIndicator = NO;
40 53 [self addSubview:scrollView];
41   - scrollView.backgroundColor = ZXRandomColor;
42 54  
43 55 int line = 0;
44 56 int row = 0;
... ... @@ -56,40 +68,65 @@
56 68 }
57 69 row = i % MAX_LINE_COUNT;
58 70 CGFloat giftWidth = self.width / MAX_LINE_COUNT * 1.0;
59   - CGFloat giftHeight = (self.height - 30) / MAX_ROW_COUNT * 1.0;
  71 + CGFloat giftHeight = (self.height - GiftPayViewHeight) / MAX_ROW_COUNT * 1.0;
60 72 giftX = row * giftWidth + page * scrollView.width;
61 73 giftY = line * giftHeight;
62 74  
63 75 UIView *giftView = [self giftViewWithFrame:CGRectMake(giftX, giftY, giftWidth, giftHeight) model:self.giftArray[i]];
  76 + giftView.backgroundColor = [UIColor clearColor];
64 77  
65 78 //礼物图片
66 79 UIImageView *picImg = [[UIImageView alloc] initWithImage:[UIImage imageNamed:self.giftArray[i].giftImageName]];
67 80 picImg.centerX = giftView.width * 0.5;
68 81 picImg.centerY = giftView.height * 0.5;
69 82 [giftView addSubview:picImg];
70   -
71 83 [scrollView addSubview:giftView];
72 84  
73 85 UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gestureClick:)];
74 86 giftView.tag = i + 10;
75 87 [giftView addGestureRecognizer:gesture];
76 88 }
  89 + UIImageView *giftBottomView = [[UIImageView alloc] initWithFrame:CGRectMake(0, self.height - GiftPayViewHeight, self.width, GiftPayViewHeight)];
  90 + giftBottomView.image = [UIImage imageNamed:@"背景400x30"];
  91 + giftBottomView.alpha = 0.4;
  92 + [self addSubview:giftBottomView];
  93 +
  94 + GiftPayButton *payBtn = [[GiftPayButton alloc] initWithFrame:CGRectMake(10, self.height - GiftPayViewHeight, 80, GiftPayViewHeight)];
  95 + [payBtn addTarget:self action:@selector(payClick) forControlEvents:UIControlEventTouchUpInside];
  96 + [self addSubview:payBtn];
  97 +
  98 + UIButton *sendBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.width - 70, self.height - GiftPayViewHeight + (GiftPayViewHeight - 30)*0.5, 60, 30)];
  99 + [sendBtn addTarget:self action:@selector(sendClick) forControlEvents:UIControlEventTouchUpInside];
  100 + [sendBtn setTitle:@"发送" forState:UIControlStateNormal];
  101 + [sendBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal
  102 + ];
  103 + [sendBtn setBackgroundColor:[UIColor orangeColor]];
  104 + sendBtn.layer.cornerRadius = sendBtn.height * 0.5;
  105 + sendBtn.layer.masksToBounds = YES;
  106 + [self addSubview:sendBtn];
77 107 }
78 108 return self;
79 109 }
80 110  
  111 +- (void)sendClick
  112 +{
  113 + NSLog(@"sendClick");
  114 +}
  115 +
  116 +- (void)payClick
  117 +{
  118 + NSLog(@"payClick");
  119 +}
  120 +
81 121 - (UIView *)giftViewWithFrame:(CGRect)frame model:(GiftModel *)model
82 122 {
83 123 _model = model;
84 124 UIView *giftView = [[UIView alloc] initWithFrame:frame];
85 125 if (model.giftStyle == GiftStyleCombo)
86   - {
  126 + {//右上角连击标识
87 127 UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(giftView.width - 17, 3, 15, 15)];
88   - imageView.backgroundColor = ZXRandomColor;
89   - [giftView addSubview:imageView];//右上角连击标识
90   - }else
91   - {
92   -
  128 + imageView.image = [UIImage imageNamed:@"continuous"];
  129 + [giftView addSubview:imageView];
93 130 }
94 131 //礼物价格lbl
95 132 UILabel *priceLbl = [[UILabel alloc] initWithFrame:CGRectMake(0, giftView.height - 15, 40, 14)];
... ... @@ -101,7 +138,7 @@
101 138 priceLbl.centerX = giftView.width * 0.5 - 4;
102 139 [giftView addSubview:priceLbl];
103 140 //礼物价格图标
104   - UIImageView *image = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"littleHeart2"]];
  141 + UIImageView *image = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"diamond"]];
105 142 image.left = priceLbl.right + 3;
106 143 image.centerY = priceLbl.centerY;
107 144 [giftView addSubview:image];
... ... @@ -125,41 +162,53 @@
125 162 }
126 163 }
127 164  
  165 +- (NSString *)giftNameWithImageName:(NSString *)imageName
  166 +{
  167 + NSString *giftName = @"";
  168 +
  169 + if ([_images containsObject:imageName]) {
  170 + NSInteger index = [_images indexOfObject:imageName];
  171 + giftName = [_giftNames objectAtIndex:index];
  172 + }
  173 +
  174 + return giftName;
  175 +}
  176 +
128 177 #pragma mark - getter
129 178  
130 179 - (NSArray *)giftArray
131 180 {
132 181 if (!_giftArray)
133 182 {
134   - NSArray *images = [NSArray arrayWithObjects:@"love",@"love",@"love",@"love",@"love",@"love",@"love",@"love",@"love",@"love",nil];
135   - NSArray *types = [NSArray arrayWithObjects:@2,@3,@1,@1,@1,@1,@1,@1,@1,@1, nil];
136   - NSArray *senders = [NSArray arrayWithObjects:@"张三",@"李四",@"王五",@"宋刘",@"老七",@"老八",@"老九",@"老十",@"老师",@"小十七", nil];
137   - NSArray *prices = [NSArray arrayWithObjects:@"300000000",@"3000",@"300000",@"30",@"3",@"3",@"1",@"3",@"1",@"3", nil];
138   -
  183 + NSArray *senders = [NSArray arrayWithObjects:@"张三",@"龙的传人",@"李四",@"王五",@"宋刘",@"老七",@"老八",@"老九",@"老十",@"老师",@"小十七",@"小十八",@"小十九", nil];
139 184 NSMutableArray *tempArr = [NSMutableArray array];
140   - for (int i = 0; i < images.count; i ++) {
  185 + for (int i = 0; i < _images.count; i ++) {
141 186  
142   - int type = [types[i] intValue];
  187 + int type = [_types[i] intValue];
143 188 if (type == 1) {
144 189 //combo
145   - GiftModel *model1 = [GiftModel modelWithSender:senders[i] giftName:@"大大的爱心" icon:@"love" giftImageName:images[i]];
  190 + GiftModel *model1 = [GiftModel modelWithSender:senders[i] giftName:[self giftNameWithImageName:_images[i]] icon:@"love" giftImageName:_images[i]];
146 191 model1.giftStyle = GiftStyleCombo;
147   - model1.price = prices[i];
  192 + model1.price = _prices[i];
148 193 [tempArr addObject:model1];
149 194  
150 195 }else
151 196 {//expen
152   - GiftModel *model = [GiftModel modelWithSender:senders[i] giftName:@"豪华礼物" icon:@"love" giftImageName:@"love"];
  197 + GiftModel *model = [GiftModel modelWithSender:senders[i] giftName:[self giftNameWithImageName:_images[i]] icon:@"love" giftImageName:@""];
153 198  
154 199 if (type == 2) {
155 200 model.giftStyle = GiftStylePorsch;
156   - model.giftName = @"跑车";
  201 + model.giftImageName = @"porsch_small80";
157 202 }
158 203 if (type == 3) {
  204 + model.giftStyle = GiftStyleFighter;
  205 + model.giftImageName = @"fighter_small80";
  206 + }
  207 + if (type == 4) {
159 208 model.giftStyle = GiftStylePlane;
160   - model.giftName = @"客机";
  209 + model.giftImageName = @"plane_small80";
161 210 }
162   - model.price = prices[i];
  211 + model.price = _prices[i];
163 212 [tempArr addObject:model];
164 213 }
165 214 }
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftViews/GiftPayButton.h 0 → 100644
  1 +//
  2 +// GiftPayButton.h
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by 张旭 on 2017/3/20.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +@interface GiftPayButton : UIButton
  12 +
  13 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftViews/GiftPayButton.m 0 → 100644
  1 +//
  2 +// GiftPayButton.m
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by 张旭 on 2017/3/20.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "GiftPayButton.h"
  10 +
  11 +@implementation GiftPayButton
  12 +
  13 +- (void)layoutSubviews
  14 +{
  15 + [super layoutSubviews];
  16 +
  17 + [self setTitle:@"充值 10" forState:UIControlStateNormal];
  18 + self.titleLabel.textAlignment = NSTextAlignmentLeft;
  19 + self.titleLabel.font = [UIFont systemFontOfSize:kContentFont];
  20 + [self setTitleColor:[UIColor yellowColor] forState:UIControlStateNormal];
  21 + [self setImage:[UIImage imageNamed:@"diamond"] forState:UIControlStateNormal];
  22 + [self setImage:[UIImage imageNamed:@"diamond"] forState:UIControlStateHighlighted];
  23 +
  24 + self.titleLabel.left = 0;
  25 + self.titleLabel.top = 0;
  26 + self.titleLabel.width = self.width - 20;
  27 + self.titleLabel.height = self.height;
  28 +
  29 + self.imageView.height = 10;
  30 + self.imageView.width = 13;
  31 + self.imageView.left = self.width - 25;
  32 + self.imageView.centerY = self.titleLabel.centerY;
  33 +}
  34 +
  35 +/*
  36 +// Only override drawRect: if you perform custom drawing.
  37 +// An empty implementation adversely affects performance during animation.
  38 +- (void)drawRect:(CGRect)rect {
  39 + // Drawing code
  40 +}
  41 +*/
  42 +
  43 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/Present/PresentModelAble.h
... ... @@ -2,8 +2,8 @@
2 2 // PresentModelAble.h
3 3 // PresentDemo
4 4 //
5   -// Created by 阮思平 on 16/10/2.
6   -// Copyright © 2016年 阮思平. All rights reserved.
  5 +// Created by 张旭 on 2017/3/17.
  6 +// Copyright © 2017年 张旭. All rights reserved.
7 7 //
8 8  
9 9 #import <Foundation/Foundation.h>
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/Present/PresentView.h
... ... @@ -2,8 +2,8 @@
2 2 // PresentView.h
3 3 // PresentDemo
4 4 //
5   -// Created by 阮思平 on 16/10/2.
6   -// Copyright © 2016年 阮思平. All rights reserved.
  5 +// Created by 张旭 on 2017/3/17.
  6 +// Copyright © 2017年 张旭. All rights reserved.
7 7 //
8 8  
9 9 #import <UIKit/UIKit.h>
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/Present/PresentView.m
... ... @@ -2,8 +2,8 @@
2 2 // PresentView.m
3 3 // PresentDemo
4 4 //
5   -// Created by 阮思平 on 16/10/2.
6   -// Copyright © 2016年 阮思平. All rights reserved.
  5 +// Created by 张旭 on 2017/3/17.
  6 +// Copyright © 2017年 张旭. All rights reserved.
7 7 //
8 8  
9 9 #import "PresentView.h"
... ... @@ -17,7 +17,7 @@
17 17 */
18 18 @property (strong, nonatomic) NSMutableArray *dataCaches;
19 19 /**
20   - * 不带连动画的消息缓存数组
  20 + * 不带连动画的消息缓存数组
21 21 */
22 22 @property (strong, nonatomic)NSMutableArray *nonshakeDataCaches;
23 23 /**
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/Present/PresentViewCell.h
... ... @@ -2,8 +2,8 @@
2 2 // PresentViewCell.h
3 3 // PresentDemo
4 4 //
5   -// Created by 阮思平 on 16/10/2.
6   -// Copyright © 2016年 阮思平. All rights reserved.
  5 +// Created by 张旭 on 2017/3/17.
  6 +// Copyright © 2017年 张旭. All rights reserved.
7 7 //
8 8  
9 9 #import <UIKit/UIKit.h>
... ... @@ -71,7 +71,7 @@ typedef NS_ENUM(NSUInteger, AnimationState) {
71 71 连乘动画
72 72  
73 73 @discussion 当礼物模型中拥有礼物个数时,才调用此接口
74   - @param model 礼物模型
  74 + @param models 礼物模型
75 75 */
76 76 - (void)shakeAnimationWithModels:(NSArray<id<PresentModelAble>> *)models;
77 77 /**
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/Present/PresentViewCell.m
... ... @@ -2,8 +2,8 @@
2 2 // PresentViewCell.m
3 3 // PresentDemo
4 4 //
5   -// Created by 阮思平 on 16/10/2.
6   -// Copyright © 2016年 阮思平. All rights reserved.
  5 +// Created by 张旭 on 2017/3/17.
  6 +// Copyright © 2017年 张旭. All rights reserved.
7 7 //
8 8  
9 9 #import "PresentViewCell.h"
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/LVCAnimationManager.m
... ... @@ -65,7 +65,7 @@ static LVCAnimationManager * __singleton__;
65 65 */
66 66 - (void)bubblingWithCenterPoint:(CGPoint)centerPoint toView:(UIView *_Nonnull)toView speed:(CGFloat)speed
67 67 {
68   - CGFloat defSpeed = 2;
  68 + CGFloat defSpeed = 1;
69 69 if (speed != 0) {
70 70 defSpeed = speed;
71 71 }
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/LiveBaseView.m
... ... @@ -13,6 +13,11 @@
13 13 #import "GiftModel.h"
14 14 #import "PresentView.h"
15 15 #import "ComboCell.h"
  16 +#import "LVCAnimationManager.h"
  17 +#import "chatListCell.h"
  18 +#import "chatMsgModel.h"
  19 +
  20 +#define BottomToolHeight 60
16 21  
17 22 typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
18 23 PopTypeGift = 1,//礼物弹窗
... ... @@ -20,7 +25,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
20 25 PopTypePriMessage //私信弹窗
21 26 };
22 27  
23   -@interface LiveBaseView ()<bottomBtnDeledate,PresentViewDelegate,UIScrollViewDelegate>
  28 +@interface LiveBaseView ()<bottomBtnDeledate,PresentViewDelegate,UIScrollViewDelegate,UITableViewDelegate,UITableViewDataSource>
24 29  
25 30 @property (nonatomic ,strong ) UIScrollView * _Nullable scrollView;
26 31 @property (nonatomic ,strong ,readwrite) UIView * _Nullable animationBaseView;//展示层View
... ... @@ -28,8 +33,10 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
28 33 @property (nonatomic ,strong ) UIButton * _Nullable closeBtn;
29 34 @property (nonatomic ,strong ) UIView * _Nullable giftPopView;
30 35 @property (nonatomic ,strong ,readwrite) PresentView * _Nullable presentView;//连击View
31   -
32 36 @property (nonatomic ,assign ) PopType popType;
  37 +@property (nonatomic ,strong) UITableView * _Nullable chatTableView;
  38 +@property (nonatomic ,strong) NSMutableArray * _Nullable chatMsgArray;//聊天消息数组
  39 +
33 40 @end
34 41  
35 42 @implementation LiveBaseView
... ... @@ -44,6 +51,15 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
44 51 [self.animationBaseView addSubview:self.presentView];
45 52 [self addSubview:self.closeBtn];
46 53 [self addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGestureClick:)]];
  54 + [[LVCAnimationManager shareManager] bubblingWithCenterPoint:CGPointMake(SCREEN_WIDTH - 50, SCREEN_HEIGHT - 50) toView:self.animationBaseView speed:1];
  55 +// ChatView *chatView = [[ChatView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT - 150, 200, 100)];
  56 +// chatView.backgroundColor = ZXRandomColor;
  57 +// [self addSubview:chatView];
  58 + [self.animationBaseView addSubview:self.chatTableView];
  59 + self.chatTableView.backgroundColor = ZXRandomColor;
  60 + chatMsgModel *model = [[chatMsgModel alloc] init];
  61 + model.name = @"张旭";
  62 + [self.chatMsgArray addObject:model];
47 63 }
48 64 return self;
49 65 }
... ... @@ -51,11 +67,11 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
51 67 #pragma mark - bottomBtnDelegate
52 68 - (void)bottomActionWithType:(BtnClickType)btnType
53 69 {
54   - [self hiddenView:YES];
55 70 switch (btnType) {
56 71 case BtnClickTypeChat:
57 72 {
58 73 self.popType = PopTypeChat;
  74 +
59 75 }
60 76 break;
61 77 case BtnClickTypePriChat:
... ... @@ -66,12 +82,19 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
66 82 case BtnClickTypeGift:
67 83 {
68 84 self.popType = PopTypeGift;
69   -
70   - GiftListView *giftListView = [[GiftListView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT - 230, SCREEN_WIDTH, 230) liveBaseView:self];
71   - giftListView.backgroundColor = [UIColor lightGrayColor];
  85 + [self hiddenView:YES];
  86 + GiftListView *giftListView = [[GiftListView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT - 250, SCREEN_WIDTH, 250) liveBaseView:self];
72 87 [self addSubview:giftListView];
73 88 self.giftPopView = giftListView;
74   -
  89 +
  90 + UIImageView *giftBg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, giftListView.width, giftListView.height)];
  91 + giftBg.image = [UIImage imageNamed:@"背景400x300"];
  92 + giftBg.centerX = giftListView.width * 0.5;
  93 + giftBg.centerY = giftListView.height * 0.5;
  94 + giftBg.alpha = 0.4;
  95 + [giftListView addSubview:giftBg];
  96 +
  97 +
75 98 }
76 99 break;
77 100 default:
... ... @@ -83,6 +106,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
83 106 {
84 107 self.bottomToolView.hidden = isHidden;
85 108 self.closeBtn.hidden = isHidden;
  109 + self.chatTableView.hidden = isHidden;
86 110 }
87 111  
88 112 - (void)clearCurrentPopView
... ... @@ -114,6 +138,27 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
114 138 }
115 139  
116 140 }
  141 +#pragma mark - 聊天消息列表
  142 +#pragma mark - UITableViewDataSource
  143 +
  144 +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  145 +{
  146 + return self.chatMsgArray.count;
  147 +}
  148 +
  149 +-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  150 +{
  151 + chatListCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([chatListCell class]) forIndexPath:indexPath];
  152 + [cell loadUIWithModel:self.chatMsgArray[indexPath.row]];
  153 + return cell;
  154 +}
  155 +
  156 +#pragma mark - UITableViewDelegate
  157 +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
  158 +{
  159 + return [self.chatMsgArray[indexPath.row] cellHeight];
  160 +}
  161 +
117 162 #pragma mark - PresentViewDelegate
118 163  
119 164 - (PresentViewCell *)presentView:(PresentView *)presentView cellOfRow:(NSInteger)row
... ... @@ -135,13 +180,13 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
135 180  
136 181 - (void)presentView:(PresentView *)presentView animationCompleted:(NSInteger)shakeNumber model:(id<PresentModelAble>)model
137 182 {
138   -// self.number = 5;
139 183 NSLog(@"%@礼物的连送动画执行完成", model.giftName);
140 184 }
141 185  
142 186 #pragma mark - buttonClick
143 187 - (void)tapGestureClick:(UITapGestureRecognizer *)gesture
144 188 {
  189 + [[LVCAnimationManager shareManager] bubblingWithCenterPoint:CGPointMake(SCREEN_WIDTH - 50, SCREEN_HEIGHT - 50) toView:self.animationBaseView];
145 190 [self clearCurrentPopView];
146 191 }
147 192  
... ... @@ -206,7 +251,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
206 251 {
207 252 if (!_bottomToolView)
208 253 {
209   - _bottomToolView = [[BottomToolView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT - 60, SCREEN_WIDTH, 60)];
  254 + _bottomToolView = [[BottomToolView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT - BottomToolHeight, SCREEN_WIDTH, BottomToolHeight)];
210 255 _bottomToolView.delegate = self;
211 256 _bottomToolView.backgroundColor = [UIColor lightGrayColor];
212 257 _bottomToolView.alpha = 0.7;
... ... @@ -214,6 +259,31 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
214 259 return _bottomToolView;
215 260 }
216 261  
  262 +- (UITableView *)chatTableView
  263 +{
  264 + if (!_chatTableView) {
  265 + UITableView *tableView = [[UITableView alloc]initWithFrame:CGRectMake(10, SCREEN_HEIGHT - 150 - BottomToolHeight - 10, 300, 150)];
  266 + tableView.delegate = self;
  267 + tableView.dataSource = self;
  268 + tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  269 + [tableView registerClass:[chatListCell class] forCellReuseIdentifier:NSStringFromClass([chatListCell class])];
  270 + tableView.showsVerticalScrollIndicator = NO;
  271 + tableView.showsHorizontalScrollIndicator = NO;
  272 + tableView.backgroundColor = [UIColor clearColor];
  273 + tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  274 + _chatTableView = tableView;
  275 + }
  276 + return _chatTableView;
  277 +}
  278 +
  279 +- (NSMutableArray *)chatMsgArray
  280 +{
  281 + if (!_chatMsgArray) {
  282 + _chatMsgArray = [NSMutableArray array];
  283 + }
  284 + return _chatMsgArray;
  285 +}
  286 +
217 287 - (UIButton *)closeBtn
218 288 {
219 289 if (!_closeBtn)
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/HomeViewController.m
... ... @@ -10,6 +10,7 @@
10 10 #import "LVCLivePlayerController.h"
11 11 #import "LVCInteractionController.h"
12 12 #import "LVCLivePlayerController.h"
  13 +#import "LVCUGCLivePlayerController.h"
13 14  
14 15 @interface HomeViewController ()
15 16  
... ... @@ -43,6 +44,12 @@
43 44 [liveBtn addTarget:self action:@selector(liveAction) forControlEvents:UIControlEventTouchUpInside];
44 45 [self.view addSubview:liveBtn];
45 46  
  47 + UIButton *UGCLiveBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  48 + UGCLiveBtn.frame = CGRectMake(0, 200, self.view.width, 40);
  49 + [UGCLiveBtn setTitle:@"UGC直播" forState:UIControlStateNormal];
  50 + [UGCLiveBtn addTarget:self action:@selector(UGCLiveAction) forControlEvents:UIControlEventTouchUpInside];
  51 + [self.view addSubview:UGCLiveBtn];
  52 +
46 53 [[UIApplication sharedApplication].keyWindow addSubview:self.interactionBtn];
47 54 }
48 55  
... ... @@ -53,6 +60,12 @@
53 60 [self.navigationController pushViewController:liveVC animated:YES];
54 61 }
55 62  
  63 +- (void)UGCLiveAction
  64 +{
  65 + LVCUGCLivePlayerController *UGCLiveVC = [[LVCUGCLivePlayerController alloc] init];
  66 + [self.navigationController pushViewController:UGCLiveVC animated:YES];
  67 +}
  68 +
56 69 - (void)interactionAction
57 70 {
58 71 LVCInteractionController *intVC = [[LVCInteractionController alloc] init];
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLivePlayerController.h 0 → 100644
  1 +//
  2 +// LVCUGCLivePlayerController.h
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by cnliveJunBo on 17/3/17.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +@interface LVCUGCLivePlayerController : UIViewController
  12 +
  13 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLivePlayerController.m 0 → 100644
  1 +//
  2 +// LVCUGCLivePlayerController.m
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by cnliveJunBo on 17/3/17.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "LVCUGCLivePlayerController.h"
  10 +#import <CNLivePlayerSDK/CNLiveWebcastManager.h>
  11 +#import "LVCUGCPlayerLoadingView.h"
  12 +#import "LVCUGCBackgroundView.h"
  13 +
  14 +#define KAppId @"60_irn9edco29"
  15 +#define KAppKey @"69fe70bda67e059286ad509d9f5377f815955645b52f94"
  16 +
  17 +@interface LVCUGCLivePlayerController ()
  18 +
  19 +@property (nonatomic, strong) CNLiveMoviePlayerController *player;// 播放器
  20 +
  21 +@property (nonatomic, strong) LVCUGCBackgroundView *bgView; // 背景视图
  22 +
  23 +@property (nonatomic, strong) LVCUGCPlayerLoadingView *loadingView; // 加载视图
  24 +
  25 +@end
  26 +
  27 +@implementation LVCUGCLivePlayerController
  28 +
  29 +- (void)viewWillAppear:(BOOL)animated {
  30 +
  31 + [super viewWillAppear:animated];
  32 +
  33 + self.navigationController.navigationBar.hidden = YES;
  34 +}
  35 +
  36 +- (void)viewWillDisappear:(BOOL)animated {
  37 +
  38 + [super viewWillDisappear:animated];
  39 +
  40 + self.navigationController.navigationBar.hidden = NO;
  41 +}
  42 +
  43 +- (void)viewDidLoad {
  44 + [super viewDidLoad];
  45 +
  46 + self.view.backgroundColor = [UIColor whiteColor];
  47 +
  48 + [self.view addSubview:self.loadingView];
  49 +
  50 + //添加播放器通知
  51 + [self installMovieNotificationObservers];
  52 +
  53 + [[CNLiveWebcastManager manager] initWithAppId:KAppId appKey:KAppKey];
  54 +
  55 + //直播播放
  56 + _player = [[CNLiveMoviePlayerController alloc] initLivePlayWithChannelId:@"iOStest"
  57 + authSuccess:^{
  58 +
  59 + _player.videoDecoderMode = CNLiveMovieVideoDecoderMode_AUTO;
  60 + _player.view.frame = self.view.bounds;
  61 + _player.shouldAutoplay = YES;
  62 + [_player prepareToPlay];
  63 + [self.view addSubview:_player.view];
  64 + [self.view sendSubviewToBack:_player.view];
  65 +
  66 + } authFailed:^(NSDictionary *errorInfo) {
  67 + NSLog(@"初始化直播播放器失败:%@", errorInfo);
  68 +
  69 +
  70 + } getAnchorStatusResult:^(BOOL result) {
  71 +
  72 + NSLog(@"-------------获取主播状态%d", result ? YES : NO);
  73 +
  74 + }];
  75 +}
  76 +
  77 +#pragma mark - 添加通知监听 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  78 +-(void)installMovieNotificationObservers //添加视频播放通知
  79 +{
  80 + //视频加载状态改变
  81 + [[NSNotificationCenter defaultCenter] addObserver:self
  82 + selector:@selector(loadStateDidChange:)
  83 + name:MPMoviePlayerLoadStateDidChangeNotification
  84 + object:nil];
  85 +
  86 + //视频播放错误及结束原因
  87 + [[NSNotificationCenter defaultCenter] addObserver:self
  88 + selector:@selector(moviePlayBackDidFinish:)
  89 + name:MPMoviePlayerPlaybackDidFinishNotification
  90 + object:nil];
  91 +
  92 + //视频缓冲至可播放状态
  93 + [[NSNotificationCenter defaultCenter] addObserver:self
  94 + selector:@selector(mediaIsPreparedToPlayDidChange:)
  95 + name:MPMediaPlaybackIsPreparedToPlayDidChangeNotification
  96 + object:nil];
  97 +
  98 + //视频播放状态改变
  99 + [[NSNotificationCenter defaultCenter] addObserver:self
  100 + selector:@selector(moviePlayBackStateDidChange:)
  101 + name:MPMoviePlayerPlaybackStateDidChangeNotification
  102 + object:nil];
  103 +
  104 +
  105 + //获取主播状态通知(点播和普通播放不需要注册该通知)
  106 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(anchorStatusChanged:)
  107 + name:CNLiveAnchorStatusChangedNotification
  108 + object:nil];
  109 +
  110 +}
  111 +
  112 +#pragma mark - 移除通知
  113 +- (void)removeMovieNotificationObservers
  114 +{
  115 + [[NSNotificationCenter defaultCenter]removeObserver:self
  116 + name:MPMoviePlayerLoadStateDidChangeNotification
  117 + object:nil];
  118 + [[NSNotificationCenter defaultCenter]removeObserver:self
  119 + name:MPMoviePlayerPlaybackDidFinishNotification
  120 + object:nil];
  121 + [[NSNotificationCenter defaultCenter]removeObserver:self
  122 + name:MPMediaPlaybackIsPreparedToPlayDidChangeNotification
  123 + object:nil];
  124 + [[NSNotificationCenter defaultCenter]removeObserver:self
  125 + name:MPMoviePlayerPlaybackStateDidChangeNotification
  126 + object:nil];
  127 +
  128 + [[NSNotificationCenter defaultCenter]removeObserver:self
  129 + name:CNLiveAnchorStatusChangedNotification
  130 + object:nil];
  131 +}
  132 +
  133 +#pragma mark - 通知 Action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  134 +//视频加载状态改变
  135 +- (void)loadStateDidChange:(NSNotification *)notification
  136 +{
  137 + if (_player) {
  138 + MPMovieLoadState loadState = _player.loadState;
  139 + if ((loadState & MPMovieLoadStatePlaythroughOK) != 0) {
  140 +
  141 + NSLog(@"loadStateDidChange: MPMovieLoadStatePlaythroughOK: %d\n", (int)loadState);
  142 +
  143 + } else if ((loadState & MPMovieLoadStateStalled) != 0) {
  144 + NSLog(@"loadStateDidChange: MPMovieLoadStateStalled: %d\n", (int)loadState);
  145 +
  146 + } else {
  147 + NSLog(@"loadStateDidChange: ???: %d\n", (int)loadState);
  148 + }
  149 + }
  150 +}
  151 +
  152 +//视频播放错误及结束原因
  153 +- (void)moviePlayBackDidFinish:(NSNotification *)notification
  154 +{
  155 + if (_player) {
  156 + int reason = [[[notification userInfo] valueForKey:MPMoviePlayerPlaybackDidFinishReasonUserInfoKey] intValue];
  157 + if (MPMovieFinishReasonPlaybackError == reason) {
  158 +
  159 +
  160 + } else {
  161 +
  162 + }
  163 +
  164 + switch (reason)
  165 + {
  166 + case MPMovieFinishReasonPlaybackEnded:
  167 + NSLog(@"playbackStateDidChange: MPMovieFinishReasonPlaybackEnded: %d\n", reason);
  168 + break;
  169 +
  170 + case MPMovieFinishReasonUserExited:
  171 + NSLog(@"playbackStateDidChange: MPMovieFinishReasonUserExited: %d\n", reason);
  172 + break;
  173 +
  174 + case MPMovieFinishReasonPlaybackError:
  175 + NSLog(@"playbackStateDidChange: MPMovieFinishReasonPlaybackError: %d\n", reason);
  176 + break;
  177 +
  178 + default:
  179 + NSLog(@"playbackPlayBackDidFinish: ???: %d\n", reason);
  180 + break;
  181 + }
  182 + }
  183 +}
  184 +
  185 +//视频缓冲至可播放状态
  186 +- (void)mediaIsPreparedToPlayDidChange:(NSNotification *)notification
  187 +{
  188 + if (_player) {
  189 + NSLog(@"isPreparedToPlay");
  190 + }
  191 +}
  192 +
  193 +//视频播放状态改变
  194 +- (void)moviePlayBackStateDidChange:(NSNotification *)notification
  195 +{
  196 + if (_player) {
  197 +
  198 + switch (_player.playbackState) {
  199 + case MPMoviePlaybackStateStopped: {
  200 +
  201 + NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStateStopped");
  202 + break;
  203 + }
  204 + case MPMoviePlaybackStatePlaying: {
  205 +
  206 + NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStatePlaying");
  207 + break;
  208 + }
  209 + case MPMoviePlaybackStatePaused:
  210 +
  211 + NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStatePaused");
  212 + break;
  213 + case MPMoviePlaybackStateInterrupted:
  214 +
  215 + NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStateInterrupted");
  216 + break;
  217 + case MPMoviePlaybackStateSeekingForward:
  218 +
  219 + NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStateSeekingForward");
  220 + break;
  221 + case MPMoviePlaybackStateSeekingBackward:
  222 +
  223 + NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStateSeekingBackward");
  224 + break;
  225 + default:
  226 +
  227 + NSLog(@"moviePlayBackStateDidChange : %ld", (long)_player.playbackState);
  228 + break;
  229 + }
  230 + }
  231 +}
  232 +
  233 +
  234 +
  235 +// 获取主播状态通知
  236 +- (void)anchorStatusChanged:(NSNotification *)notification
  237 +{
  238 + if (_player.anchorStatus == 2) {
  239 +
  240 + }
  241 + _bgView.anchorStatus = _player.anchorStatus;
  242 +}
  243 +
  244 +//重新连接获取主播状态
  245 +- (void)anchorStatusConnectFailed
  246 +{
  247 +
  248 +}
  249 +
  250 +#pragma mark - getter
  251 +- (LVCUGCPlayerLoadingView *)loadingView {
  252 + if (!_loadingView) {
  253 + _loadingView = [[LVCUGCPlayerLoadingView alloc] initWithFrame:self.view.bounds bgImageURLStr:@""];
  254 + }
  255 + return _loadingView;
  256 +}
  257 +
  258 +#pragma mark - 内存警告 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  259 +- (void)didReceiveMemoryWarning {
  260 + [super didReceiveMemoryWarning];
  261 + // Dispose of any resources that can be recreated.
  262 +}
  263 +
  264 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCUGCBackgroundView.h 0 → 100644
  1 +//
  2 +// LVCUGCBackgroundView.h
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by cnliveJunBo on 17/3/20.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +@interface LVCUGCBackgroundView : UIView
  12 +
  13 +@property (nonatomic, assign) int anchorStatus; //设置主播状态
  14 +
  15 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCUGCBackgroundView.m 0 → 100644
  1 +//
  2 +// LVCUGCBackgroundView.m
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by cnliveJunBo on 17/3/20.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "LVCUGCBackgroundView.h"
  10 +
  11 +@implementation LVCUGCBackgroundView
  12 +
  13 +/*
  14 +// Only override drawRect: if you perform custom drawing.
  15 +// An empty implementation adversely affects performance during animation.
  16 +- (void)drawRect:(CGRect)rect {
  17 + // Drawing code
  18 +}
  19 +*/
  20 +
  21 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCUGCPlayerLoadingView.h 0 → 100644
  1 +//
  2 +// LVCUGCPlayerLoadingView.h
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by cnliveJunBo on 17/3/20.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +@interface LVCUGCPlayerLoadingView : UIView
  12 +
  13 +- (instancetype)initWithFrame:(CGRect)frame bgImageURLStr:(NSString *)bgImageURLStr;
  14 +
  15 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCUGCPlayerLoadingView.m 0 → 100644
  1 +//
  2 +// LVCUGCPlayerLoadingView.m
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by cnliveJunBo on 17/3/20.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "LVCUGCPlayerLoadingView.h"
  10 +#import "UIImage+LVCVagueImage.h"
  11 +
  12 +@interface LVCUGCPlayerLoadingView() {
  13 +
  14 + NSString *_bgImageURLStr;
  15 +}
  16 +
  17 +@property (nonatomic, strong) UIImageView *bgImageView;
  18 +
  19 +@end
  20 +
  21 +@implementation LVCUGCPlayerLoadingView
  22 +
  23 +- (instancetype)initWithFrame:(CGRect)frame bgImageURLStr:(NSString *)bgImageURLStr
  24 +{
  25 + self = [super initWithFrame:frame];
  26 + if (self) {
  27 + _bgImageURLStr = bgImageURLStr;
  28 + [self addSubview:self.bgImageView];
  29 + }
  30 + return self;
  31 +}
  32 +
  33 +- (UIImageView *)bgImageView {
  34 + if (!_bgImageView) {
  35 +
  36 + NSString *path = [[NSBundle mainBundle] pathForResource:@"UGCLoading" ofType:@"jpeg"];
  37 + UIImage *image = [UIImage imageWithContentsOfFile:path];
  38 + UIImage *blurImage = [UIImage boxblurImage:image withBlurNumber:0.6];
  39 + _bgImageView = [[UIImageView alloc] initWithImage:blurImage];
  40 + _bgImageView.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
  41 + _bgImageView.contentMode = UIViewContentModeScaleAspectFill;
  42 + _bgImageView.clipsToBounds = YES;
  43 + }
  44 + return _bgImageView;
  45 +}
  46 +
  47 +@end
... ...
LiveVideoCloud/LiveVideoCloud/Resource/Images/UGCLoading.jpeg 0 → 100644

876 KB

LiveVideoCloud/LiveVideoCloud/UtilKits/Category/UIImage+LVCVagueImage.h 0 → 100644
  1 +//
  2 +// UIImage+LVCVagueImage.h
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by cnliveJunBo on 17/3/21.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +@interface UIImage (LVCVagueImage)
  12 +
  13 ++ (UIImage *)boxblurImage:(UIImage *)image withBlurNumber:(CGFloat)blur;
  14 +
  15 +@end
... ...
LiveVideoCloud/LiveVideoCloud/UtilKits/Category/UIImage+LVCVagueImage.m 0 → 100644
  1 +//
  2 +// UIImage+LVCVagueImage.m
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by cnliveJunBo on 17/3/21.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "UIImage+LVCVagueImage.h"
  10 +#import <Accelerate/Accelerate.h>
  11 +
  12 +@implementation UIImage (LVCVagueImage)
  13 +
  14 ++ (UIImage *)boxblurImage:(UIImage *)image withBlurNumber:(CGFloat)blur
  15 +{
  16 + if (blur < 0.f || blur > 1.f) {
  17 + blur = 0.5f;
  18 + }
  19 + int boxSize = (int)(blur * 40);
  20 + boxSize = boxSize - (boxSize % 2) + 1;
  21 + CGImageRef img = image.CGImage;
  22 + vImage_Buffer inBuffer, outBuffer;
  23 + vImage_Error error;
  24 + void *pixelBuffer;
  25 + //从CGImage中获取数据
  26 + CGDataProviderRef inProvider = CGImageGetDataProvider(img);
  27 + CFDataRef inBitmapData = CGDataProviderCopyData(inProvider);
  28 + //设置从CGImage获取对象的属性
  29 + inBuffer.width = CGImageGetWidth(img);
  30 + inBuffer.height = CGImageGetHeight(img);
  31 + inBuffer.rowBytes = CGImageGetBytesPerRow(img);
  32 + inBuffer.data = (void*)CFDataGetBytePtr(inBitmapData);
  33 + pixelBuffer = malloc(CGImageGetBytesPerRow(img) * CGImageGetHeight(img));
  34 + if(pixelBuffer == NULL)
  35 + NSLog(@"No pixelbuffer");
  36 + outBuffer.data = pixelBuffer;
  37 + outBuffer.width = CGImageGetWidth(img);
  38 + outBuffer.height = CGImageGetHeight(img);
  39 + outBuffer.rowBytes = CGImageGetBytesPerRow(img);
  40 + error = vImageBoxConvolve_ARGB8888(&inBuffer, &outBuffer, NULL, 0, 0, boxSize, boxSize, NULL, kvImageEdgeExtend);
  41 + if (error) {
  42 + NSLog(@"error from convolution %ld", error);
  43 + }
  44 + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
  45 + CGContextRef ctx = CGBitmapContextCreate( outBuffer.data, outBuffer.width, outBuffer.height, 8, outBuffer.rowBytes, colorSpace, kCGImageAlphaNoneSkipLast);
  46 + CGImageRef imageRef = CGBitmapContextCreateImage (ctx);
  47 + UIImage *returnImage = [UIImage imageWithCGImage:imageRef];
  48 + //clean up CGContextRelease(ctx);
  49 + CGColorSpaceRelease(colorSpace);
  50 + free(pixelBuffer);
  51 + CFRelease(inBitmapData);
  52 + CGColorSpaceRelease(colorSpace);
  53 + CGImageRelease(imageRef);
  54 + return returnImage;
  55 +}
  56 +
  57 +@end
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/Contents.json 0 → 100644
  1 +{
  2 + "info" : {
  3 + "version" : 1,
  4 + "author" : "xcode"
  5 + }
  6 +}
0 7 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/beer.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "beer.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/beer.imageset/beer.png 0 → 100644

5.11 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/chicken.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "chicken.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/chicken.imageset/chicken.png 0 → 100644

4.37 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/continuous.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "continuous.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/continuous.imageset/continuous.png 0 → 100644

1.94 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/cucumber.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "cucumber.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/cucumber.imageset/cucumber.png 0 → 100644

7.15 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/diamond.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "diamond.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/diamond.imageset/diamond.png 0 → 100644

1.01 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/fighter_small80.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "fighter_small80.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + }
  12 + ],
  13 + "info" : {
  14 + "version" : 1,
  15 + "author" : "xcode"
  16 + }
  17 +}
0 18 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/fighter_small80.imageset/fighter_small80.png 0 → 100644

7.91 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/flower.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "flower.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/flower.imageset/flower.png 0 → 100644

4.82 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/hug.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "hug.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/hug.imageset/hug.png 0 → 100644

4.34 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/love_gift.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "love_gift.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/love_gift.imageset/love_gift.png 0 → 100644

2.14 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/mouth.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "mouth.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/mouth.imageset/mouth.png 0 → 100644

5.06 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/plane_small80.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "plane_small80.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/plane_small80.imageset/plane_small80.png 0 → 100644

6.96 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/porsch_small80.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "porsch_small80.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/porsch_small80.imageset/porsch_small80.png 0 → 100644

8.48 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/ring.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "ring.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/ring.imageset/ring.png 0 → 100644

6.54 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/rose.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "rose.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/rose.imageset/rose.png 0 → 100644

5.39 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/sticks.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "sticks.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/sticks.imageset/sticks.png 0 → 100644

4.44 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/背景100x100.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "背景100x100.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/背景100x100.imageset/背景100x100.png 0 → 100644

1.46 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/背景150x100.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "背景150x100.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/背景150x100.imageset/背景150x100.png 0 → 100644

1.56 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/背景200x50.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "背景200x50.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/背景200x50.imageset/背景200x50.png 0 → 100644

1.4 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/背景400x30.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "背景400x30.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/背景400x30.imageset/背景400x30.png 0 → 100644

1.45 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/背景400x300.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "背景400x300.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "idiom" : "universal",
  14 + "scale" : "3x"
  15 + }
  16 + ],
  17 + "info" : {
  18 + "version" : 1,
  19 + "author" : "xcode"
  20 + }
  21 +}
0 22 \ No newline at end of file
... ...
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/背景400x300.imageset/背景400x300.png 0 → 100644

3.76 KB