Commit da8f31b8f8b28ef9c02972299088e82250daff40
Merge branch 'master' of bj.gitlab.cnlive.com:ios-team/LiveVideoCloud
Conflicts: LiveVideoCloud/LiveVideoCloud.xcodeproj/project.pbxproj
Showing
62 changed files
with
2005 additions
and
785 deletions
LiveVideoCloud/LiveVideoCloud.xcodeproj/project.pbxproj
| ... | ... | @@ -141,18 +141,23 @@ |
| 141 | 141 | D2029D091E6EAE2E0027CD92 /* Foundation+Log.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CF21E6EAE2E0027CD92 /* Foundation+Log.m */; }; |
| 142 | 142 | D2029D0A1E6EAE2E0027CD92 /* ZXServerUrl.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029CFE1E6EAE2E0027CD92 /* ZXServerUrl.m */; }; |
| 143 | 143 | D2029D161E6EB00D0027CD92 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029D151E6EB00D0027CD92 /* AppDelegate.m */; }; |
| 144 | + D207BE9E1E84BD68006A0CE8 /* BarrageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D207BE9D1E84BD68006A0CE8 /* BarrageManager.m */; }; | |
| 145 | + D207BEA11E84C1EC006A0CE8 /* AnimationBaseView.m in Sources */ = {isa = PBXBuildFile; fileRef = D207BEA01E84C1EC006A0CE8 /* AnimationBaseView.m */; }; | |
| 144 | 146 | D217A24A1E7B76C7003B44CB /* PresentView.m in Sources */ = {isa = PBXBuildFile; fileRef = D217A2471E7B76C7003B44CB /* PresentView.m */; }; |
| 145 | 147 | D217A24B1E7B76C7003B44CB /* PresentViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D217A2491E7B76C7003B44CB /* PresentViewCell.m */; }; |
| 146 | 148 | D217A24E1E7B77C7003B44CB /* ComboCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D217A24D1E7B77C7003B44CB /* ComboCell.m */; }; |
| 149 | + D224B1971E826ED800CC61D0 /* ChatBarrageAnimAction.m in Sources */ = {isa = PBXBuildFile; fileRef = D224B1961E826ED800CC61D0 /* ChatBarrageAnimAction.m */; }; | |
| 147 | 150 | D22830F11E778C0F00627701 /* LiveBaseView.m in Sources */ = {isa = PBXBuildFile; fileRef = D22830F01E778C0F00627701 /* LiveBaseView.m */; }; |
| 148 | 151 | D22830FC1E77C2D900627701 /* BottomToolView.m in Sources */ = {isa = PBXBuildFile; fileRef = D22830FB1E77C2D900627701 /* BottomToolView.m */; }; |
| 149 | 152 | D22830FF1E77C69E00627701 /* GiftListView.m in Sources */ = {isa = PBXBuildFile; fileRef = D22830FE1E77C69E00627701 /* GiftListView.m */; }; |
| 150 | 153 | D22831091E77D8D500627701 /* GiftModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D22831081E77D8D500627701 /* GiftModel.m */; }; |
| 151 | 154 | D236967E1E7F9E4100E4BF71 /* GiftPayButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D236967D1E7F9E4100E4BF71 /* GiftPayButton.m */; }; |
| 152 | 155 | D23696841E7FC6A900E4BF71 /* chatListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D23696831E7FC6A900E4BF71 /* chatListCell.m */; }; |
| 153 | - D236968D1E7FC7C200E4BF71 /* CNBarrageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D236968A1E7FC7C200E4BF71 /* CNBarrageManager.m */; }; | |
| 154 | - D236968E1E7FC7C200E4BF71 /* CNBarrageView.m in Sources */ = {isa = PBXBuildFile; fileRef = D236968C1E7FC7C200E4BF71 /* CNBarrageView.m */; }; | |
| 155 | 156 | D23696921E7FC83800E4BF71 /* chatMsgModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D23696911E7FC83800E4BF71 /* chatMsgModel.m */; }; |
| 157 | + D24571581E8393EB00AA85D6 /* UIImageView+ZXExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = D24571571E8393EB00AA85D6 /* UIImageView+ZXExtension.m */; }; | |
| 158 | + D245715C1E83A62B00AA85D6 /* BounceView.m in Sources */ = {isa = PBXBuildFile; fileRef = D245715B1E83A62B00AA85D6 /* BounceView.m */; }; | |
| 159 | + D245715F1E83B09900AA85D6 /* userInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D245715E1E83B09900AA85D6 /* userInfoModel.m */; }; | |
| 160 | + D24571631E83C40B00AA85D6 /* PrivateView.m in Sources */ = {isa = PBXBuildFile; fileRef = D24571621E83C40B00AA85D6 /* PrivateView.m */; }; | |
| 156 | 161 | D25530001E7909AC00DF38A5 /* GiftAnimOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = D2552FFF1E7909AC00DF38A5 /* GiftAnimOperation.m */; }; |
| 157 | 162 | D25530031E79115100DF38A5 /* AnimQueueManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D25530021E79115100DF38A5 /* AnimQueueManager.m */; }; |
| 158 | 163 | D25530061E7911A800DF38A5 /* GiftAnimationAction.m in Sources */ = {isa = PBXBuildFile; fileRef = D25530051E7911A800DF38A5 /* GiftAnimationAction.m */; }; |
| ... | ... | @@ -174,12 +179,6 @@ |
| 174 | 179 | D25BF8831E7F775F007FB138 /* LVCUGCPlayerLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF8821E7F775F007FB138 /* LVCUGCPlayerLoadingView.m */; }; |
| 175 | 180 | D25BF8901E7F7F8F007FB138 /* UGCLoading.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = D25BF88F1E7F7F8F007FB138 /* UGCLoading.jpeg */; }; |
| 176 | 181 | D25BF8931E7FBAEA007FB138 /* LVCUGCBackgroundView.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF8921E7FBAEA007FB138 /* LVCUGCBackgroundView.m */; }; |
| 177 | - D25BF8971E7FE01B007FB138 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */; }; | |
| 178 | - D25BF8991E7FE033007FB138 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */; }; | |
| 179 | - D25BF89A1E7FE046007FB138 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */; }; | |
| 180 | - D25BF89B1E7FE046007FB138 /* CNLiveChatManager.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | |
| 181 | - D25BF89C1E7FE049007FB138 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */; }; | |
| 182 | - D25BF89D1E7FE049007FB138 /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | |
| 183 | 182 | D25BF8A01E80C4BD007FB138 /* UIImage+LVCVagueImage.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF89F1E80C4BD007FB138 /* UIImage+LVCVagueImage.m */; }; |
| 184 | 183 | D25BF8A31E80C4FC007FB138 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8A21E80C4FC007FB138 /* Accelerate.framework */; }; |
| 185 | 184 | D25BF8A51E80EC76007FB138 /* 头像.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D25BF8A41E80EC76007FB138 /* 头像.jpg */; }; |
| ... | ... | @@ -188,7 +187,17 @@ |
| 188 | 187 | D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB01E6EC05F003A77C8 /* TempViewController.m */; }; |
| 189 | 188 | D2888DB41E6EC154003A77C8 /* HomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB31E6EC154003A77C8 /* HomeViewController.m */; }; |
| 190 | 189 | D2888DB71E6EC1B8003A77C8 /* LVCMyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB61E6EC1B8003A77C8 /* LVCMyViewController.m */; }; |
| 190 | + D29D88481E88C53300543A03 /* LVCUGCLivePrepareView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29D88471E88C53300543A03 /* LVCUGCLivePrepareView.m */; }; | |
| 191 | 191 | D2A803081E80BD6F009D6F1C /* TopToolView.m in Sources */ = {isa = PBXBuildFile; fileRef = D2A803071E80BD6F009D6F1C /* TopToolView.m */; }; |
| 192 | + D2B2ED7A1E88F90C00F7538A /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2D236B21E88F8E600B7C517 /* CNLiveChatManager.framework */; }; | |
| 193 | + D2B2ED7B1E88F90C00F7538A /* CNLiveChatManager.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D2D236B21E88F8E600B7C517 /* CNLiveChatManager.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | |
| 194 | + D2B2ED7C1E88F90F00F7538A /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2D236B31E88F8E600B7C517 /* CNLiveMsgTools.framework */; }; | |
| 195 | + D2B2ED7D1E88F90F00F7538A /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D2D236B31E88F8E600B7C517 /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | |
| 196 | + D2B7B2511E8247D400ED084E /* ChatBarrageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D2B7B2501E8247D400ED084E /* ChatBarrageManager.m */; }; | |
| 197 | + D2B7B2541E824B2D00ED084E /* ChatBarrageView.m in Sources */ = {isa = PBXBuildFile; fileRef = D2B7B2531E824B2D00ED084E /* ChatBarrageView.m */; }; | |
| 198 | + D2B7B2571E8261EF00ED084E /* ChatBarrOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = D2B7B2561E8261EF00ED084E /* ChatBarrOperation.m */; }; | |
| 199 | + D2D236B41E88F8E600B7C517 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2D236B21E88F8E600B7C517 /* CNLiveChatManager.framework */; }; | |
| 200 | + D2D236B51E88F8E600B7C517 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2D236B31E88F8E600B7C517 /* CNLiveMsgTools.framework */; }; | |
| 192 | 201 | /* End PBXBuildFile section */ |
| 193 | 202 | |
| 194 | 203 | /* Begin PBXContainerItemProxy section */ |
| ... | ... | @@ -216,8 +225,8 @@ |
| 216 | 225 | dstSubfolderSpec = 10; |
| 217 | 226 | files = ( |
| 218 | 227 | 811BB6851E8106AF005C6291 /* CNLivePlayerSDK.framework in Embed Frameworks */, |
| 219 | - D25BF89B1E7FE046007FB138 /* CNLiveChatManager.framework in Embed Frameworks */, | |
| 220 | - D25BF89D1E7FE049007FB138 /* CNLiveMsgTools.framework in Embed Frameworks */, | |
| 228 | + D2B2ED7B1E88F90C00F7538A /* CNLiveChatManager.framework in Embed Frameworks */, | |
| 229 | + D2B2ED7D1E88F90F00F7538A /* CNLiveMsgTools.framework in Embed Frameworks */, | |
| 221 | 230 | ); |
| 222 | 231 | name = "Embed Frameworks"; |
| 223 | 232 | runOnlyForDeploymentPostprocessing = 0; |
| ... | ... | @@ -510,6 +519,10 @@ |
| 510 | 519 | D2029CFF1E6EAE2E0027CD92 /* UtilKits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UtilKits.h; sourceTree = "<group>"; }; |
| 511 | 520 | D2029D121E6EAF8D0027CD92 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; |
| 512 | 521 | D2029D151E6EB00D0027CD92 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; |
| 522 | + D207BE9C1E84BD68006A0CE8 /* BarrageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BarrageManager.h; sourceTree = "<group>"; }; | |
| 523 | + D207BE9D1E84BD68006A0CE8 /* BarrageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BarrageManager.m; sourceTree = "<group>"; }; | |
| 524 | + D207BE9F1E84C1EC006A0CE8 /* AnimationBaseView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationBaseView.h; sourceTree = "<group>"; }; | |
| 525 | + D207BEA01E84C1EC006A0CE8 /* AnimationBaseView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnimationBaseView.m; sourceTree = "<group>"; }; | |
| 513 | 526 | D217A2451E7B76C7003B44CB /* PresentModelAble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PresentModelAble.h; sourceTree = "<group>"; }; |
| 514 | 527 | D217A2461E7B76C7003B44CB /* PresentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PresentView.h; sourceTree = "<group>"; }; |
| 515 | 528 | D217A2471E7B76C7003B44CB /* PresentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PresentView.m; sourceTree = "<group>"; }; |
| ... | ... | @@ -517,6 +530,8 @@ |
| 517 | 530 | D217A2491E7B76C7003B44CB /* PresentViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PresentViewCell.m; sourceTree = "<group>"; }; |
| 518 | 531 | D217A24C1E7B77C7003B44CB /* ComboCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ComboCell.h; path = Present/ComboCell.h; sourceTree = "<group>"; }; |
| 519 | 532 | D217A24D1E7B77C7003B44CB /* ComboCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ComboCell.m; path = Present/ComboCell.m; sourceTree = "<group>"; }; |
| 533 | + D224B1951E826ED800CC61D0 /* ChatBarrageAnimAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatBarrageAnimAction.h; sourceTree = "<group>"; }; | |
| 534 | + D224B1961E826ED800CC61D0 /* ChatBarrageAnimAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatBarrageAnimAction.m; sourceTree = "<group>"; }; | |
| 520 | 535 | D22830EF1E778C0F00627701 /* LiveBaseView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveBaseView.h; sourceTree = "<group>"; }; |
| 521 | 536 | D22830F01E778C0F00627701 /* LiveBaseView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveBaseView.m; sourceTree = "<group>"; }; |
| 522 | 537 | D22830FA1E77C2D900627701 /* BottomToolView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BottomToolView.h; sourceTree = "<group>"; }; |
| ... | ... | @@ -529,12 +544,16 @@ |
| 529 | 544 | D236967D1E7F9E4100E4BF71 /* GiftPayButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GiftPayButton.m; sourceTree = "<group>"; }; |
| 530 | 545 | D23696821E7FC6A900E4BF71 /* chatListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chatListCell.h; sourceTree = "<group>"; }; |
| 531 | 546 | D23696831E7FC6A900E4BF71 /* chatListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = chatListCell.m; sourceTree = "<group>"; }; |
| 532 | - D23696891E7FC7C200E4BF71 /* CNBarrageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNBarrageManager.h; sourceTree = "<group>"; }; | |
| 533 | - D236968A1E7FC7C200E4BF71 /* CNBarrageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNBarrageManager.m; sourceTree = "<group>"; }; | |
| 534 | - D236968B1E7FC7C200E4BF71 /* CNBarrageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNBarrageView.h; sourceTree = "<group>"; }; | |
| 535 | - D236968C1E7FC7C200E4BF71 /* CNBarrageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNBarrageView.m; sourceTree = "<group>"; }; | |
| 536 | 547 | D23696901E7FC83800E4BF71 /* chatMsgModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chatMsgModel.h; sourceTree = "<group>"; }; |
| 537 | 548 | D23696911E7FC83800E4BF71 /* chatMsgModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = chatMsgModel.m; sourceTree = "<group>"; }; |
| 549 | + D24571561E8393EB00AA85D6 /* UIImageView+ZXExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+ZXExtension.h"; sourceTree = "<group>"; }; | |
| 550 | + D24571571E8393EB00AA85D6 /* UIImageView+ZXExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+ZXExtension.m"; sourceTree = "<group>"; }; | |
| 551 | + D245715A1E83A62B00AA85D6 /* BounceView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BounceView.h; sourceTree = "<group>"; }; | |
| 552 | + D245715B1E83A62B00AA85D6 /* BounceView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BounceView.m; sourceTree = "<group>"; }; | |
| 553 | + D245715D1E83B09900AA85D6 /* userInfoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = userInfoModel.h; sourceTree = "<group>"; }; | |
| 554 | + D245715E1E83B09900AA85D6 /* userInfoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = userInfoModel.m; sourceTree = "<group>"; }; | |
| 555 | + D24571611E83C40B00AA85D6 /* PrivateView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrivateView.h; sourceTree = "<group>"; }; | |
| 556 | + D24571621E83C40B00AA85D6 /* PrivateView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrivateView.m; sourceTree = "<group>"; }; | |
| 538 | 557 | D2552FFE1E7909AC00DF38A5 /* GiftAnimOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GiftAnimOperation.h; sourceTree = "<group>"; }; |
| 539 | 558 | D2552FFF1E7909AC00DF38A5 /* GiftAnimOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GiftAnimOperation.m; sourceTree = "<group>"; }; |
| 540 | 559 | D25530011E79115100DF38A5 /* AnimQueueManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimQueueManager.h; sourceTree = "<group>"; }; |
| ... | ... | @@ -574,8 +593,6 @@ |
| 574 | 593 | D25BF88F1E7F7F8F007FB138 /* UGCLoading.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = UGCLoading.jpeg; sourceTree = "<group>"; }; |
| 575 | 594 | D25BF8911E7FBAEA007FB138 /* LVCUGCBackgroundView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCBackgroundView.h; sourceTree = "<group>"; }; |
| 576 | 595 | D25BF8921E7FBAEA007FB138 /* LVCUGCBackgroundView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCBackgroundView.m; sourceTree = "<group>"; }; |
| 577 | - D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; }; | |
| 578 | - D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; }; | |
| 579 | 596 | D25BF89E1E80C4BD007FB138 /* UIImage+LVCVagueImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+LVCVagueImage.h"; sourceTree = "<group>"; }; |
| 580 | 597 | D25BF89F1E80C4BD007FB138 /* UIImage+LVCVagueImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+LVCVagueImage.m"; sourceTree = "<group>"; }; |
| 581 | 598 | D25BF8A21E80C4FC007FB138 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; |
| ... | ... | @@ -590,8 +607,18 @@ |
| 590 | 607 | D2888DB31E6EC154003A77C8 /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = "<group>"; }; |
| 591 | 608 | D2888DB51E6EC1B8003A77C8 /* LVCMyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCMyViewController.h; sourceTree = "<group>"; }; |
| 592 | 609 | D2888DB61E6EC1B8003A77C8 /* LVCMyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCMyViewController.m; sourceTree = "<group>"; }; |
| 610 | + D29D88461E88C53300543A03 /* LVCUGCLivePrepareView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLivePrepareView.h; sourceTree = "<group>"; }; | |
| 611 | + D29D88471E88C53300543A03 /* LVCUGCLivePrepareView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLivePrepareView.m; sourceTree = "<group>"; }; | |
| 593 | 612 | D2A803061E80BD6F009D6F1C /* TopToolView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TopToolView.h; sourceTree = "<group>"; }; |
| 594 | 613 | D2A803071E80BD6F009D6F1C /* TopToolView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TopToolView.m; sourceTree = "<group>"; }; |
| 614 | + D2B7B24F1E8247D400ED084E /* ChatBarrageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatBarrageManager.h; sourceTree = "<group>"; }; | |
| 615 | + D2B7B2501E8247D400ED084E /* ChatBarrageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatBarrageManager.m; sourceTree = "<group>"; }; | |
| 616 | + D2B7B2521E824B2D00ED084E /* ChatBarrageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatBarrageView.h; sourceTree = "<group>"; }; | |
| 617 | + D2B7B2531E824B2D00ED084E /* ChatBarrageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatBarrageView.m; sourceTree = "<group>"; }; | |
| 618 | + D2B7B2551E8261EF00ED084E /* ChatBarrOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatBarrOperation.h; sourceTree = "<group>"; }; | |
| 619 | + D2B7B2561E8261EF00ED084E /* ChatBarrOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatBarrOperation.m; sourceTree = "<group>"; }; | |
| 620 | + D2D236B21E88F8E600B7C517 /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; }; | |
| 621 | + D2D236B31E88F8E600B7C517 /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; }; | |
| 595 | 622 | /* End PBXFileReference section */ |
| 596 | 623 | |
| 597 | 624 | /* Begin PBXFrameworksBuildPhase section */ |
| ... | ... | @@ -601,11 +628,11 @@ |
| 601 | 628 | files = ( |
| 602 | 629 | D25BF8A31E80C4FC007FB138 /* Accelerate.framework in Frameworks */, |
| 603 | 630 | D2575C7D1E76A4F300E3A8FC /* NHGiftAnimtionSDK.a in Frameworks */, |
| 604 | - D25BF89A1E7FE046007FB138 /* CNLiveChatManager.framework in Frameworks */, | |
| 605 | - D25BF8971E7FE01B007FB138 /* CNLiveMsgTools.framework in Frameworks */, | |
| 606 | - D25BF8991E7FE033007FB138 /* CNLiveChatManager.framework in Frameworks */, | |
| 607 | - D25BF89C1E7FE049007FB138 /* CNLiveMsgTools.framework in Frameworks */, | |
| 631 | + D2B2ED7C1E88F90F00F7538A /* CNLiveMsgTools.framework in Frameworks */, | |
| 632 | + D2B2ED7A1E88F90C00F7538A /* CNLiveChatManager.framework in Frameworks */, | |
| 633 | + D2D236B51E88F8E600B7C517 /* CNLiveMsgTools.framework in Frameworks */, | |
| 608 | 634 | 811BB6831E8106A2005C6291 /* CNLivePlayerSDK.framework in Frameworks */, |
| 635 | + D2D236B41E88F8E600B7C517 /* CNLiveChatManager.framework in Frameworks */, | |
| 609 | 636 | ); |
| 610 | 637 | runOnlyForDeploymentPostprocessing = 0; |
| 611 | 638 | }; |
| ... | ... | @@ -674,20 +701,12 @@ |
| 674 | 701 | path = ../ChatView; |
| 675 | 702 | sourceTree = "<group>"; |
| 676 | 703 | }; |
| 677 | - 812E504D1E769995004F5FCD /* CNLiveSDK */ = { | |
| 678 | - isa = PBXGroup; | |
| 679 | - children = ( | |
| 680 | - ); | |
| 681 | - name = CNLiveSDK; | |
| 682 | - path = LiveVideoCloud/Classes/CNLiveSDK; | |
| 683 | - sourceTree = SOURCE_ROOT; | |
| 684 | - }; | |
| 685 | 704 | 812E504E1E7699B9004F5FCD /* CNLiveSDK */ = { |
| 686 | 705 | isa = PBXGroup; |
| 687 | 706 | children = ( |
| 707 | + D2D236B21E88F8E600B7C517 /* CNLiveChatManager.framework */, | |
| 708 | + D2D236B31E88F8E600B7C517 /* CNLiveMsgTools.framework */, | |
| 688 | 709 | 811BB6821E8106A2005C6291 /* CNLivePlayerSDK.framework */, |
| 689 | - D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */, | |
| 690 | - D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */, | |
| 691 | 710 | D25BF87C1E7B8C78007FB138 /* KSYGPUResource.bundle */, |
| 692 | 711 | ); |
| 693 | 712 | path = CNLiveSDK; |
| ... | ... | @@ -834,7 +853,6 @@ |
| 834 | 853 | D2029BD11E6EADE10027CD92 /* Helpers */ = { |
| 835 | 854 | isa = PBXGroup; |
| 836 | 855 | children = ( |
| 837 | - 812E504D1E769995004F5FCD /* CNLiveSDK */, | |
| 838 | 856 | D2029BD21E6EADE10027CD92 /* Tools.h */, |
| 839 | 857 | D2029BD31E6EADE10027CD92 /* Tools.m */, |
| 840 | 858 | ); |
| ... | ... | @@ -1221,6 +1239,8 @@ |
| 1221 | 1239 | children = ( |
| 1222 | 1240 | 81A483061E88B6140097A80A /* UIView+ViewController.h */, |
| 1223 | 1241 | 81A483071E88B6140097A80A /* UIView+ViewController.m */, |
| 1242 | + D24571561E8393EB00AA85D6 /* UIImageView+ZXExtension.h */, | |
| 1243 | + D24571571E8393EB00AA85D6 /* UIImageView+ZXExtension.m */, | |
| 1224 | 1244 | 811BB68C1E8116C8005C6291 /* NSString+StringSize.h */, |
| 1225 | 1245 | 811BB68D1E8116C8005C6291 /* NSString+StringSize.m */, |
| 1226 | 1246 | D2029CDE1E6EAE2E0027CD92 /* NSNumber+ScaleHeight.h */, |
| ... | ... | @@ -1301,6 +1321,15 @@ |
| 1301 | 1321 | path = AppDelegate; |
| 1302 | 1322 | sourceTree = "<group>"; |
| 1303 | 1323 | }; |
| 1324 | + D207BE9B1E84BD3E006A0CE8 /* BarrageManager */ = { | |
| 1325 | + isa = PBXGroup; | |
| 1326 | + children = ( | |
| 1327 | + D207BE9C1E84BD68006A0CE8 /* BarrageManager.h */, | |
| 1328 | + D207BE9D1E84BD68006A0CE8 /* BarrageManager.m */, | |
| 1329 | + ); | |
| 1330 | + path = BarrageManager; | |
| 1331 | + sourceTree = "<group>"; | |
| 1332 | + }; | |
| 1304 | 1333 | D217A2441E7B76C7003B44CB /* Present */ = { |
| 1305 | 1334 | isa = PBXGroup; |
| 1306 | 1335 | children = ( |
| ... | ... | @@ -1327,7 +1356,8 @@ |
| 1327 | 1356 | D22830F61E77C26C00627701 /* Chat */ = { |
| 1328 | 1357 | isa = PBXGroup; |
| 1329 | 1358 | children = ( |
| 1330 | - D23696881E7FC7C200E4BF71 /* Barrage */, | |
| 1359 | + D207BE9B1E84BD3E006A0CE8 /* BarrageManager */, | |
| 1360 | + D2B7B24E1E8247B500ED084E /* ChatBarrageManager */, | |
| 1331 | 1361 | D236968F1E7FC83800E4BF71 /* ChatMsgModel */, |
| 1332 | 1362 | D22830F71E77C27A00627701 /* ChatViews */, |
| 1333 | 1363 | ); |
| ... | ... | @@ -1370,32 +1400,45 @@ |
| 1370 | 1400 | path = GiftModel; |
| 1371 | 1401 | sourceTree = "<group>"; |
| 1372 | 1402 | }; |
| 1373 | - D23696881E7FC7C200E4BF71 /* Barrage */ = { | |
| 1403 | + D236968F1E7FC83800E4BF71 /* ChatMsgModel */ = { | |
| 1374 | 1404 | isa = PBXGroup; |
| 1375 | 1405 | children = ( |
| 1376 | - D23696891E7FC7C200E4BF71 /* CNBarrageManager.h */, | |
| 1377 | - D236968A1E7FC7C200E4BF71 /* CNBarrageManager.m */, | |
| 1378 | - D236968B1E7FC7C200E4BF71 /* CNBarrageView.h */, | |
| 1379 | - D236968C1E7FC7C200E4BF71 /* CNBarrageView.m */, | |
| 1406 | + D23696901E7FC83800E4BF71 /* chatMsgModel.h */, | |
| 1407 | + D23696911E7FC83800E4BF71 /* chatMsgModel.m */, | |
| 1380 | 1408 | ); |
| 1381 | - path = Barrage; | |
| 1409 | + path = ChatMsgModel; | |
| 1382 | 1410 | sourceTree = "<group>"; |
| 1383 | 1411 | }; |
| 1384 | - D236968F1E7FC83800E4BF71 /* ChatMsgModel */ = { | |
| 1412 | + D24571591E83A61E00AA85D6 /* BounceView */ = { | |
| 1385 | 1413 | isa = PBXGroup; |
| 1386 | 1414 | children = ( |
| 1387 | - D23696901E7FC83800E4BF71 /* chatMsgModel.h */, | |
| 1388 | - D23696911E7FC83800E4BF71 /* chatMsgModel.m */, | |
| 1415 | + D245715A1E83A62B00AA85D6 /* BounceView.h */, | |
| 1416 | + D245715B1E83A62B00AA85D6 /* BounceView.m */, | |
| 1389 | 1417 | ); |
| 1390 | - path = ChatMsgModel; | |
| 1418 | + name = BounceView; | |
| 1419 | + sourceTree = "<group>"; | |
| 1420 | + }; | |
| 1421 | + D24571601E83C3F900AA85D6 /* PrivateView */ = { | |
| 1422 | + isa = PBXGroup; | |
| 1423 | + children = ( | |
| 1424 | + D24571611E83C40B00AA85D6 /* PrivateView.h */, | |
| 1425 | + D24571621E83C40B00AA85D6 /* PrivateView.m */, | |
| 1426 | + ); | |
| 1427 | + path = PrivateView; | |
| 1391 | 1428 | sourceTree = "<group>"; |
| 1392 | 1429 | }; |
| 1393 | 1430 | D2575C431E76846900E3A8FC /* InteractionSections */ = { |
| 1394 | 1431 | isa = PBXGroup; |
| 1395 | 1432 | children = ( |
| 1433 | + D24571601E83C3F900AA85D6 /* PrivateView */, | |
| 1434 | + D24571591E83A61E00AA85D6 /* BounceView */, | |
| 1396 | 1435 | D22830F91E77C2D900627701 /* BottomToolView */, |
| 1397 | 1436 | D22830F81E77C2A700627701 /* TopToolView */, |
| 1398 | 1437 | D22830F61E77C26C00627701 /* Chat */, |
| 1438 | + D245715D1E83B09900AA85D6 /* userInfoModel.h */, | |
| 1439 | + D245715E1E83B09900AA85D6 /* userInfoModel.m */, | |
| 1440 | + D207BE9F1E84C1EC006A0CE8 /* AnimationBaseView.h */, | |
| 1441 | + D207BEA01E84C1EC006A0CE8 /* AnimationBaseView.m */, | |
| 1399 | 1442 | D22830EF1E778C0F00627701 /* LiveBaseView.h */, |
| 1400 | 1443 | D22830F01E778C0F00627701 /* LiveBaseView.m */, |
| 1401 | 1444 | D2575C651E76A25400E3A8FC /* LVCInteractionController.h */, |
| ... | ... | @@ -1472,6 +1515,8 @@ |
| 1472 | 1515 | D25BF8771E7B8A82007FB138 /* FilterFunctionView.m */, |
| 1473 | 1516 | D25BF8781E7B8A82007FB138 /* SliderView.h */, |
| 1474 | 1517 | D25BF8791E7B8A82007FB138 /* SliderView.m */, |
| 1518 | + D29D88461E88C53300543A03 /* LVCUGCLivePrepareView.h */, | |
| 1519 | + D29D88471E88C53300543A03 /* LVCUGCLivePrepareView.m */, | |
| 1475 | 1520 | ); |
| 1476 | 1521 | path = View; |
| 1477 | 1522 | sourceTree = "<group>"; |
| ... | ... | @@ -1643,6 +1688,21 @@ |
| 1643 | 1688 | path = View; |
| 1644 | 1689 | sourceTree = "<group>"; |
| 1645 | 1690 | }; |
| 1691 | + D2B7B24E1E8247B500ED084E /* ChatBarrageManager */ = { | |
| 1692 | + isa = PBXGroup; | |
| 1693 | + children = ( | |
| 1694 | + D2B7B2551E8261EF00ED084E /* ChatBarrOperation.h */, | |
| 1695 | + D2B7B2561E8261EF00ED084E /* ChatBarrOperation.m */, | |
| 1696 | + D2B7B24F1E8247D400ED084E /* ChatBarrageManager.h */, | |
| 1697 | + D2B7B2501E8247D400ED084E /* ChatBarrageManager.m */, | |
| 1698 | + D2B7B2521E824B2D00ED084E /* ChatBarrageView.h */, | |
| 1699 | + D2B7B2531E824B2D00ED084E /* ChatBarrageView.m */, | |
| 1700 | + D224B1951E826ED800CC61D0 /* ChatBarrageAnimAction.h */, | |
| 1701 | + D224B1961E826ED800CC61D0 /* ChatBarrageAnimAction.m */, | |
| 1702 | + ); | |
| 1703 | + path = ChatBarrageManager; | |
| 1704 | + sourceTree = "<group>"; | |
| 1705 | + }; | |
| 1646 | 1706 | /* End PBXGroup section */ |
| 1647 | 1707 | |
| 1648 | 1708 | /* Begin PBXNativeTarget section */ |
| ... | ... | @@ -1799,6 +1859,7 @@ |
| 1799 | 1859 | D2029CBB1E6EADE10027CD92 /* SDWebImageDownloader.m in Sources */, |
| 1800 | 1860 | D2029CA71E6EADE10027CD92 /* MJRefreshAutoGifFooter.m in Sources */, |
| 1801 | 1861 | D2029CC11E6EADE10027CD92 /* UIImage+MultiFormat.m in Sources */, |
| 1862 | + D245715F1E83B09900AA85D6 /* userInfoModel.m in Sources */, | |
| 1802 | 1863 | D2029C861E6EADE10027CD92 /* Tools.m in Sources */, |
| 1803 | 1864 | D25BF8931E7FBAEA007FB138 /* LVCUGCBackgroundView.m in Sources */, |
| 1804 | 1865 | D2029CA01E6EADE10027CD92 /* NSObject+MJProperty.m in Sources */, |
| ... | ... | @@ -1830,6 +1891,7 @@ |
| 1830 | 1891 | D2888DB71E6EC1B8003A77C8 /* LVCMyViewController.m in Sources */, |
| 1831 | 1892 | D2029CBE1E6EADE10027CD92 /* SDWebImagePrefetcher.m in Sources */, |
| 1832 | 1893 | D2A803081E80BD6F009D6F1C /* TopToolView.m in Sources */, |
| 1894 | + D2B7B2571E8261EF00ED084E /* ChatBarrOperation.m in Sources */, | |
| 1833 | 1895 | 810B65011E779B1F00133E15 /* MASLayoutConstraint.m in Sources */, |
| 1834 | 1896 | D2029CCE1E6EADE10027CD92 /* SearchRecomListModel.m in Sources */, |
| 1835 | 1897 | D2029CA11E6EADE10027CD92 /* NSString+MJExtension.m in Sources */, |
| ... | ... | @@ -1872,6 +1934,7 @@ |
| 1872 | 1934 | 811BB68E1E8116C8005C6291 /* NSString+StringSize.m in Sources */, |
| 1873 | 1935 | D2029C8B1E6EADE10027CD92 /* AFURLResponseSerialization.m in Sources */, |
| 1874 | 1936 | D2029C921E6EADE10027CD92 /* UIImageView+AFNetworking.m in Sources */, |
| 1937 | + D224B1971E826ED800CC61D0 /* ChatBarrageAnimAction.m in Sources */, | |
| 1875 | 1938 | D2029C9E1E6EADE10027CD92 /* NSObject+MJCoding.m in Sources */, |
| 1876 | 1939 | 81A483021E88B0130097A80A /* LVCChatRoomModel.m in Sources */, |
| 1877 | 1940 | D2029C991E6EADE10027CD92 /* MJFoundation.m in Sources */, |
| ... | ... | @@ -1889,6 +1952,7 @@ |
| 1889 | 1952 | D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */, |
| 1890 | 1953 | 81A483011E88B0130097A80A /* LVCBannerModel.m in Sources */, |
| 1891 | 1954 | 810B65021E779B1F00133E15 /* MASViewAttribute.m in Sources */, |
| 1955 | + D2B7B2511E8247D400ED084E /* ChatBarrageManager.m in Sources */, | |
| 1892 | 1956 | D2029CAC1E6EADE10027CD92 /* MJRefreshBackStateFooter.m in Sources */, |
| 1893 | 1957 | D2029CB11E6EADE10027CD92 /* MJRefreshConst.m in Sources */, |
| 1894 | 1958 | D2029CAD1E6EADE10027CD92 /* MJRefreshGifHeader.m in Sources */, |
| ... | ... | @@ -1896,6 +1960,7 @@ |
| 1896 | 1960 | D2029CB31E6EADE10027CD92 /* UIScrollView+MJRefresh.m in Sources */, |
| 1897 | 1961 | D2029D051E6EAE2E0027CD92 /* UILabel+labelFitSize.m in Sources */, |
| 1898 | 1962 | D2029CB21E6EADE10027CD92 /* UIScrollView+MJExtension.m in Sources */, |
| 1963 | + D29D88481E88C53300543A03 /* LVCUGCLivePrepareView.m in Sources */, | |
| 1899 | 1964 | D2029D091E6EAE2E0027CD92 /* Foundation+Log.m in Sources */, |
| 1900 | 1965 | D2029C8E1E6EADE10027CD92 /* AFImageDownloader.m in Sources */, |
| 1901 | 1966 | 81A483201E88F4BF0097A80A /* LVCProgramModel.m in Sources */, |
| ... | ... | @@ -1905,6 +1970,7 @@ |
| 1905 | 1970 | 81A4830B1E88B7EE0097A80A /* LVCOtherHeaderReusableView.m in Sources */, |
| 1906 | 1971 | D25BF8801E7BD266007FB138 /* LVCUGCLivePlayerController.m in Sources */, |
| 1907 | 1972 | D2029D031E6EAE2E0027CD92 /* UIImage+ZXExtension.m in Sources */, |
| 1973 | + D24571581E8393EB00AA85D6 /* UIImageView+ZXExtension.m in Sources */, | |
| 1908 | 1974 | D2029D0A1E6EAE2E0027CD92 /* ZXServerUrl.m in Sources */, |
| 1909 | 1975 | D2029CCA1E6EADE10027CD92 /* SVProgressHUD.m in Sources */, |
| 1910 | 1976 | 81A483051E88B32C0097A80A /* LVCHeaderRollCollectionViewCell.m in Sources */, |
| ... | ... | @@ -1913,14 +1979,16 @@ |
| 1913 | 1979 | D217A24A1E7B76C7003B44CB /* PresentView.m in Sources */, |
| 1914 | 1980 | D22830F11E778C0F00627701 /* LiveBaseView.m in Sources */, |
| 1915 | 1981 | D2029CBA1E6EADE10027CD92 /* SDWebImageDecoder.m in Sources */, |
| 1982 | + D207BE9E1E84BD68006A0CE8 /* BarrageManager.m in Sources */, | |
| 1916 | 1983 | 8112D4311E7927A5002E00F6 /* LVCPlayerLoadingView.m in Sources */, |
| 1917 | 1984 | D2029D081E6EAE2E0027CD92 /* ZXDeviceInfo.m in Sources */, |
| 1985 | + D24571631E83C40B00AA85D6 /* PrivateView.m in Sources */, | |
| 1918 | 1986 | D2029CC21E6EADE10027CD92 /* UIImage+WebP.m in Sources */, |
| 1919 | 1987 | D2029BCD1E6EADD70027CD92 /* BaseViewController.m in Sources */, |
| 1920 | 1988 | 810B64E01E779AE900133E15 /* LVCPlayer.m in Sources */, |
| 1921 | 1989 | 810B64FF1E779B1F00133E15 /* MASConstraint.m in Sources */, |
| 1922 | - D236968E1E7FC7C200E4BF71 /* CNBarrageView.m in Sources */, | |
| 1923 | 1990 | D25BF87A1E7B8A82007FB138 /* FilterFunctionView.m in Sources */, |
| 1991 | + D207BEA11E84C1EC006A0CE8 /* AnimationBaseView.m in Sources */, | |
| 1924 | 1992 | D2029D001E6EAE2E0027CD92 /* NSNumber+ScaleHeight.m in Sources */, |
| 1925 | 1993 | D2888D9E1E6EBF1B003A77C8 /* LVCLiveViewController.m in Sources */, |
| 1926 | 1994 | D2029C951E6EADE10027CD92 /* UIWebView+AFNetworking.m in Sources */, |
| ... | ... | @@ -1938,10 +2006,12 @@ |
| 1938 | 2006 | D2029CCF1E6EADE10027CD92 /* SearchHttp.m in Sources */, |
| 1939 | 2007 | 810B65001E779B1F00133E15 /* MASConstraintMaker.m in Sources */, |
| 1940 | 2008 | D2029C881E6EADE10027CD92 /* AFNetworkReachabilityManager.m in Sources */, |
| 2009 | + D245715C1E83A62B00AA85D6 /* BounceView.m in Sources */, | |
| 1941 | 2010 | D2029D021E6EAE2E0027CD92 /* UIImage+ScaleImageSize.m in Sources */, |
| 1942 | 2011 | D2029BCC1E6EADD70027CD92 /* BaseView.m in Sources */, |
| 1943 | 2012 | D2888D941E6EB8B4003A77C8 /* LVCTabBar.m in Sources */, |
| 1944 | 2013 | D2888DB41E6EC154003A77C8 /* HomeViewController.m in Sources */, |
| 2014 | + D2B7B2541E824B2D00ED084E /* ChatBarrageView.m in Sources */, | |
| 1945 | 2015 | D25530061E7911A800DF38A5 /* GiftAnimationAction.m in Sources */, |
| 1946 | 2016 | 81A483171E88BED00097A80A /* LVCTVLiveViewController.m in Sources */, |
| 1947 | 2017 | 81A1B9A91E8277410079FF5F /* LVCInputView.m in Sources */, | ... | ... |
LiveVideoCloud/LiveVideoCloud/AppDelegate/AppDelegate.m
| ... | ... | @@ -37,9 +37,9 @@ |
| 37 | 37 | |
| 38 | 38 | [[CNLiveChatManager sharedCNLiveChatManager] initWithAppKey:AppKey appId:AppId]; |
| 39 | 39 | [[CNLiveChatManager sharedCNLiveChatManager] connectServerSuccess:^{ |
| 40 | - | |
| 40 | + NSLog(@"connectSuccess"); | |
| 41 | 41 | } error:^(CNLiveChatConnectErrorCode errors) { |
| 42 | - | |
| 42 | + NSLog(@"errors%ld",errors); | |
| 43 | 43 | }]; |
| 44 | 44 | |
| 45 | 45 | return YES; | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/CNLiveChatManager
No preview for this file type
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Headers/CNLiveChatMessage.h
| ... | ... | @@ -20,17 +20,17 @@ |
| 20 | 20 | /** |
| 21 | 21 | 目标ID(消息来自聊天室的ID / 接收者ID) |
| 22 | 22 | */ |
| 23 | -@property (nonatomic, assign) NSString *targetId; | |
| 23 | +@property (nonatomic, copy) NSString *targetId; | |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | 消息ID(本地存储的消息的唯一值(数据库索引唯一值)) |
| 27 | 27 | */ |
| 28 | -@property (nonatomic, assign) NSString *messageId; | |
| 28 | +@property (nonatomic, copy) NSString *messageId; | |
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | 消息内容 |
| 32 | 32 | */ |
| 33 | -@property (nonatomic, strong) NSString *messageContent; | |
| 33 | +@property (nonatomic, copy) NSString *messageContent; | |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | 发送者的用户信息(userId, name, portraitUri) | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Headers/CNLiveChatUserInfo.h
| ... | ... | @@ -13,17 +13,17 @@ |
| 13 | 13 | /*! |
| 14 | 14 | 用户ID(一旦以一个用户ID连接到服务器,就不能再修改用户ID了,如果修改也会被忽略) |
| 15 | 15 | */ |
| 16 | -@property(nonatomic, strong, readonly) NSString *userId; | |
| 16 | +@property(nonatomic, copy, readonly) NSString *userId; | |
| 17 | 17 | |
| 18 | 18 | /*! |
| 19 | 19 | 用户名称 |
| 20 | 20 | */ |
| 21 | -@property(nonatomic, strong) NSString *name; | |
| 21 | +@property(nonatomic, copy) NSString *name; | |
| 22 | 22 | |
| 23 | 23 | /*! |
| 24 | 24 | 用户头像的URL |
| 25 | 25 | */ |
| 26 | -@property(nonatomic, strong) NSString *portraitUri; | |
| 26 | +@property(nonatomic, copy) NSString *portraitUri; | |
| 27 | 27 | |
| 28 | 28 | /*! |
| 29 | 29 | 用户信息的初始化方法, | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Modules/module.modulemap deleted
100644 → 0
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveMsgTools.framework/CNLiveMsgTools
No preview for this file type
LiveVideoCloud/LiveVideoCloud/Classes/Helpers/Tools.h
| ... | ... | @@ -8,6 +8,8 @@ |
| 8 | 8 | |
| 9 | 9 | #import <Foundation/Foundation.h> |
| 10 | 10 | |
| 11 | +@class userInfoModel; | |
| 12 | + | |
| 11 | 13 | @interface Tools : NSObject |
| 12 | 14 | |
| 13 | 15 | |
| ... | ... | @@ -19,12 +21,15 @@ typedef NS_ENUM(NSInteger, ShowMessageType) {//消息背景类型 |
| 19 | 21 | /** |
| 20 | 22 | 弹出页 |
| 21 | 23 | |
| 22 | - @param message 出框展示消息 | |
| 23 | - @param imageName 弹出框内图片名称 | |
| 24 | - @param view 将弹出框添加到的视图 | |
| 25 | - @param showMessageType 背景类型 | |
| 26 | 24 | @param callBackBlock 弹出框消失时回调 |
| 27 | 25 | */ |
| 28 | -+ (void)showBouncedWithMessage:(NSString *_Nullable)message leftImageName:(NSString *_Nonnull)imageName toView:(UIView *_Nullable)view showMessageType:(ShowMessageType)showMessageType callBackBlock:(void (^ _Nullable)())callBackBlock; | |
| 26 | ++ (void)showBouncedWithModel:(userInfoModel *_Nullable)model callBackBlock:(void (^ _Nullable)(UIView * _Nullable bounceView))callBackBlock; | |
| 27 | + | |
| 28 | ++ (void)closeBouces; | |
| 29 | + | |
| 30 | ++ (NSString *_Nullable)dictionaryToJson:(NSDictionary *_Nullable)dic; | |
| 31 | + | |
| 32 | ++ (NSDictionary *_Nullable)dictionaryWithJsonString:(NSString *_Nullable)jsonString; | |
| 33 | + | |
| 29 | 34 | |
| 30 | 35 | @end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Helpers/Tools.m
| ... | ... | @@ -7,77 +7,117 @@ |
| 7 | 7 | // |
| 8 | 8 | |
| 9 | 9 | #import "Tools.h" |
| 10 | +#import "BounceView.h" | |
| 11 | +#import "userInfoModel.h" | |
| 12 | + | |
| 13 | +@interface Tools () | |
| 14 | + | |
| 15 | + | |
| 16 | +@end | |
| 10 | 17 | |
| 11 | 18 | @implementation Tools |
| 12 | 19 | |
| 13 | 20 | /** |
| 14 | 21 | 弹出页 |
| 15 | 22 | |
| 16 | - @param message 出框展示消息 | |
| 17 | - @param imageName 弹出框内图片名称 | |
| 18 | - @param view 将弹出框添加到的视图 | |
| 19 | - @param showMessageType 背景类型 | |
| 20 | 23 | @param callBackBlock 弹出框消失时回调 |
| 21 | 24 | */ |
| 22 | -+ (void)showBouncedWithMessage:(NSString *_Nullable)message leftImageName:(NSString *_Nonnull)imageName toView:(UIView *_Nullable)view showMessageType:(ShowMessageType)showMessageType callBackBlock:(void (^ _Nullable)())callBackBlock | |
| 25 | ++ (void)showBouncedWithModel:(userInfoModel *)model callBackBlock:(void (^ _Nullable)(UIView * _Nullable bounceView))callBackBlock | |
| 23 | 26 | { |
| 24 | - UIImageView *toView = [[UIImageView alloc] initWithFrame:view.bounds]; | |
| 25 | - switch (showMessageType) { | |
| 26 | - case ShowMessageTypeClear: | |
| 27 | - { | |
| 28 | - | |
| 29 | - } | |
| 30 | - break; | |
| 31 | - case ShowMessageTypeBlack: | |
| 32 | - { | |
| 33 | - toView.image = [UIImage imageNamed:@"整屏黑蒙版"]; | |
| 34 | - } | |
| 35 | - break; | |
| 36 | - default: | |
| 37 | - break; | |
| 38 | - } | |
| 39 | - [view addSubview:toView]; | |
| 27 | + UIImageView *toView = [[UIImageView alloc] initWithFrame:[UIApplication sharedApplication].keyWindow.bounds];//keyWindow | |
| 28 | + toView.backgroundColor = [UIColor clearColor]; | |
| 29 | + toView.userInteractionEnabled = YES; | |
| 30 | + [[UIApplication sharedApplication].keyWindow addSubview:toView]; | |
| 31 | + // UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapClick:)]; | |
| 40 | 32 | |
| 41 | - UIImageView *centerView = [[UIImageView alloc] initWithFrame:CGRectMake(100, SCREEN_HEIGHT, 150, 50)]; | |
| 42 | - centerView.centerX = toView.centerX; | |
| 43 | - centerView.image = [UIImage imageNamed:@"提示背景50"]; | |
| 44 | - [toView addSubview:centerView]; | |
| 45 | - | |
| 46 | - UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:imageName]]; | |
| 47 | - imageView.width = imageView.width * 0.5; | |
| 48 | - imageView.height = imageView.height * 0.5; | |
| 49 | - imageView.centerY = centerView.height * 0.5; | |
| 50 | - [centerView addSubview:imageView]; | |
| 51 | - | |
| 52 | - UILabel *titleLabel = [[UILabel alloc] init]; | |
| 53 | - titleLabel.text = message; | |
| 54 | - titleLabel.textColor = [UIColor whiteColor]; | |
| 55 | - titleLabel.font = kTitleLabelFont; | |
| 56 | - titleLabel.frame = CGRectMake(5, 10, [titleLabel labelSize].width, [titleLabel labelSize].height); | |
| 57 | - titleLabel.centerY = centerView.height * 0.5; | |
| 58 | - CGFloat left =(centerView.width - [titleLabel labelSize].width - 5 - imageView.width) * 0.5; | |
| 59 | - imageView.left = left; | |
| 60 | - titleLabel.left = imageView.right + 5; | |
| 61 | - [centerView addSubview:titleLabel]; | |
| 62 | - | |
| 63 | - NSTimer *newTimer = [NSTimer timerWithTimeInterval:2.0 repeats:NO block:^(NSTimer * _Nonnull timer) { | |
| 64 | - [UIView animateWithDuration:0.75 animations:^{ | |
| 65 | - centerView.top = SCREEN_HEIGHT; | |
| 66 | - | |
| 67 | - } completion:^(BOOL finished) { | |
| 68 | - [toView removeFromSuperview]; | |
| 69 | - [centerView removeFromSuperview]; | |
| 70 | - callBackBlock(); | |
| 71 | - }]; | |
| 72 | - }]; | |
| 73 | - [[NSRunLoop currentRunLoop] addTimer:newTimer forMode:NSRunLoopCommonModes]; | |
| 74 | - | |
| 75 | - [UIView animateWithDuration:0.75 animations:^{ | |
| 76 | - centerView.centerY = toView.centerY; | |
| 33 | + BounceView *bounceView = [BounceView bounceView]; | |
| 34 | + bounceView.model = model; | |
| 35 | + bounceView.centerX = toView.centerX; | |
| 36 | + [toView addSubview:bounceView]; | |
| 37 | + | |
| 38 | + [UIView animateWithDuration:0.5 animations:^{ | |
| 39 | + bounceView.centerY = toView.centerY; | |
| 77 | 40 | |
| 78 | 41 | } completion:^(BOOL finished) { |
| 42 | + callBackBlock(bounceView); | |
| 43 | + }]; | |
| 44 | +} | |
| 45 | + | |
| 46 | + | |
| 47 | +//+ (void)btnClick | |
| 48 | +//{ | |
| 49 | +// NSLog(@"btnClick"); | |
| 50 | +//// BounceView *bounceView = [BounceView bounceView]; | |
| 51 | +//// [UIView animateWithDuration:0.25 animations:^{ | |
| 52 | +//// bounceView.top = SCREEN_HEIGHT; | |
| 53 | +//// | |
| 54 | +//// } completion:^(BOOL finished) { | |
| 55 | +//// [bounceView.superview removeFromSuperview]; | |
| 56 | +//// [bounceView removeFromSuperview]; | |
| 57 | +//// }]; | |
| 58 | +//} | |
| 59 | + | |
| 60 | +//+ (void)tapClick:(UITapGestureRecognizer *)gesture | |
| 61 | +//{ | |
| 62 | +// NSLog(@"taptaptaptaptap"); | |
| 63 | +// UIView *view = gesture.view; | |
| 64 | +//// if (view.tag == 1000 && [view isKindOfClass:[UIImageView class]]) { | |
| 65 | +// [UIView animateWithDuration:0.25 animations:^{ | |
| 66 | +// gesture.view.top = SCREEN_HEIGHT; | |
| 67 | +// | |
| 68 | +// } completion:^(BOOL finished) { | |
| 69 | +// [gesture.view removeFromSuperview]; | |
| 70 | +// }]; | |
| 71 | +//// } | |
| 72 | +//} | |
| 73 | + | |
| 74 | ++ (void)closeBouces | |
| 75 | +{ | |
| 76 | + BounceView *bounceView = [BounceView bounceView]; | |
| 77 | + [UIView animateWithDuration:0.25 animations:^{ | |
| 78 | + bounceView.top = SCREEN_HEIGHT; | |
| 79 | 79 | |
| 80 | + } completion:^(BOOL finished) { | |
| 81 | + [bounceView.superview removeFromSuperview]; | |
| 82 | + [bounceView removeFromSuperview]; | |
| 80 | 83 | }]; |
| 81 | 84 | } |
| 82 | 85 | |
| 86 | +/** | |
| 87 | + 把字典转换成格式化的JSON格式的字符串 | |
| 88 | + | |
| 89 | + @param dic 字典 | |
| 90 | + @return JSON格式的字符串 | |
| 91 | + */ | |
| 92 | ++ (NSString *_Nullable)dictionaryToJson:(NSDictionary *_Nullable)dic | |
| 93 | +{ | |
| 94 | + NSError *parseError = nil; | |
| 95 | + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:dic options:NSJSONWritingPrettyPrinted error:&parseError]; | |
| 96 | + return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; | |
| 97 | +} | |
| 98 | + | |
| 99 | +/** | |
| 100 | + 把格式化的JSON格式的字符串转换成字典 | |
| 101 | + | |
| 102 | + @param jsonString JSON格式的字符串 | |
| 103 | + @return 返回字典 | |
| 104 | + */ | |
| 105 | ++ (NSDictionary *_Nullable)dictionaryWithJsonString:(NSString *_Nullable)jsonString { | |
| 106 | + if (jsonString == nil) { | |
| 107 | + return nil; | |
| 108 | + } | |
| 109 | + | |
| 110 | + NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; | |
| 111 | + NSError *err; | |
| 112 | + NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData | |
| 113 | + options:NSJSONReadingMutableContainers | |
| 114 | + error:&err]; | |
| 115 | + if(err) { | |
| 116 | + NSLog(@"json解析失败:%@",err); | |
| 117 | + return nil; | |
| 118 | + } | |
| 119 | + return dic; | |
| 120 | +} | |
| 121 | + | |
| 122 | + | |
| 83 | 123 | @end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/AnimationBaseView.h
0 → 100644
| 1 | +// | |
| 2 | +// AnimationBaseView.h | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/24. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | +#import "ChatBarrageView.h" | |
| 11 | + | |
| 12 | +@protocol TouchPointDelegate <NSObject> | |
| 13 | + | |
| 14 | +- (void)touchPoint:(CGPoint)touchPoint; | |
| 15 | + | |
| 16 | +@end | |
| 17 | + | |
| 18 | +@interface AnimationBaseView : UIView | |
| 19 | +@property (nonatomic ,assign) BOOL isBarrage;//是否在执行动画 | |
| 20 | +@property (nonatomic ,strong) ChatBarrageView * _Nullable barrageView; | |
| 21 | +@property (nonatomic)_Nonnull id <TouchPointDelegate> delegate; | |
| 22 | + | |
| 23 | + | |
| 24 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/AnimationBaseView.m
0 → 100644
| 1 | +// | |
| 2 | +// AnimationBaseView.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/24. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "AnimationBaseView.h" | |
| 10 | +#import "ChatBarrageView.h" | |
| 11 | + | |
| 12 | +@implementation AnimationBaseView | |
| 13 | + | |
| 14 | +- (instancetype)initWithFrame:(CGRect)frame | |
| 15 | +{ | |
| 16 | + if (self = [super initWithFrame:frame]) { | |
| 17 | + self.backgroundColor = [UIColor redColor]; | |
| 18 | + self.clipsToBounds = YES; | |
| 19 | + } | |
| 20 | + return self; | |
| 21 | +} | |
| 22 | + | |
| 23 | +- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { | |
| 24 | + UIView *view = [super hitTest:point withEvent:event]; | |
| 25 | + | |
| 26 | +// for (UIView *v in [UIApplication sharedApplication].keyWindow.subviews) { | |
| 27 | +// if (v.tag == 1000) { | |
| 28 | +// NSLog(@"添加过了"); | |
| 29 | +// return view; | |
| 30 | +// } | |
| 31 | +// } | |
| 32 | + if (self.isBarrage) { | |
| 33 | + NSLog(@"point:%@\n",NSStringFromCGPoint(point)); | |
| 34 | + | |
| 35 | + if ([self.delegate respondsToSelector:@selector(touchPoint:)]) { | |
| 36 | + [self.delegate touchPoint:point]; | |
| 37 | + } | |
| 38 | + } | |
| 39 | + return view; | |
| 40 | +} | |
| 41 | + | |
| 42 | + | |
| 43 | +/* | |
| 44 | +// Only override drawRect: if you perform custom drawing. | |
| 45 | +// An empty implementation adversely affects performance during animation. | |
| 46 | +- (void)drawRect:(CGRect)rect { | |
| 47 | + // Drawing code | |
| 48 | +} | |
| 49 | +*/ | |
| 50 | + | |
| 51 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/BottomToolView/BottomToolView.m
| ... | ... | @@ -71,8 +71,8 @@ |
| 71 | 71 | { |
| 72 | 72 | UIButton *privateChatBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 73 | 73 | privateChatBtn.frame = CGRectMake(self.width*0.5 - 50, (self.height - 45)*0.5, 45, 45); |
| 74 | - [privateChatBtn setBackgroundImage:[UIImage imageNamed:@"LiveChatNormal"] forState:UIControlStateNormal]; | |
| 75 | - [privateChatBtn setBackgroundImage:[UIImage imageNamed:@"LiveChatTouch"] forState:UIControlStateHighlighted]; | |
| 74 | + [privateChatBtn setBackgroundImage:[UIImage imageNamed:@"privateChat.png"] forState:UIControlStateNormal]; | |
| 75 | + [privateChatBtn setBackgroundImage:[UIImage imageNamed:@"privateChat.png"] forState:UIControlStateHighlighted]; | |
| 76 | 76 | [privateChatBtn addTarget:self action:@selector(privateChatAction) forControlEvents:UIControlEventTouchUpInside]; |
| 77 | 77 | _privateChatBtn = privateChatBtn; |
| 78 | 78 | } | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/BounceView.h
0 → 100644
| 1 | +// | |
| 2 | +// BounceView.h | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/23. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | +@class userInfoModel; | |
| 11 | + | |
| 12 | +@interface BounceView : UIView | |
| 13 | + | |
| 14 | ++ (instancetype _Nullable)bounceView; | |
| 15 | + | |
| 16 | +@property (nonatomic ,strong) userInfoModel * _Nullable model; | |
| 17 | + | |
| 18 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/BounceView.m
0 → 100644
| 1 | +// | |
| 2 | +// BounceView.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/23. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "BounceView.h" | |
| 10 | +#import "userInfoModel.h" | |
| 11 | + | |
| 12 | +@interface BounceView () | |
| 13 | + | |
| 14 | +@property (nonatomic ,strong) UIImageView * _Nullable icon;//头像 | |
| 15 | +@property (nonatomic ,strong) UILabel * _Nullable nameLbl;//名字 | |
| 16 | +@property (nonatomic ,strong) UILabel * _Nullable signLbl;//签名 | |
| 17 | +@property (nonatomic ,strong) UIButton * _Nullable closeBtn;//关闭 | |
| 18 | +@property (nonatomic ,strong) UIButton * _Nullable privateChatBtn;//私信 | |
| 19 | +@property (nonatomic ,strong) UIButton * _Nullable aiteHeBtn;//@他 | |
| 20 | +@property (nonatomic ,strong) UIButton * _Nullable homeBtn;//主页 | |
| 21 | + | |
| 22 | +@end | |
| 23 | + | |
| 24 | +@implementation BounceView | |
| 25 | + | |
| 26 | ++ (instancetype _Nullable)bounceView | |
| 27 | +{ | |
| 28 | + static BounceView *bounceView; | |
| 29 | + | |
| 30 | + static dispatch_once_t onceToken; | |
| 31 | + dispatch_once(&onceToken, ^{ | |
| 32 | + bounceView = [[BounceView alloc] initWithFrame:CGRectMake(100, SCREEN_HEIGHT, SCREEN_WIDTH - 80, 300)]; | |
| 33 | + }); | |
| 34 | + return bounceView; | |
| 35 | +} | |
| 36 | + | |
| 37 | +- (instancetype)initWithFrame:(CGRect)frame | |
| 38 | +{ | |
| 39 | + if (self = [super initWithFrame:frame]) { | |
| 40 | + | |
| 41 | + self.backgroundColor = [UIColor whiteColor]; | |
| 42 | + [self addSubview:self.signLbl]; | |
| 43 | + [self addSubview:self.closeBtn]; | |
| 44 | + [self addSubview:self.homeBtn]; | |
| 45 | + } | |
| 46 | + return self; | |
| 47 | +} | |
| 48 | + | |
| 49 | +- (void)setModel:(userInfoModel *)model | |
| 50 | +{ | |
| 51 | + _model = model; | |
| 52 | + [self.icon zx_setHeader:model.icon]; | |
| 53 | + self.nameLbl.text = model.name; | |
| 54 | + self.signLbl.text = model.sign; | |
| 55 | + self.signLbl.frame = CGRectMake(self.signLbl.left, self.signLbl.top, [self.signLbl labelSize].width, [self.signLbl labelSize].height); | |
| 56 | + self.signLbl.centerX = self.width * 0.5; | |
| 57 | + self.nameLbl.centerX = _icon.centerX; | |
| 58 | +} | |
| 59 | + | |
| 60 | +- (void)closeClick | |
| 61 | +{ | |
| 62 | + [Tools closeBouces]; | |
| 63 | +} | |
| 64 | + | |
| 65 | +- (void)aiteHeBtnClick | |
| 66 | +{ | |
| 67 | + NSLog(@"aiteHeBtnClick"); | |
| 68 | +} | |
| 69 | + | |
| 70 | +- (void)privateChatClick | |
| 71 | +{ | |
| 72 | + NSLog(@"privateChatClick"); | |
| 73 | +} | |
| 74 | + | |
| 75 | +- (void)homeBtnClick | |
| 76 | +{ | |
| 77 | + NSLog(@"homeBtnClick"); | |
| 78 | +} | |
| 79 | + | |
| 80 | +- (UIImageView *)icon | |
| 81 | +{ | |
| 82 | + if (!_icon) | |
| 83 | + { | |
| 84 | + _icon = [[UIImageView alloc] initWithFrame:CGRectMake(10, 20, 40, 40)]; | |
| 85 | + _icon.centerX = self.width * 0.5; | |
| 86 | + [self addSubview:_icon]; | |
| 87 | + } | |
| 88 | + return _icon; | |
| 89 | +} | |
| 90 | + | |
| 91 | +- (UILabel *)signLbl | |
| 92 | +{ | |
| 93 | + if (!_signLbl) | |
| 94 | + { | |
| 95 | + _signLbl = [[UILabel alloc] initWithFrame:CGRectMake(self.nameLbl.left, self.nameLbl.bottom + 10 , self.width - 20, 20)]; | |
| 96 | + _signLbl.centerX = _icon.centerX; | |
| 97 | + _signLbl.text = @"TA很懒,什么都没有留下。"; | |
| 98 | + _signLbl.numberOfLines = 0; | |
| 99 | + _signLbl.textAlignment = NSTextAlignmentCenter; | |
| 100 | + _signLbl.font = [UIFont systemFontOfSize:kContentFont]; | |
| 101 | + } | |
| 102 | + return _signLbl; | |
| 103 | +} | |
| 104 | + | |
| 105 | +- (UILabel *)nameLbl | |
| 106 | +{ | |
| 107 | + if (!_nameLbl) | |
| 108 | + { | |
| 109 | + _nameLbl = [[UILabel alloc] initWithFrame:CGRectMake(self.icon.left, self.icon.bottom + 10 , self.width - 20, 20)]; | |
| 110 | + _nameLbl.centerX = _icon.centerX; | |
| 111 | + _nameLbl.text = @"姓名"; | |
| 112 | + _nameLbl.textAlignment = NSTextAlignmentCenter; | |
| 113 | + _nameLbl.font = [UIFont systemFontOfSize:kContentFont]; | |
| 114 | + [self addSubview:_nameLbl]; | |
| 115 | + } | |
| 116 | + return _nameLbl; | |
| 117 | +} | |
| 118 | + | |
| 119 | +- (UIButton *)closeBtn | |
| 120 | +{ | |
| 121 | + if (!_closeBtn) | |
| 122 | + { | |
| 123 | + _closeBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.width - 50, 10, 40, 40)]; | |
| 124 | + [_closeBtn addTarget:self action:@selector(closeClick) forControlEvents:UIControlEventTouchUpInside]; | |
| 125 | + [_closeBtn setBackgroundImage:[UIImage imageNamed:@"LiveCloseNormal"] forState:UIControlStateNormal]; | |
| 126 | + } | |
| 127 | + return _closeBtn; | |
| 128 | +} | |
| 129 | + | |
| 130 | +- (UIButton *)privateChatBtn | |
| 131 | +{ | |
| 132 | + if (!_privateChatBtn) | |
| 133 | + { | |
| 134 | + _privateChatBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, self.height - 50, self.width / 3.0, 50)]; | |
| 135 | + [_privateChatBtn addTarget:self action:@selector(privateChatClick) forControlEvents:UIControlEventTouchUpInside]; | |
| 136 | + [_privateChatBtn setTitle:@"私信" forState:UIControlStateNormal]; | |
| 137 | + [_privateChatBtn setTitleColor:[UIColor cyanColor] forState:UIControlStateNormal]; | |
| 138 | + [self addSubview:_privateChatBtn]; | |
| 139 | + } | |
| 140 | + return _privateChatBtn; | |
| 141 | +} | |
| 142 | + | |
| 143 | +- (UIButton *)aiteHeBtn | |
| 144 | +{ | |
| 145 | + if (!_aiteHeBtn) | |
| 146 | + { | |
| 147 | + _aiteHeBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.privateChatBtn.right, self.height - self.privateChatBtn.height, self.width / 3.0, self.privateChatBtn.height)]; | |
| 148 | + [_aiteHeBtn addTarget:self action:@selector(aiteHeBtnClick) forControlEvents:UIControlEventTouchUpInside]; | |
| 149 | + [_aiteHeBtn setTitle:@"@TA" forState:UIControlStateNormal]; | |
| 150 | + [_aiteHeBtn setTitleColor:[UIColor cyanColor] forState:UIControlStateNormal]; | |
| 151 | + [self addSubview:_aiteHeBtn]; | |
| 152 | + } | |
| 153 | + return _aiteHeBtn; | |
| 154 | +} | |
| 155 | + | |
| 156 | +- (UIButton *)homeBtn | |
| 157 | +{ | |
| 158 | + if (!_homeBtn) | |
| 159 | + { | |
| 160 | + _homeBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.aiteHeBtn.right, self.height - self.privateChatBtn.height, self.width / 3.0, self.privateChatBtn.height)]; | |
| 161 | + [_homeBtn addTarget:self action:@selector(homeBtnClick) forControlEvents:UIControlEventTouchUpInside]; | |
| 162 | + [_homeBtn setTitle:@"主页" forState:UIControlStateNormal]; | |
| 163 | + [_homeBtn setTitleColor:[UIColor cyanColor] forState:UIControlStateNormal]; | |
| 164 | + } | |
| 165 | + return _homeBtn; | |
| 166 | +} | |
| 167 | + | |
| 168 | +/* | |
| 169 | +// Only override drawRect: if you perform custom drawing. | |
| 170 | +// An empty implementation adversely affects performance during animation. | |
| 171 | +- (void)drawRect:(CGRect)rect { | |
| 172 | + // Drawing code | |
| 173 | +} | |
| 174 | +*/ | |
| 175 | + | |
| 176 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/Barrage/CNBarrageManager.h deleted
100644 → 0
| 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 deleted
100644 → 0
| 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 deleted
100644 → 0
| 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 deleted
100644 → 0
| 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/BarrageManager/BarrageManager.h
0 → 100644
| 1 | +// | |
| 2 | +// BarrageManager.h | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/24. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | +@class chatMsgModel; | |
| 11 | +@class ChatBarrageView; | |
| 12 | +#import "AnimationBaseView.h" | |
| 13 | +@interface BarrageManager : NSObject <TouchPointDelegate> | |
| 14 | + | |
| 15 | +/** | |
| 16 | + 初始化管理类 | |
| 17 | + @return 当前manager | |
| 18 | + */ | |
| 19 | ++ (instancetype)sharedManager; | |
| 20 | + | |
| 21 | +- (ChatBarrageView *)addAnimationWithModel:(chatMsgModel *)model animContentView:(UIView *)animContentView; | |
| 22 | + | |
| 23 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/BarrageManager/BarrageManager.m
0 → 100644
| 1 | +// | |
| 2 | +// BarrageManager.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/24. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "BarrageManager.h" | |
| 10 | +#import "chatMsgModel.h" | |
| 11 | +#import "ChatBarrageView.h" | |
| 12 | + | |
| 13 | +@interface BarrageManager ()<CAAnimationDelegate> | |
| 14 | + | |
| 15 | +@property (nonatomic ,strong) NSTimer * _Nullable timer; | |
| 16 | +@property (nonatomic ,strong) ChatBarrageView *_Nullable barrageView; | |
| 17 | +@property (nonatomic ,strong) AnimationBaseView * _Nullable animBaseView; | |
| 18 | +@property (nonatomic ,assign) CGRect barrCurrentRect; | |
| 19 | + | |
| 20 | +@end | |
| 21 | +@implementation BarrageManager | |
| 22 | + | |
| 23 | +/** | |
| 24 | + 初始化管理类 | |
| 25 | + @return 当前manager | |
| 26 | + */ | |
| 27 | ++ (instancetype)sharedManager{ | |
| 28 | + | |
| 29 | + static BarrageManager *manager; | |
| 30 | + | |
| 31 | + static dispatch_once_t onceToken; | |
| 32 | + dispatch_once(&onceToken, ^{ | |
| 33 | + manager = [[BarrageManager alloc] init]; | |
| 34 | + }); | |
| 35 | + return manager; | |
| 36 | +} | |
| 37 | + | |
| 38 | +//- (AnimationBaseView *)animBaseView | |
| 39 | +//{ | |
| 40 | +// if (!_animBaseView) | |
| 41 | +// { | |
| 42 | +// _animBaseView = [[AnimationBaseView alloc] init]; | |
| 43 | +// } | |
| 44 | +// return _animBaseView; | |
| 45 | +//} | |
| 46 | + | |
| 47 | +/** | |
| 48 | + 根据实际model添加动画 | |
| 49 | + | |
| 50 | + @param model modelobj | |
| 51 | + */ | |
| 52 | +- (ChatBarrageView *)addAnimationWithModel:(chatMsgModel *)model animContentView:(UIView *)animContentView | |
| 53 | +{ | |
| 54 | + ChatBarrageView *barrageView = [ChatBarrageView barrageViewWithPoint:CGPointMake(SCREEN_WIDTH + 50, 100)]; | |
| 55 | + barrageView.backgroundColor = [UIColor blackColor]; | |
| 56 | + [animContentView addSubview:barrageView]; | |
| 57 | + self.barrageView = barrageView; | |
| 58 | + self.animBaseView = (AnimationBaseView *)animContentView; | |
| 59 | + | |
| 60 | + barrageView.model = model; | |
| 61 | + | |
| 62 | + [self animationWithDuration:8 | |
| 63 | + YValues:@[ @(SCREEN_WIDTH + 50), @(-(200))] | |
| 64 | + keyTimes:@[@0.0, @1.0] | |
| 65 | + timingFunctions:@[ | |
| 66 | + [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear], | |
| 67 | + ] | |
| 68 | + addView:barrageView]; | |
| 69 | + [self createTimer]; | |
| 70 | + self.animBaseView.isBarrage = YES; | |
| 71 | + | |
| 72 | +// [UIView animateWithDuration:10 animations:^{ | |
| 73 | +// | |
| 74 | +// barrageView.left = - 200; | |
| 75 | +// } completion:^(BOOL finished) { | |
| 76 | +// [self stopTimer]; | |
| 77 | +// [barrageView removeFromSuperview]; | |
| 78 | +// NSLog(@"finished"); | |
| 79 | +// }]; | |
| 80 | + return barrageView; | |
| 81 | +} | |
| 82 | + | |
| 83 | +// 实时监测 ,也可以用循环定时器 | |
| 84 | +- (void)createTimer{ | |
| 85 | + if (!self.timer) { | |
| 86 | + self.timer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(jianCe) userInfo:nil repeats:YES]; | |
| 87 | + } | |
| 88 | +} | |
| 89 | +- (void) jianCe{ | |
| 90 | + CGRect rect = [[self.barrageView.layer presentationLayer ]frame]; // view指动画中移动的view | |
| 91 | + self.barrCurrentRect = rect; | |
| 92 | +// NSLog(@"箭%@",NSStringFromCGRect(rect)); | |
| 93 | +} | |
| 94 | + | |
| 95 | +- (void)stopTimer | |
| 96 | +{ | |
| 97 | + if(self.timer) | |
| 98 | + { | |
| 99 | + [self.timer invalidate]; | |
| 100 | + self.timer = nil; | |
| 101 | + } | |
| 102 | +} | |
| 103 | + | |
| 104 | +#pragma mark - touchPointDelegate | |
| 105 | +- (void)touchPoint:(CGPoint)touchPoint | |
| 106 | +{ | |
| 107 | + CGFloat dxLeft = touchPoint.x - self.barrCurrentRect.origin.x;// >0 | |
| 108 | + CGFloat dxRight = touchPoint.x - self.barrCurrentRect.origin.x - self.barrCurrentRect.size.width;// < 0 | |
| 109 | + CGFloat dyLeft = touchPoint.y - self.barrCurrentRect.origin.y;// >0 | |
| 110 | + CGFloat dyRight = touchPoint.y - self.barrCurrentRect.origin.y - self.barrCurrentRect.size.height;// <0 | |
| 111 | + | |
| 112 | + if (dxLeft > 0 && dxRight < 0 && dyLeft > 0 && dyRight < 0) { | |
| 113 | + //在当前矩形区域内 | |
| 114 | +// NSLog(@"在当前矩形区域内"); | |
| 115 | + [self.barrageView barrageViewClickWithModel:self.barrageView.model]; | |
| 116 | + }else | |
| 117 | + { | |
| 118 | +// NSLog(@"不在当前矩形区域内"); | |
| 119 | + } | |
| 120 | +} | |
| 121 | + | |
| 122 | +- (void)animationWithDuration:(float)duration YValues:(NSArray *)YValues keyTimes:(NSArray *)keyTimes timingFunctions:(NSArray *)timingFunctions addView:(UIView *)addView{ | |
| 123 | + CAKeyframeAnimation *rocketAnim = [CAKeyframeAnimation animation]; | |
| 124 | + rocketAnim.keyPath = @"position.x"; | |
| 125 | + rocketAnim.values = YValues; | |
| 126 | + rocketAnim.keyTimes = keyTimes; | |
| 127 | + rocketAnim.timingFunctions = timingFunctions; | |
| 128 | + rocketAnim.duration = duration; | |
| 129 | + rocketAnim.fillMode = kCAFillModeForwards; | |
| 130 | + rocketAnim.removedOnCompletion = NO; | |
| 131 | + rocketAnim.delegate = self; | |
| 132 | + [addView.layer addAnimation:rocketAnim forKey:@"positionY"]; | |
| 133 | +} | |
| 134 | + | |
| 135 | +- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag{ | |
| 136 | + NSLog(@"didStop"); | |
| 137 | + [self stopTimer]; | |
| 138 | + [self.barrageView removeFromSuperview]; | |
| 139 | + self.animBaseView.isBarrage = NO; | |
| 140 | +} | |
| 141 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/ChatBarrageManager/ChatBarrOperation.h
0 → 100644
| 1 | +// | |
| 2 | +// ChatBarrOperation.h | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/22. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | + | |
| 11 | +@class chatMsgModel; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + 动画完成回调 | |
| 15 | + */ | |
| 16 | +typedef void(^barrAnimationCompletion)(); | |
| 17 | + | |
| 18 | +/** | |
| 19 | + 可以开始动画回调 | |
| 20 | + */ | |
| 21 | +typedef void(^canAnimCompletion)(NSDictionary *); | |
| 22 | + | |
| 23 | +@protocol canAnimDelegate <NSObject> | |
| 24 | + | |
| 25 | +- (void)canAniCompletion; | |
| 26 | + | |
| 27 | +@end | |
| 28 | + | |
| 29 | +@interface ChatBarrOperation : NSOperation | |
| 30 | +{ | |
| 31 | + barrAnimationCompletion _completion; | |
| 32 | +} | |
| 33 | + | |
| 34 | +@property (nonatomic ,strong) id <canAnimDelegate> delegate; | |
| 35 | + | |
| 36 | ++ (instancetype)addAnimOperationWithModel:(chatMsgModel *)model animContentView:(UIView *)animContentView; | |
| 37 | + | |
| 38 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/ChatBarrageManager/ChatBarrOperation.m
0 → 100644
| 1 | +// | |
| 2 | +// ChatBarrOperation.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/22. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "ChatBarrOperation.h" | |
| 10 | +#import "chatMsgModel.h" | |
| 11 | +#import "ChatBarrageView.h" | |
| 12 | + | |
| 13 | +@interface ChatBarrOperation ()<CAAnimationDelegate> | |
| 14 | +{ | |
| 15 | + BOOL _finished; //用于设置队列是否完成 | |
| 16 | + BOOL _executing; //队列任务开始执行 | |
| 17 | +} | |
| 18 | +@property (nonatomic ,strong) chatMsgModel * model;//model | |
| 19 | +@property (nonatomic ,strong) UIView * animContentView;//需要显示动画的view | |
| 20 | +@property (nonatomic ,strong) ChatBarrageView * _Nullable barrageView; | |
| 21 | +@property (nonatomic ,strong) NSArray * _Nullable defaultTrajory; | |
| 22 | +//@property (nonatomic ,strong) NSMutableDictionary * _Nullable trajoryStateDic; | |
| 23 | + | |
| 24 | +@end | |
| 25 | + | |
| 26 | +@implementation ChatBarrOperation | |
| 27 | + | |
| 28 | ++ (instancetype)addAnimOperationWithModel:(chatMsgModel *)model animContentView:(UIView *)animContentView | |
| 29 | +{ | |
| 30 | + ChatBarrOperation *barrAnimOperation = [[ChatBarrOperation alloc]initWithModel:model animContentView:animContentView]; | |
| 31 | + return barrAnimOperation; | |
| 32 | +} | |
| 33 | + | |
| 34 | +/** | |
| 35 | + 初始化 | |
| 36 | + | |
| 37 | + @param model 礼物model | |
| 38 | + @param animContentView 需要把动画view添加到的view | |
| 39 | + @return obj | |
| 40 | + */ | |
| 41 | +- (instancetype)initWithModel:(chatMsgModel *)model animContentView:(UIView *)animContentView{ | |
| 42 | + self = [super init]; | |
| 43 | + if (self) { | |
| 44 | + self.model = model; | |
| 45 | + self.animContentView = animContentView; | |
| 46 | + } | |
| 47 | + return self; | |
| 48 | +} | |
| 49 | + | |
| 50 | +/** | |
| 51 | + 开始方法(KVO控制队列任务状态) | |
| 52 | + */ | |
| 53 | +- (void)start{ | |
| 54 | +// NSLog(@"start"); | |
| 55 | + //这里动画队列任务不存在Cancelled状态所以不需要判断,直接开始执行 | |
| 56 | + [self willChangeValueForKey:@"isExecuting"]; | |
| 57 | + _executing = YES; | |
| 58 | + [self main]; | |
| 59 | + [self didChangeValueForKey:@"isExecuting"]; | |
| 60 | +} | |
| 61 | + | |
| 62 | +/** | |
| 63 | + 自定义Operation提供了start main接口。 | |
| 64 | + */ | |
| 65 | +- (void)main{ | |
| 66 | + [self barrageAnimation]; | |
| 67 | +} | |
| 68 | + | |
| 69 | +/** | |
| 70 | + 弹幕View | |
| 71 | + | |
| 72 | + @return 弹幕view | |
| 73 | + */ | |
| 74 | +- (ChatBarrageView *)barrageView{ | |
| 75 | + if (!_barrageView) { | |
| 76 | + _barrageView = [ChatBarrageView barrageViewWithPoint:CGPointMake(SCREEN_WIDTH + 50, 100)]; | |
| 77 | + _barrageView.animBaseView = (AnimationBaseView *)self.animContentView; | |
| 78 | + } | |
| 79 | + return _barrageView; | |
| 80 | +} | |
| 81 | + | |
| 82 | +static long currentCompleteIndex = 0; | |
| 83 | + | |
| 84 | +- (void)barrageAnimation | |
| 85 | +{ | |
| 86 | + weakself | |
| 87 | + dispatch_async(dispatch_get_main_queue(), ^{ | |
| 88 | + strongself | |
| 89 | + | |
| 90 | +// //获取空的最小轨道 | |
| 91 | +// int minIndex = -1;//默认没有 | |
| 92 | +// for (int i = 0 ; i < 3; i ++) { | |
| 93 | +// int state = [[self.trajoryStateDic objectForKey:[NSString stringWithFormat:@"state%d",i]] intValue]; | |
| 94 | +// NSLog(@"state%d,i%d",state,i); | |
| 95 | +// if (state == -1) {//null | |
| 96 | +// minIndex = i; | |
| 97 | +// break; | |
| 98 | +// } | |
| 99 | +// } | |
| 100 | +// if (minIndex == -1) {//没有空轨道 | |
| 101 | +// //等待有complete的op再继续执行 | |
| 102 | +// NSLog(@"等待complete"); | |
| 103 | +// | |
| 104 | +// }else//有最小空轨道 | |
| 105 | +// { | |
| 106 | +// NSLog(@"有最小空轨道"); | |
| 107 | + //初始化弹幕View | |
| 108 | +// self.barrageView = [ChatBarrageView barrageView]; | |
| 109 | + self.barrageView.model = self.model; | |
| 110 | + | |
| 111 | + NSLog(@"barrage:%@",self.barrageView); | |
| 112 | + [self.animContentView addSubview:self.barrageView]; | |
| 113 | + | |
| 114 | + self.barrageView.top = [self.defaultTrajory[currentCompleteIndex] integerValue]; | |
| 115 | + currentCompleteIndex ++; | |
| 116 | + if (currentCompleteIndex == 3) | |
| 117 | + { | |
| 118 | + currentCompleteIndex = 0; | |
| 119 | + } | |
| 120 | + | |
| 121 | +// NSString *key = [NSString stringWithFormat:@"state%d",minIndex]; | |
| 122 | +// [self.trajoryStateDic setValue:@1 forKey:key]; | |
| 123 | +// [self.trajoryStateDic setValue:self.name forKey:[NSString stringWithFormat:@"name%d",minIndex]]; | |
| 124 | +// NSLog(@"top:%zd,index%d",[self.defaultTrajory[currentCompleteIndex] integerValue],minIndex); | |
| 125 | + [self.barrageView startBarrageAnimationWithCompletion:^{ | |
| 126 | + | |
| 127 | + NSLog(@"completion"); | |
| 128 | +// [self.trajoryStateDic setValue:@(-1) forKey:[NSString stringWithFormat:@"state%d",minIndex]]; | |
| 129 | +// [self.trajoryStateDic setValue:@"" forKey:[NSString stringWithFormat:@"name%d",minIndex]]; | |
| 130 | + if ([self.delegate respondsToSelector:@selector(canAniCompletion)]) { | |
| 131 | + [self.delegate canAniCompletion]; | |
| 132 | + } | |
| 133 | + [self willChangeValueForKey:@"isFinished"]; | |
| 134 | + | |
| 135 | + _finished = YES; | |
| 136 | + | |
| 137 | + [self didChangeValueForKey:@"isFinished"]; | |
| 138 | + }]; | |
| 139 | +// } | |
| 140 | + | |
| 141 | + }); | |
| 142 | +} | |
| 143 | + | |
| 144 | +- (NSArray *)defaultTrajory | |
| 145 | +{ | |
| 146 | + if (!_defaultTrajory) | |
| 147 | + { | |
| 148 | + _defaultTrajory = [[NSArray alloc] initWithObjects:@200,@240,@280, nil]; | |
| 149 | + } | |
| 150 | + return _defaultTrajory; | |
| 151 | +} | |
| 152 | + | |
| 153 | +//- (NSMutableDictionary *)trajoryStateDic | |
| 154 | +//{ | |
| 155 | +// if (!_trajoryStateDic) | |
| 156 | +// { | |
| 157 | +// _trajoryStateDic = [NSMutableDictionary dictionaryWithObjectsAndKeys:@(-1),@"state0",@(-1),@"state1",@(-1),@"state2",@"",@"name0",@"",@"name1",@"",@"name2", nil]; | |
| 158 | +// } | |
| 159 | +// return _trajoryStateDic; | |
| 160 | +//} | |
| 161 | + | |
| 162 | +// 提示:To be deprecated; use and override 'asynchronous' below | |
| 163 | +//之前用的isConcurrent | |
| 164 | +/** | |
| 165 | + 覆写异步执行 | |
| 166 | + | |
| 167 | + @return YES | |
| 168 | + */ | |
| 169 | +- (BOOL)isAsynchronous{ | |
| 170 | +// NSLog(@"isAsynchronous"); | |
| 171 | + return YES; | |
| 172 | +} | |
| 173 | + | |
| 174 | +/** | |
| 175 | + 覆写任务是否完成控制 | |
| 176 | + | |
| 177 | + @return 完成状态 _finished | |
| 178 | + */ | |
| 179 | +- (BOOL) isFinished{ | |
| 180 | +// NSLog(@"isFinished%d",_finished); | |
| 181 | + return _finished; | |
| 182 | +} | |
| 183 | + | |
| 184 | +/** | |
| 185 | + 覆写任务是否完成开始执行 | |
| 186 | + | |
| 187 | + @return 执行状态 _executing | |
| 188 | + */ | |
| 189 | +- (BOOL) isExecuting{ | |
| 190 | +// NSLog(@"isExecuting%d",_executing); | |
| 191 | + return _executing; | |
| 192 | +} | |
| 193 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/ChatBarrageManager/ChatBarrageAnimAction.h
0 → 100644
| 1 | +// | |
| 2 | +// ChatBarrageAnimAction.h | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/22. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | +/** | |
| 11 | + 动画完成回调 | |
| 12 | + */ | |
| 13 | +typedef void(^barrAnimationCompletion)(); | |
| 14 | + | |
| 15 | +@interface ChatBarrageAnimAction : UIView<CAAnimationDelegate>{ | |
| 16 | + barrAnimationCompletion _barrAnimationCompletion; //动画完成回调 | |
| 17 | +} | |
| 18 | + | |
| 19 | +/** | |
| 20 | + 弹幕动画 | |
| 21 | + */ | |
| 22 | +- (void)startBarrageAnimationWithCompletion:(barrAnimationCompletion)completion; | |
| 23 | + | |
| 24 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/ChatBarrageManager/ChatBarrageAnimAction.m
0 → 100644
| 1 | +// | |
| 2 | +// ChatBarrageAnimAction.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/22. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "ChatBarrageAnimAction.h" | |
| 10 | + | |
| 11 | +@interface ChatBarrageAnimAction ()<CAAnimationDelegate> | |
| 12 | + | |
| 13 | + | |
| 14 | +@end | |
| 15 | + | |
| 16 | +@implementation ChatBarrageAnimAction | |
| 17 | + | |
| 18 | +/** | |
| 19 | + 弹幕动画 | |
| 20 | + */ | |
| 21 | +- (void)startBarrageAnimationWithCompletion:(barrAnimationCompletion)completion; | |
| 22 | +{ | |
| 23 | + _barrAnimationCompletion = completion; | |
| 24 | +// self.left = SCREEN_WIDTH + 50; | |
| 25 | +// NSLog(@"frame:%@",NSStringFromCGRect(self.frame)); | |
| 26 | +// [UIView animateWithDuration:10 animations:^{ | |
| 27 | +// self.left = - 200; | |
| 28 | +// | |
| 29 | +// } completion:^(BOOL finished) { | |
| 30 | +// _barrAnimationCompletion(); | |
| 31 | +// }]; | |
| 32 | + [self animationWithDuration:8 | |
| 33 | + YValues:@[ @(SCREEN_WIDTH + 50), @(-(200))] | |
| 34 | + keyTimes:@[@0.0, @1.0] | |
| 35 | + timingFunctions:@[ | |
| 36 | + [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear], | |
| 37 | + ] | |
| 38 | + addView:self]; | |
| 39 | +} | |
| 40 | + | |
| 41 | +/** | |
| 42 | + 位移动画具体实现 | |
| 43 | + | |
| 44 | + @param duration 动画持续时间 | |
| 45 | + @param YValues 动画帧数组 | |
| 46 | + @param keyTimes 动画帧时间 | |
| 47 | + @param timingFunctions 动画方式数组 | |
| 48 | + @param addView 需要添加的view | |
| 49 | + */ | |
| 50 | +- (void)animationWithDuration:(float)duration YValues:(NSArray *)YValues keyTimes:(NSArray *)keyTimes timingFunctions:(NSArray *)timingFunctions addView:(UIView *)addView{ | |
| 51 | + CAKeyframeAnimation *rocketAnim = [CAKeyframeAnimation animation]; | |
| 52 | + rocketAnim.keyPath = @"position.x"; | |
| 53 | + rocketAnim.values = YValues; | |
| 54 | + rocketAnim.keyTimes = keyTimes; | |
| 55 | + rocketAnim.timingFunctions = timingFunctions; | |
| 56 | + rocketAnim.duration = duration; | |
| 57 | + rocketAnim.fillMode = kCAFillModeForwards; | |
| 58 | + rocketAnim.removedOnCompletion = NO; | |
| 59 | + rocketAnim.delegate = self; | |
| 60 | + [addView.layer addAnimation:rocketAnim forKey:@"positionY"]; | |
| 61 | +} | |
| 62 | + | |
| 63 | +/** | |
| 64 | + 动画回调代理,用于判断是否完成 | |
| 65 | + | |
| 66 | + @param anim 动画对象 | |
| 67 | + @param flag 是否完成标记 | |
| 68 | + */ | |
| 69 | +- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag{ | |
| 70 | + _barrAnimationCompletion(); | |
| 71 | +} | |
| 72 | + | |
| 73 | +/* | |
| 74 | +// Only override drawRect: if you perform custom drawing. | |
| 75 | +// An empty implementation adversely affects performance during animation. | |
| 76 | +- (void)drawRect:(CGRect)rect { | |
| 77 | + // Drawing code | |
| 78 | +} | |
| 79 | +*/ | |
| 80 | + | |
| 81 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/ChatBarrageManager/ChatBarrageManager.h
0 → 100644
| 1 | +// | |
| 2 | +// ChatBarrageManager.h | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/22. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | + | |
| 11 | +@class chatMsgModel; | |
| 12 | + | |
| 13 | +@interface ChatBarrageManager : NSObject | |
| 14 | + | |
| 15 | +/** | |
| 16 | + 初始化管理类 | |
| 17 | + @return 当前manager | |
| 18 | + */ | |
| 19 | ++ (instancetype)sharedManager; | |
| 20 | + | |
| 21 | +- (void)addAnimationWithModel:(chatMsgModel *)model animContentView:(UIView *)animContentView; | |
| 22 | + | |
| 23 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/ChatBarrageManager/ChatBarrageManager.m
0 → 100644
| 1 | +// | |
| 2 | +// ChatBarrageManager.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/22. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "ChatBarrageManager.h" | |
| 10 | +#import "chatMsgModel.h" | |
| 11 | +#import "ChatBarrOperation.h" | |
| 12 | + | |
| 13 | +@interface ChatBarrageManager ()<canAnimDelegate> | |
| 14 | + | |
| 15 | +@property (nonatomic,strong) NSOperationQueue *barrageAnimationQueue; //聊天弹幕动画队列 | |
| 16 | +@property (nonatomic ,strong) NSMutableArray * _Nullable tempOperationArr; | |
| 17 | + | |
| 18 | +@end | |
| 19 | + | |
| 20 | +@implementation ChatBarrageManager | |
| 21 | + | |
| 22 | +/** | |
| 23 | + 初始化管理类 | |
| 24 | + @return 当前manager | |
| 25 | + */ | |
| 26 | ++ (instancetype)sharedManager{ | |
| 27 | + | |
| 28 | + static ChatBarrageManager *manager; | |
| 29 | + | |
| 30 | + static dispatch_once_t onceToken; | |
| 31 | + dispatch_once(&onceToken, ^{ | |
| 32 | + manager = [[ChatBarrageManager alloc] init]; | |
| 33 | + }); | |
| 34 | + return manager; | |
| 35 | +} | |
| 36 | + | |
| 37 | +/** | |
| 38 | + 聊天弹幕动画队列 | |
| 39 | + | |
| 40 | + @return 队列obj | |
| 41 | + */ | |
| 42 | +- (NSOperationQueue *)barrageAnimationQueue{ | |
| 43 | + if (_barrageAnimationQueue == nil) { | |
| 44 | + _barrageAnimationQueue = [[NSOperationQueue alloc] init]; | |
| 45 | + _barrageAnimationQueue.maxConcurrentOperationCount = 1; | |
| 46 | + } | |
| 47 | + return _barrageAnimationQueue; | |
| 48 | +} | |
| 49 | + | |
| 50 | +- (NSMutableArray *)tempOperationArr | |
| 51 | +{ | |
| 52 | + if (!_tempOperationArr) | |
| 53 | + { | |
| 54 | + _tempOperationArr = [[NSMutableArray alloc] init]; | |
| 55 | + } | |
| 56 | + return _tempOperationArr; | |
| 57 | +} | |
| 58 | + | |
| 59 | +/** | |
| 60 | + 根据实际model添加动画 | |
| 61 | + | |
| 62 | + @param model modelobj | |
| 63 | + */ | |
| 64 | +- (void)addAnimationWithModel:(chatMsgModel *)model animContentView:(UIView *)animContentView{ | |
| 65 | + | |
| 66 | + ChatBarrOperation *op = [ChatBarrOperation addAnimOperationWithModel:model animContentView:animContentView]; | |
| 67 | + op.delegate = self; | |
| 68 | +// op.name = model.name;//换UID | |
| 69 | +// NSLog(@"opeCount:%zd",self.barrageAnimationQueue.operationCount); | |
| 70 | + if (self.barrageAnimationQueue.operationCount >= 3) { | |
| 71 | + [self.tempOperationArr addObject:op]; | |
| 72 | + }else | |
| 73 | + { | |
| 74 | + [self.barrageAnimationQueue addOperation:op]; | |
| 75 | + } | |
| 76 | +} | |
| 77 | + | |
| 78 | +- (void)canAniCompletion | |
| 79 | +{ | |
| 80 | + //将临时数组的op加到Queue中 | |
| 81 | + if (self.tempOperationArr.count > 0) { | |
| 82 | + [self.barrageAnimationQueue addOperation:[self.tempOperationArr firstObject]]; | |
| 83 | + [self.tempOperationArr removeObjectAtIndex:0]; | |
| 84 | + } | |
| 85 | +} | |
| 86 | + | |
| 87 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/ChatBarrageManager/ChatBarrageView.h
0 → 100644
| 1 | +// | |
| 2 | +// ChatBarrageView.h | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/22. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "ChatBarrageAnimAction.h" | |
| 10 | + | |
| 11 | +@class AnimationBaseView; | |
| 12 | +@class chatMsgModel; | |
| 13 | +@interface ChatBarrageView : ChatBarrageAnimAction | |
| 14 | + | |
| 15 | +@property (nonatomic ,strong) chatMsgModel * _Nullable model; | |
| 16 | + | |
| 17 | ++ (instancetype _Nullable)barrageViewWithPoint:(CGPoint)point; | |
| 18 | + | |
| 19 | +- (void)barrageViewClickWithModel:(chatMsgModel *_Nullable)model; | |
| 20 | +@property (nonatomic ,strong) AnimationBaseView * _Nullable animBaseView; | |
| 21 | + | |
| 22 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/ChatBarrageManager/ChatBarrageView.m
0 → 100644
| 1 | +// | |
| 2 | +// ChatBarrageView.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/22. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "ChatBarrageView.h" | |
| 10 | +#import "chatMsgModel.h" | |
| 11 | +#import "userInfoModel.h" | |
| 12 | +#import "AnimationBaseView.h" | |
| 13 | + | |
| 14 | +@interface ChatBarrageView ()<TouchPointDelegate> | |
| 15 | + | |
| 16 | +@property (nonatomic ,strong) UIImageView * _Nullable icon; | |
| 17 | +@property (nonatomic ,strong) UILabel * _Nullable nameLbl; | |
| 18 | +@property (nonatomic ,strong) UILabel * _Nullable contentLbl; | |
| 19 | + | |
| 20 | +@property (nonatomic ,strong) NSTimer * _Nullable timer; | |
| 21 | +@property (nonatomic ,assign) CGRect barrCurrentRect; | |
| 22 | +@end | |
| 23 | + | |
| 24 | +@implementation ChatBarrageView | |
| 25 | + | |
| 26 | ++ (instancetype _Nullable)barrageViewWithPoint:(CGPoint)point | |
| 27 | +{ | |
| 28 | + ChatBarrageView *barrageView = [[ChatBarrageView alloc] initWithFrame:CGRectMake(point.x, point.y, 200, 50)]; | |
| 29 | + return barrageView; | |
| 30 | +} | |
| 31 | + | |
| 32 | +- (instancetype)initWithFrame:(CGRect)frame | |
| 33 | +{ | |
| 34 | + if (self = [super initWithFrame:frame]) { | |
| 35 | + [self createTimer]; | |
| 36 | + | |
| 37 | + self.layer.cornerRadius = self.height * 0.5; | |
| 38 | + self.layer.masksToBounds = YES; | |
| 39 | + self.backgroundColor = [UIColor yellowColor]; | |
| 40 | + [self addSubview:self.contentLbl]; | |
| 41 | + } | |
| 42 | + return self; | |
| 43 | +} | |
| 44 | + | |
| 45 | +- (void)setAnimBaseView:(AnimationBaseView *)animBaseView | |
| 46 | +{ | |
| 47 | + _animBaseView = animBaseView; | |
| 48 | + self.animBaseView.isBarrage = YES; | |
| 49 | + self.animBaseView.delegate = self; | |
| 50 | +} | |
| 51 | + | |
| 52 | +// 实时监测 ,也可以用循环定时器 | |
| 53 | +- (void)createTimer{ | |
| 54 | + if (!self.timer) { | |
| 55 | + self.timer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(jianCe) userInfo:nil repeats:YES]; | |
| 56 | + } | |
| 57 | +} | |
| 58 | +- (void) jianCe{ | |
| 59 | + CGRect rect = [[self.layer presentationLayer ]frame]; // view指动画中移动的view | |
| 60 | + self.barrCurrentRect = rect; | |
| 61 | + // NSLog(@"箭%@",NSStringFromCGRect(rect)); | |
| 62 | +} | |
| 63 | + | |
| 64 | +- (void)stopTimer | |
| 65 | +{ | |
| 66 | + if(self.timer) | |
| 67 | + { | |
| 68 | + [self.timer invalidate]; | |
| 69 | + self.timer = nil; | |
| 70 | + } | |
| 71 | +} | |
| 72 | + | |
| 73 | +#pragma mark - touchPointDelegate | |
| 74 | +- (void)touchPoint:(CGPoint)touchPoint | |
| 75 | +{ | |
| 76 | + CGFloat dxLeft = touchPoint.x - self.barrCurrentRect.origin.x;// >0 | |
| 77 | + CGFloat dxRight = touchPoint.x - self.barrCurrentRect.origin.x - self.barrCurrentRect.size.width;// < 0 | |
| 78 | + CGFloat dyLeft = touchPoint.y - self.barrCurrentRect.origin.y;// >0 | |
| 79 | + CGFloat dyRight = touchPoint.y - self.barrCurrentRect.origin.y - self.barrCurrentRect.size.height;// <0 | |
| 80 | + | |
| 81 | + if (dxLeft > 0 && dxRight < 0 && dyLeft > 0 && dyRight < 0) { | |
| 82 | + //在当前矩形区域内 | |
| 83 | + // NSLog(@"在当前矩形区域内"); | |
| 84 | + [self barrageViewClickWithModel:self.model]; | |
| 85 | + }else | |
| 86 | + { | |
| 87 | + // NSLog(@"不在当前矩形区域内"); | |
| 88 | + } | |
| 89 | +} | |
| 90 | + | |
| 91 | +- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag | |
| 92 | +{ | |
| 93 | + _barrAnimationCompletion(); | |
| 94 | + [self stopTimer]; | |
| 95 | + [self removeFromSuperview]; | |
| 96 | + self.animBaseView.isBarrage = NO; | |
| 97 | + | |
| 98 | +} | |
| 99 | + | |
| 100 | +- (void)barrageViewClickWithModel:(chatMsgModel *)model | |
| 101 | +{ | |
| 102 | + //展示个人详细页 | |
| 103 | + userInfoModel *userModel = [[userInfoModel alloc] init]; | |
| 104 | + userModel.icon = model.icon; | |
| 105 | + userModel.name = model.name; | |
| 106 | + userModel.sign = model.content;//@"我就是签名,不服来辩"; | |
| 107 | + userModel.uId = @"111222"; | |
| 108 | + [Tools showBouncedWithModel:userModel callBackBlock:^(UIView * _Nullable bounceView) { | |
| 109 | + | |
| 110 | + }]; | |
| 111 | +} | |
| 112 | + | |
| 113 | +- (void)setModel:(chatMsgModel *)model | |
| 114 | +{ | |
| 115 | + _model = model; | |
| 116 | + [self.icon zx_setHeader:model.icon]; | |
| 117 | + self.nameLbl.text = model.name; | |
| 118 | + self.contentLbl.text = model.content; | |
| 119 | +} | |
| 120 | + | |
| 121 | +- (UIImageView *)icon | |
| 122 | +{ | |
| 123 | + if (!_icon) | |
| 124 | + { | |
| 125 | + _icon = [[UIImageView alloc] initWithFrame:CGRectMake(10, 4, self.height -6, self.height -6)]; | |
| 126 | + _icon.centerY = self.height * 0.5; | |
| 127 | + [self addSubview:_icon]; | |
| 128 | + } | |
| 129 | + return _icon; | |
| 130 | +} | |
| 131 | + | |
| 132 | +- (UILabel *)nameLbl | |
| 133 | +{ | |
| 134 | + if (!_nameLbl) | |
| 135 | + { | |
| 136 | + _nameLbl = [[UILabel alloc] initWithFrame:CGRectMake(self.icon.right + 10, 0, self.width - self.icon.right - 10, self.height * 0.5)]; | |
| 137 | + _nameLbl.textAlignment = NSTextAlignmentLeft; | |
| 138 | + _nameLbl.textColor = ZXRandomColor; | |
| 139 | + _nameLbl.font = [UIFont systemFontOfSize:kContentFont]; | |
| 140 | + [self addSubview:_nameLbl]; | |
| 141 | + } | |
| 142 | + return _nameLbl; | |
| 143 | +} | |
| 144 | + | |
| 145 | +- (UILabel *)contentLbl | |
| 146 | +{ | |
| 147 | + if (!_contentLbl) | |
| 148 | + { | |
| 149 | + _contentLbl = [[UILabel alloc] initWithFrame:CGRectMake(self.nameLbl.left, self.nameLbl.bottom, self.nameLbl.width, self.height * 0.5)]; | |
| 150 | + _contentLbl.textAlignment = NSTextAlignmentLeft; | |
| 151 | + _contentLbl.textColor = ZXRandomColor; | |
| 152 | + _contentLbl.font = [UIFont systemFontOfSize:kContentFont]; | |
| 153 | + } | |
| 154 | + return _contentLbl; | |
| 155 | +} | |
| 156 | + | |
| 157 | +/* | |
| 158 | +// Only override drawRect: if you perform custom drawing. | |
| 159 | +// An empty implementation adversely affects performance during animation. | |
| 160 | +- (void)drawRect:(CGRect)rect { | |
| 161 | + // Drawing code | |
| 162 | +} | |
| 163 | +*/ | |
| 164 | + | |
| 165 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/ChatMsgModel/chatMsgModel.m
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/AnimQueueManager.h
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/AnimQueueManager.m
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/GiftAnimOperation.m
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/LiveBaseView.h
| ... | ... | @@ -8,10 +8,10 @@ |
| 8 | 8 | |
| 9 | 9 | #import "BaseView.h" |
| 10 | 10 | @class PresentView; |
| 11 | - | |
| 11 | +@class AnimationBaseView; | |
| 12 | 12 | @interface LiveBaseView : BaseView |
| 13 | 13 | |
| 14 | 14 | @property (nonatomic ,strong) UIViewController * _Nullable viewController; |
| 15 | 15 | @property (nonatomic ,strong ,readonly) PresentView * _Nullable presentView; |
| 16 | -@property (nonatomic ,strong ,readonly) UIView * _Nullable animationBaseView; | |
| 16 | +@property (nonatomic ,strong ,readonly) AnimationBaseView * _Nullable animationBaseView; | |
| 17 | 17 | @end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/LiveBaseView.m
| ... | ... | @@ -17,9 +17,18 @@ |
| 17 | 17 | #import "chatListCell.h" |
| 18 | 18 | #import "chatMsgModel.h" |
| 19 | 19 | #import "TopToolView.h" |
| 20 | +#import "ChatBarrageManager.h" | |
| 21 | +#import "userInfoModel.h" | |
| 22 | +#import "PrivateView.h" | |
| 23 | +//#import "BarrageManager.h" | |
| 24 | +#import "ChatBarrageView.h" | |
| 25 | +#import "AnimationBaseView.h" | |
| 20 | 26 | |
| 21 | 27 | #define BottomToolHeight 60 |
| 22 | 28 | |
| 29 | +static NSString *message_barrage = @"message_barrage"; | |
| 30 | +static NSString *message_content = @"message_content"; | |
| 31 | + | |
| 23 | 32 | typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 24 | 33 | PopTypeGift = 1,//礼物弹窗 |
| 25 | 34 | PopTypeChat ,//聊天弹窗 |
| ... | ... | @@ -29,7 +38,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 29 | 38 | @interface LiveBaseView ()<bottomBtnDeledate,PresentViewDelegate,UIScrollViewDelegate,UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate,userClickDelegate,CNLiveChatManagerDelegate> |
| 30 | 39 | |
| 31 | 40 | @property (nonatomic ,strong ) UIScrollView * _Nullable scrollView; |
| 32 | -@property (nonatomic ,strong ,readwrite) UIView * _Nullable animationBaseView;//展示层View | |
| 41 | +@property (nonatomic ,strong ,readwrite) AnimationBaseView * _Nullable animationBaseView;//展示层View | |
| 33 | 42 | @property (nonatomic ,strong ) BottomToolView* _Nullable bottomToolView; |
| 34 | 43 | @property (nonatomic ,strong ) UIButton * _Nullable closeBtn; |
| 35 | 44 | @property (nonatomic ,strong ) GiftListView * _Nullable giftListView; |
| ... | ... | @@ -38,11 +47,15 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 38 | 47 | @property (nonatomic ,assign ) PopType popType; |
| 39 | 48 | @property (nonatomic ,strong ) UITableView * _Nullable chatTableView; |
| 40 | 49 | @property (nonatomic ,strong ) NSMutableArray * _Nullable chatMsgArray;//聊天消息数组 |
| 41 | -@property (nonatomic ,strong ) TopToolView * _Nullable topToolsView; | |
| 42 | -@property (nonatomic ,strong ) UIView * _Nullable commentsView; | |
| 43 | -@property (nonatomic ,strong ) UITextField * _Nullable commentText; | |
| 50 | +@property (nonatomic ,strong ) TopToolView * _Nullable topToolsView; | |
| 51 | +@property (nonatomic ,strong ) UIView * _Nullable commentsView; | |
| 52 | +@property (nonatomic ,strong ) UITextField * _Nullable commentText; | |
| 44 | 53 | @property (nonatomic ,assign ) CGFloat offsetHeight; |
| 45 | -@property (nonatomic ,strong ) UISwitch * _Nullable barrageSwitch; | |
| 54 | +@property (nonatomic ,strong ) UISwitch * _Nullable barrageSwitch; | |
| 55 | +@property (nonatomic ,strong ) ChatBarrageManager * _Nullable chatManager; | |
| 56 | +//@property (nonatomic ,strong ) BarrageManager * _Nullable barrManager; | |
| 57 | + | |
| 58 | +@property (nonatomic ,strong) ChatBarrageView * _Nullable barrageView; | |
| 46 | 59 | |
| 47 | 60 | @end |
| 48 | 61 | |
| ... | ... | @@ -52,6 +65,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 52 | 65 | { |
| 53 | 66 | if (self = [super initWithFrame:frame]) { |
| 54 | 67 | |
| 68 | + self.clipsToBounds = YES; | |
| 55 | 69 | [self addSubview:self.scrollView]; |
| 56 | 70 | [self.scrollView addSubview:self.animationBaseView]; |
| 57 | 71 | [self.animationBaseView addSubview:self.bottomToolView]; |
| ... | ... | @@ -69,7 +83,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 69 | 83 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHidden:) name:UIKeyboardWillHideNotification object:nil]; |
| 70 | 84 | |
| 71 | 85 | [CNLiveChatManager sharedCNLiveChatManager].delegate = self; |
| 72 | - [[CNLiveChatManager sharedCNLiveChatManager] joinChatRoom:@"123" messageCount:50 success:^(NSString *targetId) { | |
| 86 | + [[CNLiveChatManager sharedCNLiveChatManager] joinChatRoom:@"1234" messageCount:10 success:^(NSString *targetId) { | |
| 73 | 87 | NSLog(@"success"); |
| 74 | 88 | } error:^(CNLiveChatErrorCode errors, NSString *targetId) { |
| 75 | 89 | NSLog(@"error"); |
| ... | ... | @@ -111,12 +125,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 111 | 125 | bgView.userInteractionEnabled = YES; |
| 112 | 126 | [_commentsView addSubview:bgView]; |
| 113 | 127 | |
| 114 | - _barrageSwitch = [[UISwitch alloc] initWithFrame:CGRectMake(10, 10, 40, 30)]; | |
| 115 | - _barrageSwitch.tintColor = [UIColor orangeColor]; | |
| 116 | - _barrageSwitch.onTintColor = [UIColor orangeColor]; | |
| 117 | - _barrageSwitch.thumbTintColor = [UIColor lightGrayColor]; | |
| 118 | - _barrageSwitch.centerY = _commentsView.height * 0.5; | |
| 119 | - [bgView addSubview:_barrageSwitch]; | |
| 128 | + [bgView addSubview:self.barrageSwitch]; | |
| 120 | 129 | |
| 121 | 130 | UIButton *sendBtn = [[UIButton alloc] initWithFrame:CGRectMake(_commentsView.width - 80, 0, 80, _commentsView.height)]; |
| 122 | 131 | [sendBtn addTarget:self action:@selector(sendClick) forControlEvents:UIControlEventTouchUpInside]; |
| ... | ... | @@ -134,9 +143,11 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 134 | 143 | _commentText.returnKeyType = UIReturnKeySend; |
| 135 | 144 | _commentText.delegate = self; |
| 136 | 145 | _commentText.font = [UIFont systemFontOfSize:15.0]; |
| 146 | + _commentText.placeholder = @"和大家说点什么吧"; | |
| 137 | 147 | [bgView addSubview:_commentText]; |
| 138 | 148 | } |
| 139 | - [[[UIApplication sharedApplication]keyWindow] addSubview:_commentsView];//添加到window上,在视图以外 | |
| 149 | + UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | |
| 150 | + [window addSubview:_commentsView];//添加到window上,在视图以外 | |
| 140 | 151 | [_commentText becomeFirstResponder]; |
| 141 | 152 | } |
| 142 | 153 | |
| ... | ... | @@ -149,10 +160,51 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 149 | 160 | - (BOOL)textFieldShouldReturn:(UITextField *)textField |
| 150 | 161 | { |
| 151 | 162 | if (![textField.text isEqualToString:@""]) { |
| 152 | - //send message | |
| 153 | - NSLog(@"send message"); | |
| 154 | - [[CNLiveChatManager sharedCNLiveChatManager] sendMessage:textField.text type:CNLive_ConversationType_CHATROOM targetId:@"123" success:^(CNLiveChatMessage *message) { | |
| 155 | - NSLog(@"msgid:%@,tagid:%@,content:%@",message.messageId,message.targetId,message.messageContent); | |
| 163 | + | |
| 164 | + NSDictionary *dic; | |
| 165 | + if(self.barrageSwitch.isOn){ | |
| 166 | + //开启横屏弹幕 | |
| 167 | + dic = @{message_barrage:@"1",message_content:textField.text}; | |
| 168 | + }else | |
| 169 | + { | |
| 170 | + dic = @{message_barrage:@"0",message_content:textField.text}; | |
| 171 | + } | |
| 172 | + weakself | |
| 173 | + NSString *message = [Tools dictionaryToJson:dic]; | |
| 174 | + [[CNLiveChatManager sharedCNLiveChatManager] sendMessage:message type:CNLive_ConversationType_CHATROOM targetId:@"1234" success:^(CNLiveChatMessage *message) { | |
| 175 | + strongself | |
| 176 | + NSDictionary *JSONDic = [Tools dictionaryWithJsonString:message.messageContent]; | |
| 177 | + NSString *content = [JSONDic objectForKey:message_content]; | |
| 178 | + | |
| 179 | + //将消息显示到列表中 | |
| 180 | + chatMsgModel *model = [[chatMsgModel alloc] init]; | |
| 181 | + model.name = message.userInfo.name; | |
| 182 | + model.content = content; | |
| 183 | + model.ID = message.targetId; | |
| 184 | + model.icon = message.userInfo.portraitUri; | |
| 185 | + model.cellWidth = self.chatTableView.width - 20; | |
| 186 | + [self.chatMsgArray addObject:model]; | |
| 187 | + [self.chatTableView reloadData]; | |
| 188 | + NSInteger section = [self.chatTableView numberOfSections]; | |
| 189 | + if (section < 1) return; | |
| 190 | + NSInteger row = [self.chatTableView numberOfRowsInSection:section - 1]; | |
| 191 | + if (row < 1) return; | |
| 192 | + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row - 1 inSection:section - 1]; | |
| 193 | + [self.chatTableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES]; | |
| 194 | + [self.chatTableView reloadData]; | |
| 195 | + | |
| 196 | + NSInteger isBarrage = [[JSONDic objectForKey:message_barrage] integerValue]; | |
| 197 | + | |
| 198 | + if (isBarrage) {//此条消息飘弹幕 | |
| 199 | + | |
| 200 | + chatMsgModel *barrageModel = [[chatMsgModel alloc] init]; | |
| 201 | + barrageModel.name = message.userInfo.name; | |
| 202 | + barrageModel.content = content; | |
| 203 | + barrageModel.icon = message.userInfo.portraitUri; | |
| 204 | + | |
| 205 | + [self.chatManager addAnimationWithModel:barrageModel animContentView:self.animationBaseView]; | |
| 206 | + } | |
| 207 | + | |
| 156 | 208 | } error:^(CNLiveChatErrorCode errors, NSString *messageId, NSString *targetId) { |
| 157 | 209 | NSLog(@"%@",messageId); |
| 158 | 210 | }]; |
| ... | ... | @@ -165,24 +217,26 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 165 | 217 | #pragma mark - bottomBtnActionDelegate |
| 166 | 218 | - (void)bottomActionWithType:(BtnClickType)btnType button:(UIButton *)button |
| 167 | 219 | { |
| 220 | + [[LVCAnimationManager shareManager] suspend]; | |
| 221 | + | |
| 168 | 222 | switch (btnType) { |
| 169 | 223 | case BtnClickTypeChat: |
| 170 | 224 | { |
| 171 | 225 | self.popType = PopTypeChat; |
| 172 | 226 | |
| 173 | 227 | [self showCommentText]; |
| 174 | - [[LVCAnimationManager shareManager] suspend]; | |
| 175 | 228 | } |
| 176 | 229 | break; |
| 177 | 230 | case BtnClickTypePriChat: |
| 178 | 231 | { |
| 179 | 232 | self.popType = PopTypePriMessage; |
| 233 | + [self hiddenView:YES]; | |
| 234 | + [self showPrivateView]; | |
| 180 | 235 | } |
| 181 | 236 | break; |
| 182 | 237 | case BtnClickTypeGift: |
| 183 | 238 | { |
| 184 | 239 | self.popType = PopTypeGift; |
| 185 | - [[LVCAnimationManager shareManager] suspend]; | |
| 186 | 240 | [self hiddenView:YES]; |
| 187 | 241 | [self addSubview:self.giftListView]; |
| 188 | 242 | self.giftListView.frame = CGRectMake(0, SCREEN_HEIGHT - 250, SCREEN_WIDTH, 250); |
| ... | ... | @@ -194,6 +248,14 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 194 | 248 | } |
| 195 | 249 | } |
| 196 | 250 | |
| 251 | +- (void)showPrivateView | |
| 252 | +{ | |
| 253 | + PrivateView *privateView = [PrivateView privateView]; | |
| 254 | + privateView.backgroundColor = [UIColor yellowColor]; | |
| 255 | + [self addSubview:privateView]; | |
| 256 | + self.giftPopView = privateView; | |
| 257 | +} | |
| 258 | + | |
| 197 | 259 | - (void)hiddenView:(BOOL)isHidden |
| 198 | 260 | { |
| 199 | 261 | self.bottomToolView.hidden = isHidden; |
| ... | ... | @@ -206,6 +268,8 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 206 | 268 | */ |
| 207 | 269 | - (void)clearCurrentPopView |
| 208 | 270 | { |
| 271 | + [[LVCAnimationManager shareManager] resume]; | |
| 272 | + | |
| 209 | 273 | switch (self.popType) { |
| 210 | 274 | case PopTypeGift: |
| 211 | 275 | { |
| ... | ... | @@ -213,7 +277,6 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 213 | 277 | |
| 214 | 278 | self.giftPopView.frame = CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT); |
| 215 | 279 | [self hiddenView:NO]; |
| 216 | - [[LVCAnimationManager shareManager] resume]; | |
| 217 | 280 | } completion:^(BOOL finished) { |
| 218 | 281 | }]; |
| 219 | 282 | } |
| ... | ... | @@ -221,12 +284,16 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 221 | 284 | case PopTypeChat: |
| 222 | 285 | { |
| 223 | 286 | [self.commentText resignFirstResponder]; |
| 224 | - [[LVCAnimationManager shareManager] resume]; | |
| 225 | 287 | } |
| 226 | 288 | break; |
| 227 | 289 | case PopTypePriMessage: |
| 228 | 290 | { |
| 229 | - | |
| 291 | + [UIView animateWithDuration:0.25 animations:^{ | |
| 292 | + | |
| 293 | + self.giftPopView.frame = CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT); | |
| 294 | + [self hiddenView:NO]; | |
| 295 | + } completion:^(BOOL finished) { | |
| 296 | + }]; | |
| 230 | 297 | } |
| 231 | 298 | break; |
| 232 | 299 | default: |
| ... | ... | @@ -238,6 +305,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 238 | 305 | #pragma mark - buttonClick触摸屏幕关闭方法 |
| 239 | 306 | - (void)tapGestureClick:(UITapGestureRecognizer *)gesture |
| 240 | 307 | { |
| 308 | +// NSLog(@" tap gesture%@",gesture.view); | |
| 241 | 309 | [[LVCAnimationManager shareManager] bubblingWithCenterPoint:CGPointMake(SCREEN_WIDTH - 50, SCREEN_HEIGHT - 50) toView:self.animationBaseView]; |
| 242 | 310 | [self clearCurrentPopView]; |
| 243 | 311 | } |
| ... | ... | @@ -252,10 +320,29 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 252 | 320 | [self textFieldShouldReturn:self.commentText]; |
| 253 | 321 | } |
| 254 | 322 | |
| 323 | +- (void)barrageSiwthChange:(UISwitch *)barrageSwitch | |
| 324 | +{ | |
| 325 | + if (barrageSwitch.isOn) { | |
| 326 | + _commentText.placeholder = @"1视讯币/条"; | |
| 327 | + }else | |
| 328 | + { | |
| 329 | + _commentText.placeholder = @"和大家说点什么吧"; | |
| 330 | + } | |
| 331 | +} | |
| 332 | + | |
| 255 | 333 | #pragma mark - userDetailDelegate聊天室列表个人信息 |
| 256 | 334 | - (void)userClickWithModel:(chatMsgModel *)model |
| 257 | 335 | { |
| 258 | 336 | NSLog(@"点击人:%@",model.name); |
| 337 | + userInfoModel *userModel = [[userInfoModel alloc ]init]; | |
| 338 | + userModel.name = model.name; | |
| 339 | + userModel.icon = model.icon; | |
| 340 | + userModel.sign = model.content;//@"哈哈啊哈哈啊哈哈,这是我的签名~"; | |
| 341 | + userModel.uId = @"123124"; | |
| 342 | + [Tools showBouncedWithModel:userModel callBackBlock:^(UIView * _Nullable bounceView) { | |
| 343 | + NSLog(@"%@",bounceView); | |
| 344 | + | |
| 345 | + }]; | |
| 259 | 346 | } |
| 260 | 347 | |
| 261 | 348 | #pragma mark - CNLiveChatManagerDelegate |
| ... | ... | @@ -299,7 +386,42 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 299 | 386 | */ |
| 300 | 387 | - (void)onReceived:(CNLiveChatMessage *)message |
| 301 | 388 | { |
| 302 | - NSLog(@"onReceived msg:%@",message.messageContent); | |
| 389 | +// NSLog(@"onReceived"); | |
| 390 | + NSDictionary *JSONDic = [Tools dictionaryWithJsonString:message.messageContent]; | |
| 391 | + NSString *content = [JSONDic objectForKey:message_content]; | |
| 392 | + | |
| 393 | + //将消息显示到列表中 | |
| 394 | + chatMsgModel *model = [[chatMsgModel alloc] init]; | |
| 395 | + model.name = message.userInfo.name; | |
| 396 | + model.content = content; | |
| 397 | + model.ID = message.targetId; | |
| 398 | + model.icon = message.userInfo.portraitUri; | |
| 399 | + model.cellWidth = self.chatTableView.width - 20; | |
| 400 | + [self.chatMsgArray addObject:model]; | |
| 401 | + [self.chatTableView reloadData]; | |
| 402 | + | |
| 403 | + NSInteger section = [self.chatTableView numberOfSections]; | |
| 404 | + if (section < 1) return; | |
| 405 | + NSInteger row = [self.chatTableView numberOfRowsInSection:section - 1]; | |
| 406 | + if (row < 1) return; | |
| 407 | + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row - 1 inSection:section - 1]; | |
| 408 | + [self.chatTableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES]; | |
| 409 | + [self.chatTableView reloadData]; | |
| 410 | + | |
| 411 | + NSInteger isBarrage = [[JSONDic objectForKey:message_barrage] integerValue]; | |
| 412 | + | |
| 413 | + if (isBarrage) {//此条消息飘弹幕 | |
| 414 | + | |
| 415 | + chatMsgModel *barrageModel = [[chatMsgModel alloc] init]; | |
| 416 | + barrageModel.name = message.userInfo.name; | |
| 417 | + barrageModel.content = content; | |
| 418 | + barrageModel.icon = message.userInfo.portraitUri; | |
| 419 | +// self.barrageView = [self.barrManager addAnimationWithModel:barrageModel animContentView:self.animationBaseView]; | |
| 420 | + [self.chatManager addAnimationWithModel:barrageModel animContentView:self.animationBaseView];//self.barrageView = | |
| 421 | + | |
| 422 | + self.animationBaseView.delegate = self.chatManager; | |
| 423 | +// self.animationBaseView.barrageView = self.barrageView; | |
| 424 | + } | |
| 303 | 425 | } |
| 304 | 426 | |
| 305 | 427 | /** |
| ... | ... | @@ -386,13 +508,11 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 386 | 508 | return _scrollView; |
| 387 | 509 | } |
| 388 | 510 | |
| 389 | -- (UIView *)animationBaseView | |
| 511 | +- (AnimationBaseView *)animationBaseView | |
| 390 | 512 | { |
| 391 | 513 | if (!_animationBaseView) |
| 392 | 514 | { |
| 393 | - _animationBaseView = [[UIView alloc] initWithFrame:CGRectMake(self.scrollView.width, 0, self.scrollView.width, self.scrollView.height)]; | |
| 394 | - _animationBaseView.backgroundColor = [UIColor redColor]; | |
| 395 | - _animationBaseView.clipsToBounds = YES; | |
| 515 | + _animationBaseView = [[AnimationBaseView alloc] initWithFrame:CGRectMake(self.scrollView.width, 0, self.scrollView.width, self.scrollView.height)]; | |
| 396 | 516 | } |
| 397 | 517 | return _animationBaseView; |
| 398 | 518 | } |
| ... | ... | @@ -412,7 +532,12 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 412 | 532 | { |
| 413 | 533 | if (!_barrageSwitch) |
| 414 | 534 | { |
| 415 | - _barrageSwitch = [[UISwitch alloc] init]; | |
| 535 | + _barrageSwitch = [[UISwitch alloc] initWithFrame:CGRectMake(10, 10, 40, 30)]; | |
| 536 | + _barrageSwitch.tintColor = [UIColor orangeColor]; | |
| 537 | + _barrageSwitch.onTintColor = [UIColor orangeColor]; | |
| 538 | + _barrageSwitch.thumbTintColor = [UIColor lightGrayColor]; | |
| 539 | + _barrageSwitch.centerY = _commentsView.height * 0.5; | |
| 540 | + [_barrageSwitch addTarget:self action:@selector(barrageSiwthChange:) forControlEvents:UIControlEventValueChanged]; | |
| 416 | 541 | } |
| 417 | 542 | return _barrageSwitch; |
| 418 | 543 | } |
| ... | ... | @@ -448,6 +573,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 448 | 573 | [tableView registerClass:[chatListCell class] forCellReuseIdentifier:NSStringFromClass([chatListCell class])]; |
| 449 | 574 | tableView.showsVerticalScrollIndicator = NO; |
| 450 | 575 | tableView.showsHorizontalScrollIndicator = NO; |
| 576 | + tableView.bounces = NO; | |
| 451 | 577 | tableView.backgroundColor = [UIColor clearColor]; |
| 452 | 578 | tableView.separatorStyle = UITableViewCellSeparatorStyleNone; |
| 453 | 579 | _chatTableView = tableView; |
| ... | ... | @@ -460,15 +586,15 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 460 | 586 | if (!_chatMsgArray) { |
| 461 | 587 | |
| 462 | 588 | _chatMsgArray = [NSMutableArray array]; |
| 463 | - NSArray *names = [NSArray arrayWithObjects:@"张旭",@"老大",@"老六",@"什么人",@"金光",@"银光",@"阳光", nil]; | |
| 464 | - NSArray *contents = [NSArray arrayWithObjects:@"阿萨德请问发群里发",@"阿萨德请问发群里发发染发我if顽皮的发球局平均分配WiF",@"阿萨德请问发群里发发染发我if顽皮的发球局平均分配WiFi我if为打破我姐夫我批发价为破房间我批发价我批发价为 爱神的箭怕我的哦期",@"里发发染发我if顽",@"金光神的箭怕我的哦期间",@"银光",@"阳光神的箭怕我的哦期间", nil]; | |
| 465 | - for (int i = 0 ; i < names.count; i ++) { | |
| 466 | - chatMsgModel *model = [[chatMsgModel alloc] init]; | |
| 467 | - model.name = names[i]; | |
| 468 | - model.content = contents[i]; | |
| 469 | - model.cellWidth = self.chatTableView.width - 20; | |
| 470 | - [self.chatMsgArray addObject:model]; | |
| 471 | - } | |
| 589 | +// NSArray *names = [NSArray arrayWithObjects:@"张旭",@"老大",@"老六",@"什么人",@"金光",@"银光",@"阳光", nil]; | |
| 590 | +// NSArray *contents = [NSArray arrayWithObjects:@"阿萨德请问发群里发",@"阿萨德请问发群里发发染发我if顽皮的发球局平均分配WiF",@"阿萨德请问发群里发发染发我if顽皮的发球局平均分配WiFi我if为打破我姐夫我批发价为破房间我批发价我批发价为 爱神的箭怕我的哦期",@"里发发染发我if顽",@"金光神的箭怕我的哦期间",@"银光",@"阳光神的箭怕我的哦期间", nil]; | |
| 591 | +// for (int i = 0 ; i < names.count; i ++) { | |
| 592 | +// chatMsgModel *model = [[chatMsgModel alloc] init]; | |
| 593 | +// model.name = names[i]; | |
| 594 | +// model.content = contents[i]; | |
| 595 | +// model.cellWidth = self.chatTableView.width - 20; | |
| 596 | +// [self.chatMsgArray addObject:model]; | |
| 597 | +// } | |
| 472 | 598 | } |
| 473 | 599 | return _chatMsgArray; |
| 474 | 600 | } |
| ... | ... | @@ -503,6 +629,22 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 |
| 503 | 629 | return _giftListView; |
| 504 | 630 | } |
| 505 | 631 | |
| 632 | +//- (BarrageManager *)barrManager | |
| 633 | +//{ | |
| 634 | +// if (!_barrManager) | |
| 635 | +// { | |
| 636 | +// _barrManager = [BarrageManager sharedManager]; | |
| 637 | +// } | |
| 638 | +// return _barrManager; | |
| 639 | +//} | |
| 640 | +- (ChatBarrageManager *)chatManager | |
| 641 | +{ | |
| 642 | + if (!_chatManager) | |
| 643 | + { | |
| 644 | + _chatManager = [ChatBarrageManager sharedManager]; | |
| 645 | + } | |
| 646 | + return _chatManager; | |
| 647 | +} | |
| 506 | 648 | /* |
| 507 | 649 | // Only override drawRect: if you perform custom drawing. |
| 508 | 650 | // An empty implementation adversely affects performance during animation. | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/PrivateView/PrivateView.h
0 → 100644
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/PrivateView/PrivateView.m
0 → 100644
| 1 | +// | |
| 2 | +// PrivateView.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/23. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "PrivateView.h" | |
| 10 | + | |
| 11 | +@implementation PrivateView | |
| 12 | + | |
| 13 | ++ (instancetype)privateView | |
| 14 | +{ | |
| 15 | + return [[PrivateView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT - 300, SCREEN_WIDTH, 300)]; | |
| 16 | +} | |
| 17 | +/* | |
| 18 | +// Only override drawRect: if you perform custom drawing. | |
| 19 | +// An empty implementation adversely affects performance during animation. | |
| 20 | +- (void)drawRect:(CGRect)rect { | |
| 21 | + // Drawing code | |
| 22 | +} | |
| 23 | +*/ | |
| 24 | + | |
| 25 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/userInfoModel.h
0 → 100644
| 1 | +// | |
| 2 | +// userInfoModel.h | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/3/23. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "BaseModel.h" | |
| 10 | + | |
| 11 | +@interface userInfoModel : BaseModel | |
| 12 | + | |
| 13 | +@property (nonatomic ,copy) NSString * _Nullable icon; | |
| 14 | +@property (nonatomic ,copy) NSString * _Nullable name; | |
| 15 | +@property (nonatomic ,copy) NSString * _Nullable sign; | |
| 16 | +@property (nonatomic ,copy) NSString * _Nullable uId; | |
| 17 | + | |
| 18 | + | |
| 19 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/userInfoModel.m
0 → 100644
LiveVideoCloud/LiveVideoCloud/Classes/Sections/LiveSections/Controller/LVCLiveViewController.m
| ... | ... | @@ -10,45 +10,32 @@ |
| 10 | 10 | #import <CNLivePlayerSDK/CNLiveGPUStreamerKit.h> |
| 11 | 11 | #import <CNLivePlayerSDK/CNLiveWebcastManager.h> |
| 12 | 12 | #import "FilterFunctionView.h" |
| 13 | +#import "LVCUGCLivePrepareView.h" | |
| 13 | 14 | |
| 14 | 15 | #define KAppId @"60_irn9edco29" |
| 15 | 16 | #define KAppKey @"69fe70bda67e059286ad509d9f5377f815955645b52f94" |
| 16 | 17 | |
| 17 | -@interface LVCLiveViewController ()<UIGestureRecognizerDelegate> { | |
| 18 | - // 开始直播 | |
| 19 | - UIButton *_startLiveBtn; | |
| 20 | - // 缩放因子 | |
| 21 | - CGFloat _currentPinchZoomFactor; | |
| 22 | -} | |
| 18 | +@interface LVCLiveViewController ()<UIGestureRecognizerDelegate> | |
| 23 | 19 | |
| 24 | -@property (nonatomic,strong) UIView *captureView; | |
| 20 | +@property (nonatomic, strong) LVCUGCLivePrepareView *prepareView; | |
| 25 | 21 | |
| 26 | -@property (nonatomic,strong) CNLiveGPUStreamerKit *kitCN; | |
| 22 | +@property (nonatomic, strong) UIView *captureView; | |
| 27 | 23 | |
| 28 | -@property (nonatomic,strong) FilterFunctionView *filterView; | |
| 24 | +@property (nonatomic, strong) CNLiveGPUStreamerKit *kitCN; | |
| 29 | 25 | |
| 30 | -@end | |
| 26 | +@property (nonatomic, strong) FilterFunctionView *filterView; | |
| 31 | 27 | |
| 32 | -@implementation LVCLiveViewController | |
| 28 | +@property (nonatomic, strong) UIButton *quitButton; | |
| 33 | 29 | |
| 34 | -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { | |
| 35 | - | |
| 36 | - if (_kitCN) { | |
| 37 | - return UIInterfaceOrientationMaskAllButUpsideDown; | |
| 38 | - } else { | |
| 39 | - return UIInterfaceOrientationMaskPortrait; | |
| 40 | - } | |
| 41 | -} | |
| 30 | +@property (nonatomic, strong) UIButton *openFilterButton; | |
| 42 | 31 | |
| 43 | --(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { | |
| 44 | - | |
| 45 | - UIInterfaceOrientation orie = [[UIApplication sharedApplication] statusBarOrientation]; | |
| 46 | - [_kitCN rotatePreviewTo:orie]; | |
| 47 | - | |
| 48 | - if (_kitCN.streamerBase.isStreaming) { | |
| 49 | - [_kitCN rotateStreamTo:orie]; | |
| 50 | - } | |
| 51 | -} | |
| 32 | +@property (nonatomic, strong) UIButton *changeCameraButton; | |
| 33 | + | |
| 34 | +@property (nonatomic, strong) UIButton *openFlashButton; | |
| 35 | + | |
| 36 | +@end | |
| 37 | + | |
| 38 | +@implementation LVCLiveViewController | |
| 52 | 39 | |
| 53 | 40 | - (void)viewDidLoad { |
| 54 | 41 | [super viewDidLoad]; |
| ... | ... | @@ -56,17 +43,18 @@ |
| 56 | 43 | self.view.backgroundColor = [UIColor blueColor]; |
| 57 | 44 | |
| 58 | 45 | [self.view addSubview:self.captureView]; |
| 46 | + [self.view addSubview:self.prepareView]; | |
| 47 | + [self.view addSubview:self.quitButton]; | |
| 48 | + [self.view addSubview:self.changeCameraButton]; | |
| 49 | + [self.view addSubview:self.openFilterButton]; | |
| 50 | + [self.view addSubview:self.openFlashButton]; | |
| 51 | + [self.view addSubview:self.filterView]; | |
| 59 | 52 | |
| 60 | - UIButton *closeBtn = [[UIButton alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 50, 30, 50, 30)]; | |
| 61 | - [closeBtn setTitle:@"关闭" forState:UIControlStateNormal]; | |
| 62 | - [closeBtn addTarget:self action:@selector(closeBtnClivk) forControlEvents:UIControlEventTouchUpInside]; | |
| 63 | - [self.view addSubview:closeBtn]; | |
| 64 | - | |
| 65 | - // 活动Id | |
| 53 | + // 初始化推流 | |
| 66 | 54 | NSString *activityId = [NSString stringWithFormat:@"%d%d%d%d%d",arc4random()%9,arc4random()%9,arc4random()%9,arc4random()%9,arc4random()%9]; |
| 67 | - // 初始化直播云 | |
| 55 | + | |
| 68 | 56 | [[CNLiveWebcastManager manager] initWithAppId:KAppId appKey:KAppKey]; |
| 69 | - // 初始化推流 | |
| 57 | + | |
| 70 | 58 | _kitCN = [[CNLiveGPUStreamerKit alloc] initWithDefaultConfigWithActivityId:activityId channelId:@"iOStest" isHorizontalScreen:@"0"]; |
| 71 | 59 | |
| 72 | 60 | // _kitCN.activityName = @"iOS test"; |
| ... | ... | @@ -74,25 +62,12 @@ |
| 74 | 62 | |
| 75 | 63 | // 设置推流配置 |
| 76 | 64 | [self setStreamerCfg]; |
| 77 | - // 添加监听 | |
| 78 | - [self addObservers]; | |
| 79 | - | |
| 80 | - _startLiveBtn = [self addButton:@"开始直播" frame:CGRectMake(100, 40, 80, 40) action:@selector(startCapture:)]; | |
| 81 | - [_startLiveBtn setTitle:@"开始直播" forState:UIControlStateNormal]; | |
| 82 | - [_startLiveBtn setTitle:@"停止直播" forState:UIControlStateSelected]; | |
| 83 | 65 | |
| 84 | - [self addButton:@"关闭预览" frame:CGRectMake(10, 40, 80, 40) action:@selector(startPreview:)]; | |
| 85 | -// [self addButton:@"退出" frame:CGRectMake(190, 40, 80, 40) action:@selector(quit)]; | |
| 86 | - [self addButton:@"美颜" frame:CGRectMake(10, 100, 80, 40) action:@selector(openFilter:)]; | |
| 87 | - [self addButton:@"摄像头" frame:CGRectMake(100, 100, 80, 40) action:@selector(changeCamera:)]; | |
| 88 | - [self addButton:@"闪光灯" frame:CGRectMake(190, 100, 80, 40) action:@selector(openFlash)]; | |
| 66 | + [self addObservers]; | |
| 89 | 67 | |
| 90 | 68 | UITapGestureRecognizer * singleRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTap:)]; |
| 91 | 69 | singleRecognizer.delegate = self; |
| 92 | 70 | [self.captureView addGestureRecognizer:singleRecognizer]; |
| 93 | - | |
| 94 | - UIPinchGestureRecognizer *pinch = [[UIPinchGestureRecognizer alloc]initWithTarget:self action:@selector(pinchDetected:)]; | |
| 95 | - [self.view addGestureRecognizer:pinch]; | |
| 96 | 71 | } |
| 97 | 72 | |
| 98 | 73 | #pragma mark - initialization Streamer |
| ... | ... | @@ -124,75 +99,24 @@ |
| 124 | 99 | // 启动预览 |
| 125 | 100 | [_kitCN startPreview:self.captureView]; |
| 126 | 101 | |
| 127 | - //水印图片 | |
| 128 | -// _kitCN.watermark.logoPic = [UIImage imageNamed:@"互动电视180x180"]; | |
| 129 | -// _kitCN.watermark.logoRect = CGRectMake(0.8, 0.8, 50, 50); | |
| 130 | -// _kitCN.watermark.logoAlpha = 0.6; | |
| 131 | - | |
| 132 | - //水印文字 | |
| 133 | -// _kitCN.watermark.textLabel = [[UILabel alloc] init]; | |
| 134 | -// _kitCN.watermark.textLabel.text = [NSString stringWithFormat:@"cnlive"]; | |
| 135 | -// _kitCN.watermark.textLabel.font = [UIFont systemFontOfSize:8]; | |
| 136 | -// _kitCN.watermark.textRect = CGRectMake(0.78, 0.88, 0.2, 0.04); | |
| 137 | -// [_kitCN.watermark updateTextLabel]; | |
| 138 | - | |
| 139 | 102 | } |
| 140 | 103 | |
| 141 | -#pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 142 | -// 拍摄视图 | |
| 143 | -- (UIView *)captureView { | |
| 144 | - | |
| 145 | - if (!_captureView) { | |
| 146 | - _captureView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)]; | |
| 147 | - _captureView.backgroundColor = [UIColor blackColor]; | |
| 148 | - } | |
| 149 | - return _captureView; | |
| 150 | -} | |
| 151 | - | |
| 152 | - | |
| 153 | 104 | #pragma mark - UIButton Action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 154 | - | |
| 155 | -// 开始推流 | |
| 156 | -- (void)startCapture:(UIButton *)button { | |
| 105 | +- (void)startCapture:(UIButton *)button { // 开始推流 | |
| 157 | 106 | |
| 158 | - button.selected = !button.selected; | |
| 107 | + [_prepareView removeFromSuperview]; | |
| 159 | 108 | |
| 160 | - if (button.selected) { | |
| 161 | - [_kitCN startStream:^{ | |
| 162 | - NSLog(@"开启推流成功 ------- success"); | |
| 163 | - } failure:^(NSDictionary *errorDic) { | |
| 164 | - NSString *str=[[NSMutableString alloc] initWithData:errorDic[@"errorMessage"] encoding:NSUTF8StringEncoding]; | |
| 165 | - NSLog(@"%@",str); | |
| 166 | - [self toast:errorDic[@"errorMessage"]]; | |
| 167 | - _startLiveBtn.selected = NO; | |
| 168 | - }]; | |
| 169 | - }else{ | |
| 170 | - | |
| 171 | - [_kitCN stopStream]; | |
| 172 | - } | |
| 109 | + [_kitCN startStream:^{ | |
| 110 | + NSLog(@"开启推流成功 ------- success"); | |
| 111 | + } failure:^(NSDictionary *errorDic) { | |
| 112 | + NSString *str=[[NSMutableString alloc] initWithData:errorDic[@"errorMessage"] encoding:NSUTF8StringEncoding]; | |
| 113 | + NSLog(@"%@",str); | |
| 114 | + [self toast:errorDic[@"errorMessage"]]; | |
| 115 | + }]; | |
| 173 | 116 | } |
| 174 | 117 | |
| 175 | -// 开始 / 关闭 预览 | |
| 176 | -- (void)startPreview:(UIButton *)button { | |
| 177 | - | |
| 178 | - button.selected = !button.selected; | |
| 179 | - if (button.selected) { | |
| 180 | - _startLiveBtn.enabled = NO; | |
| 181 | - [button setTitle:@"开启预览" forState:UIControlStateNormal]; | |
| 182 | - if (_kitCN.streamState == CNLiveStreamStateConnected) { | |
| 183 | - [_kitCN stopStream]; | |
| 184 | - _startLiveBtn.selected = NO; | |
| 185 | - } | |
| 186 | - [_kitCN stopPreview]; | |
| 187 | - }else{ | |
| 188 | - [_kitCN startPreview:self.captureView]; | |
| 189 | - [button setTitle:@"关闭预览" forState:UIControlStateNormal]; | |
| 190 | - _startLiveBtn.enabled = YES; | |
| 191 | - } | |
| 192 | -} | |
| 193 | 118 | |
| 194 | -// 美颜滤镜 | |
| 195 | -- (void)openFilter:(UIButton *)button { | |
| 119 | +- (void)openFilter:(UIButton *)button { // 美颜滤镜 | |
| 196 | 120 | |
| 197 | 121 | button.selected = !button.selected; |
| 198 | 122 | |
| ... | ... | @@ -220,14 +144,14 @@ |
| 220 | 144 | } else { |
| 221 | 145 | |
| 222 | 146 | _filterView.hidden = YES; |
| 223 | - | |
| 224 | 147 | } |
| 225 | 148 | } |
| 226 | 149 | |
| 227 | -// 转换前后置摄像头 | |
| 228 | -- (void)changeCamera:(UIButton *)button { | |
| 150 | + | |
| 151 | +- (void)changeCamera:(UIButton *)button { // 转换前后置摄像头 | |
| 229 | 152 | |
| 230 | -// button.selected = !button.selected; | |
| 153 | + button.selected = !button.selected; | |
| 154 | + _openFlashButton.hidden = !_openFlashButton.hidden; | |
| 231 | 155 | // if (button.selected) { |
| 232 | 156 | // _kitCN.cameraPosition = AVCaptureDevicePositionBack; |
| 233 | 157 | // }else{ |
| ... | ... | @@ -237,15 +161,16 @@ |
| 237 | 161 | |
| 238 | 162 | } |
| 239 | 163 | |
| 240 | -// 闪光灯 | |
| 241 | -- (void)openFlash { | |
| 164 | + | |
| 165 | +- (void)openFlash:(UIButton *)button { // 闪光灯 | |
| 242 | 166 | |
| 167 | + button.selected = !button.selected; | |
| 243 | 168 | [_kitCN toggleTorch]; |
| 244 | 169 | // [_kitCN setTorchMode:AVCaptureTorchModeOn]; |
| 245 | 170 | } |
| 246 | 171 | |
| 247 | -// 退出 | |
| 248 | -- (void)closeBtnClivk { | |
| 172 | + | |
| 173 | +- (void)quitBtnClick { // 退出 | |
| 249 | 174 | |
| 250 | 175 | if (_kitCN.streamState == CNLiveStreamStateConnected) { |
| 251 | 176 | [_kitCN stopStream]; |
| ... | ... | @@ -259,38 +184,32 @@ |
| 259 | 184 | |
| 260 | 185 | |
| 261 | 186 | #pragma mark - UIGestureRecognizer Action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 262 | -//对焦与曝光 | |
| 263 | -- (void)onTap:(UIGestureRecognizer *)sender { | |
| 187 | + | |
| 188 | +- (void)onTap:(UIGestureRecognizer *)sender { //对焦与曝光 | |
| 264 | 189 | |
| 265 | 190 | CGPoint current = [sender locationInView:self.view]; |
| 266 | 191 | CGPoint point = [self convertToPointOfInterestFromViewCoordinates:current]; |
| 267 | 192 | [_kitCN exposureAtPoint:point]; |
| 268 | 193 | [_kitCN focusAtPoint:point]; |
| 269 | -} | |
| 270 | - | |
| 271 | -//缩放 | |
| 272 | -- (void)pinchDetected:(UIPinchGestureRecognizer *)recognizer { | |
| 273 | 194 | |
| 274 | - if (recognizer.state == UIGestureRecognizerStateBegan) { | |
| 275 | - _currentPinchZoomFactor = _kitCN.pinchZoomFactor; | |
| 195 | + if ([_prepareView.titleTextField isFirstResponder]) { | |
| 196 | + [_prepareView.titleTextField resignFirstResponder]; | |
| 276 | 197 | } |
| 277 | - CGFloat zoomFactor = _currentPinchZoomFactor * recognizer.scale;//当前触摸缩放因子*坐标比例 | |
| 278 | - [_kitCN setPinchZoomFactor:zoomFactor]; | |
| 279 | 198 | } |
| 280 | 199 | |
| 281 | 200 | #pragma mark - notification !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 282 | -// 进入后台 | |
| 283 | -- (void)enterBg { | |
| 201 | + | |
| 202 | +- (void)enterBg { // 进入后台 | |
| 284 | 203 | |
| 285 | 204 | [_kitCN appEnterBackground]; |
| 286 | 205 | } |
| 287 | -// 回到前台 | |
| 288 | -- (void)becameActive { | |
| 206 | + | |
| 207 | +- (void)becameActive { // 回到前台 | |
| 289 | 208 | |
| 290 | 209 | [_kitCN appBecomeActive]; |
| 291 | 210 | } |
| 292 | -// 采集状态改变 | |
| 293 | -- (void)captureStateChange { | |
| 211 | + | |
| 212 | +- (void)captureStateChange { // 采集状态改变 | |
| 294 | 213 | |
| 295 | 214 | if ( _kitCN.captureState == CNLiveCaptureStateIdle){ |
| 296 | 215 | //初始化时状态为空闲 |
| ... | ... | @@ -325,8 +244,8 @@ |
| 325 | 244 | |
| 326 | 245 | } |
| 327 | 246 | } |
| 328 | -// 推流状态改变 | |
| 329 | -- (void)streamStateChange { | |
| 247 | + | |
| 248 | +- (void)streamStateChange { // 推流状态改变 | |
| 330 | 249 | |
| 331 | 250 | if (_kitCN.streamState == CNLiveStreamStateIdle) { |
| 332 | 251 | |
| ... | ... | @@ -362,8 +281,8 @@ |
| 362 | 281 | NSLog(@"---------CNLiveStopStreamSuccess"); |
| 363 | 282 | } |
| 364 | 283 | } |
| 365 | -// 推流失败 | |
| 366 | -- (void)onStreamError { | |
| 284 | + | |
| 285 | +- (void)onStreamError { // 推流失败 | |
| 367 | 286 | |
| 368 | 287 | CNLiveStreamErrorCode err = _kitCN.streamErrorCode; |
| 369 | 288 | |
| ... | ... | @@ -384,7 +303,6 @@ |
| 384 | 303 | else if ( CNLiveStreamErrorCode_ABNORMAL == err) { |
| 385 | 304 | |
| 386 | 305 | [self toast:@"推流异常中断~~"]; |
| 387 | - _startLiveBtn.selected = NO; | |
| 388 | 306 | |
| 389 | 307 | } else if (err == CNLiveStreamErrorCode_CODEC_OPEN_FAILED) { |
| 390 | 308 | NSLog(@"video codec open failed, try software codec"); |
| ... | ... | @@ -403,8 +321,8 @@ |
| 403 | 321 | |
| 404 | 322 | } |
| 405 | 323 | |
| 406 | -// 重试 | |
| 407 | -- (void) tryReconnect { | |
| 324 | + | |
| 325 | +- (void) tryReconnect { // 重试 | |
| 408 | 326 | |
| 409 | 327 | dispatch_time_t delay = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)); |
| 410 | 328 | dispatch_after(delay, dispatch_get_main_queue(), ^{ |
| ... | ... | @@ -415,18 +333,16 @@ |
| 415 | 333 | |
| 416 | 334 | [_kitCN startStream:^{ |
| 417 | 335 | NSLog(@"开启推流成功 ------- success"); |
| 418 | - _startLiveBtn.selected = YES; | |
| 419 | 336 | |
| 420 | 337 | } failure:^(NSDictionary *errorDic) { |
| 421 | 338 | [self toast:errorDic[@"errorMessage"]]; |
| 422 | - _startLiveBtn.selected = NO; | |
| 423 | 339 | }]; |
| 424 | 340 | |
| 425 | 341 | }); |
| 426 | 342 | } |
| 427 | 343 | |
| 428 | -// 提示框 | |
| 429 | -- (void)toast:(NSString*)message { | |
| 344 | + | |
| 345 | +- (void)toast:(NSString*)message { // 提示框 | |
| 430 | 346 | |
| 431 | 347 | UIAlertView *toast = [[UIAlertView alloc] initWithTitle:nil |
| 432 | 348 | message:message |
| ... | ... | @@ -441,8 +357,8 @@ |
| 441 | 357 | } |
| 442 | 358 | |
| 443 | 359 | |
| 444 | -// 将UI的坐标转换成相机坐标 | |
| 445 | -- (CGPoint)convertToPointOfInterestFromViewCoordinates:(CGPoint)viewCoordinates { | |
| 360 | + | |
| 361 | +- (CGPoint)convertToPointOfInterestFromViewCoordinates:(CGPoint)viewCoordinates {// 将UI的坐标转换成相机坐标 | |
| 446 | 362 | |
| 447 | 363 | CGPoint pointOfInterest = CGPointMake(.5f, .5f); |
| 448 | 364 | CGSize frameSize = self.view.frame.size; |
| ... | ... | @@ -476,8 +392,76 @@ |
| 476 | 392 | return pointOfInterest; |
| 477 | 393 | } |
| 478 | 394 | |
| 479 | -#pragma mark - Action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 395 | +#pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 396 | + | |
| 397 | +- (LVCUGCLivePrepareView *)prepareView { | |
| 398 | + | |
| 399 | + if (!_prepareView) { | |
| 400 | + _prepareView = [[LVCUGCLivePrepareView alloc] initWithFrame:self.view.bounds]; | |
| 401 | + [_prepareView.startButton addTarget:self action:@selector(startCapture:) forControlEvents:UIControlEventTouchUpInside]; | |
| 402 | + UITapGestureRecognizer * tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTap:)]; | |
| 403 | + tapRecognizer.delegate = self; | |
| 404 | + [_prepareView addGestureRecognizer:tapRecognizer]; | |
| 405 | + } | |
| 406 | + return _prepareView; | |
| 407 | +} | |
| 480 | 408 | |
| 409 | +- (FilterFunctionView *)filterView | |
| 410 | +{ | |
| 411 | + if (!_filterView) { | |
| 412 | + _filterView = [[FilterFunctionView alloc] initWithFrame:CGRectMake(0, 75, SCREEN_WIDTH, 200)]; | |
| 413 | + _filterView.hidden = YES; | |
| 414 | + } | |
| 415 | + return _filterView; | |
| 416 | +} | |
| 417 | + | |
| 418 | +- (UIView *)captureView { // 拍摄视图 | |
| 419 | + | |
| 420 | + if (!_captureView) { | |
| 421 | + _captureView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)]; | |
| 422 | + _captureView.backgroundColor = [UIColor blackColor]; | |
| 423 | + } | |
| 424 | + return _captureView; | |
| 425 | +} | |
| 426 | + | |
| 427 | +- (UIButton *)quitButton { | |
| 428 | + | |
| 429 | + if (!_quitButton) { | |
| 430 | + _quitButton = [self createButtonWithFrame:CGRectMake(SCREEN_WIDTH - 50, 30, 35, 35) image:@"LiveCloseNormal" selected:@"LiveCloseTouch"]; | |
| 431 | + [_quitButton addTarget:self action:@selector(quitBtnClick) forControlEvents:UIControlEventTouchUpInside]; | |
| 432 | + } | |
| 433 | + return _quitButton; | |
| 434 | +} | |
| 435 | + | |
| 436 | +- (UIButton *)changeCameraButton { | |
| 437 | + | |
| 438 | + if (!_changeCameraButton) { | |
| 439 | + _changeCameraButton = [self createButtonWithFrame:CGRectMake(SCREEN_WIDTH - 100, 30, 35, 35) image:@"camera" selected:@"Select the camera"]; | |
| 440 | + [_changeCameraButton addTarget:self action:@selector(changeCamera:) forControlEvents:UIControlEventTouchUpInside]; | |
| 441 | + } | |
| 442 | + return _changeCameraButton; | |
| 443 | +} | |
| 444 | + | |
| 445 | +- (UIButton *)openFlashButton { | |
| 446 | + | |
| 447 | + if (!_openFlashButton) { | |
| 448 | + _openFlashButton = [self createButtonWithFrame:CGRectMake(SCREEN_WIDTH - 100, 75, 35, 35) image:@"open flash" selected:@"Flash off"]; | |
| 449 | + _openFlashButton.hidden = YES; | |
| 450 | + [_openFlashButton addTarget:self action:@selector(openFlash:) forControlEvents:UIControlEventTouchUpInside]; | |
| 451 | + } | |
| 452 | + return _openFlashButton; | |
| 453 | +} | |
| 454 | + | |
| 455 | +- (UIButton *)openFilterButton { | |
| 456 | + | |
| 457 | + if (!_openFilterButton) { | |
| 458 | + _openFilterButton = [self createButtonWithFrame:CGRectMake(SCREEN_WIDTH - 150, 30, 35, 35) image:@"Is closed" selected:@"Is open"]; | |
| 459 | + [_openFilterButton addTarget:self action:@selector(openFilter:) forControlEvents:UIControlEventTouchUpInside]; | |
| 460 | + } | |
| 461 | + return _openFilterButton; | |
| 462 | +} | |
| 463 | + | |
| 464 | +#pragma mark - Action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 481 | 465 | - (void)addObservers { |
| 482 | 466 | |
| 483 | 467 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(captureStateChange) name:CNLiveCaptureStateDidChangeNotification object:nil]; |
| ... | ... | @@ -517,6 +501,15 @@ |
| 517 | 501 | |
| 518 | 502 | } |
| 519 | 503 | |
| 504 | +- (UIButton *)createButtonWithFrame:(CGRect)frame image:(NSString *)image selected:(NSString *)selected { | |
| 505 | + | |
| 506 | + UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 507 | + [btn setFrame:frame]; | |
| 508 | + [btn setImage:[UIImage imageNamed:image] forState:UIControlStateNormal]; | |
| 509 | + [btn setImage:[UIImage imageNamed:selected] forState:UIControlStateSelected]; | |
| 510 | + return btn; | |
| 511 | +} | |
| 512 | + | |
| 520 | 513 | - (void)didReceiveMemoryWarning { |
| 521 | 514 | [super didReceiveMemoryWarning]; |
| 522 | 515 | // Dispose of any resources that can be recreated. | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/LiveSections/View/FilterFunctionView.m
| ... | ... | @@ -28,9 +28,9 @@ |
| 28 | 28 | { |
| 29 | 29 | self = [super initWithFrame:frame]; |
| 30 | 30 | if (self) { |
| 31 | - [self addSubview:self.slider1]; | |
| 32 | - [self addSubview:self.slider2]; | |
| 33 | - [self addSubview:self.slider3]; | |
| 31 | +// [self addSubview:self.slider1]; | |
| 32 | +// [self addSubview:self.slider2]; | |
| 33 | +// [self addSubview:self.slider3]; | |
| 34 | 34 | [self addSubview:self.effectPicker]; |
| 35 | 35 | [self addSubview:self.filterGroupType]; |
| 36 | 36 | |
| ... | ... | @@ -135,7 +135,7 @@ |
| 135 | 135 | - (UIPickerView *)effectPicker |
| 136 | 136 | { |
| 137 | 137 | if (!_effectPicker) { |
| 138 | - _effectPicker = [[UIPickerView alloc] initWithFrame:CGRectMake(8, 130, self.bounds.size.width-16, 100)]; | |
| 138 | + _effectPicker = [[UIPickerView alloc] initWithFrame:CGRectMake(8, 20, self.bounds.size.width-16, 100)]; | |
| 139 | 139 | _effectPicker.showsSelectionIndicator=YES; |
| 140 | 140 | _effectPicker.tintColor = [UIColor whiteColor]; |
| 141 | 141 | _effectPicker.dataSource = self; | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/LiveSections/View/LVCUGCLivePrepareView.h
0 → 100644
| 1 | +// | |
| 2 | +// LVCUGCLivePrepareView.h | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/3/27. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface LVCUGCLivePrepareView : UIView | |
| 12 | + | |
| 13 | +@property (nonatomic, strong) UIButton *startButton; | |
| 14 | + | |
| 15 | +@property (nonatomic, strong) UITextField *titleTextField; | |
| 16 | + | |
| 17 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/LiveSections/View/LVCUGCLivePrepareView.m
0 → 100644
| 1 | +// | |
| 2 | +// LVCUGCLivePrepareView.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/3/27. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "LVCUGCLivePrepareView.h" | |
| 10 | + | |
| 11 | +@interface LVCUGCLivePrepareView() | |
| 12 | + | |
| 13 | +@property (nonatomic, strong) UIImageView *iconView; | |
| 14 | + | |
| 15 | +@property (nonatomic, strong) UIView *lineView; | |
| 16 | + | |
| 17 | +@end | |
| 18 | + | |
| 19 | +@implementation LVCUGCLivePrepareView | |
| 20 | + | |
| 21 | +- (instancetype)initWithFrame:(CGRect)frame | |
| 22 | +{ | |
| 23 | + self = [super initWithFrame:frame]; | |
| 24 | + if (self) { | |
| 25 | + self.backgroundColor = [UIColor clearColor]; | |
| 26 | + [self addSubview:self.iconView]; | |
| 27 | + [self addSubview:self.titleTextField]; | |
| 28 | + [self addSubview:self.lineView]; | |
| 29 | + [self addSubview:self.startButton]; | |
| 30 | + } | |
| 31 | + return self; | |
| 32 | +} | |
| 33 | + | |
| 34 | +#pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 35 | +- (UIImageView *)iconView { | |
| 36 | + | |
| 37 | + if (!_iconView) { | |
| 38 | + NSString *path = [[NSBundle mainBundle] pathForResource:@"头像" ofType:@"jpg"]; | |
| 39 | + UIImage *image = [UIImage imageWithContentsOfFile:path]; | |
| 40 | + _iconView = [[UIImageView alloc] initWithImage:image]; | |
| 41 | + _iconView.frame = CGRectMake(10, SCREEN_HEIGHT * 0.35, 90, 90); | |
| 42 | + _iconView.layer.cornerRadius = 45; | |
| 43 | + _iconView.layer.masksToBounds = YES; | |
| 44 | + } | |
| 45 | + return _iconView; | |
| 46 | +} | |
| 47 | + | |
| 48 | +- (UITextField *)titleTextField { | |
| 49 | + | |
| 50 | + if (!_titleTextField) { | |
| 51 | + _titleTextField = [[UITextField alloc] initWithFrame:CGRectMake(110, SCREEN_HEIGHT * 0.35 + 50, SCREEN_WIDTH - 120, 30)]; | |
| 52 | + | |
| 53 | + NSMutableAttributedString *placeholder = [[NSMutableAttributedString alloc]initWithString:@"起个名字开始直播~"]; | |
| 54 | + | |
| 55 | + | |
| 56 | + _titleTextField.attributedPlaceholder = placeholder; | |
| 57 | + | |
| 58 | + _titleTextField.font = [UIFont systemFontOfSize:19]; | |
| 59 | + } | |
| 60 | + return _titleTextField; | |
| 61 | +} | |
| 62 | + | |
| 63 | +- (UIView *)lineView { | |
| 64 | + | |
| 65 | + if (!_lineView) { | |
| 66 | + _lineView = [[UIView alloc] initWithFrame:CGRectMake(110, SCREEN_HEIGHT * 0.35 + 82, SCREEN_WIDTH - 120, 2)]; | |
| 67 | + _lineView.backgroundColor = [UIColor blackColor]; | |
| 68 | + } | |
| 69 | + return _lineView; | |
| 70 | +} | |
| 71 | + | |
| 72 | +- (UIButton *)startButton { | |
| 73 | + | |
| 74 | + if (!_startButton) { | |
| 75 | + _startButton = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 76 | + _startButton.frame = CGRectMake(30, SCREEN_HEIGHT * 0.62, SCREEN_WIDTH - 60, 38); | |
| 77 | + _startButton.backgroundColor = [UIColor redColor]; | |
| 78 | + [_startButton setTitle:@"开始直播" forState:UIControlStateNormal]; | |
| 79 | + _startButton.titleLabel.font = [UIFont systemFontOfSize:20]; | |
| 80 | + [_startButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; | |
| 81 | + [_startButton setTitleColor:[UIColor blackColor] forState:UIControlStateHighlighted]; | |
| 82 | + _startButton.layer.cornerRadius = 19; | |
| 83 | + _startButton.layer.masksToBounds = YES; | |
| 84 | + } | |
| 85 | + return _startButton; | |
| 86 | +} | |
| 87 | + | |
| 88 | + | |
| 89 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/UtilKits/Category/UIImageView+ZXExtension.h
0 → 100755
LiveVideoCloud/LiveVideoCloud/UtilKits/Category/UIImageView+ZXExtension.m
0 → 100755
| 1 | +// | |
| 2 | +// UIImageView+ZXExtension.m | |
| 3 | +// 百思LiveVideoCloud姐 | |
| 4 | +// | |
| 5 | +// Created by mac on 16/8/31. | |
| 6 | +// Copyright © 2016年 mac. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "UIImageView+ZXExtension.h" | |
| 10 | +#import "UIImageView+WebCache.h" | |
| 11 | + | |
| 12 | +static NSString *defaultUserIcon = @"defaultUserIcon"; | |
| 13 | + | |
| 14 | +@implementation UIImageView (ZXExtension) | |
| 15 | +- (void)zx_setHeader:(NSString *)url | |
| 16 | +{ | |
| 17 | + [self zx_setCircleHeader:url]; | |
| 18 | +} | |
| 19 | + | |
| 20 | +- (void)zx_setRectHeader:(NSString *)url | |
| 21 | +{ | |
| 22 | + [self sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:[UIImage imageNamed:defaultUserIcon]]; | |
| 23 | +} | |
| 24 | + | |
| 25 | +- (void)zx_setCircleHeader:(NSString *)url | |
| 26 | +{ | |
| 27 | + weakself; | |
| 28 | + UIImage *placeholder = [[UIImage imageNamed:defaultUserIcon] zx_circleImage]; | |
| 29 | + [self sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:placeholder completed: | |
| 30 | + ^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { | |
| 31 | + // 如果图片下载失败,就不做任何处理,按照默认的做法:会显示占位图片 | |
| 32 | + if (image == nil) return; | |
| 33 | + | |
| 34 | + weakSelf.image = [image zx_circleImage]; | |
| 35 | + }]; | |
| 36 | +} | |
| 37 | + | |
| 38 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/UtilKits/UtilKits.h
| ... | ... | @@ -17,6 +17,8 @@ |
| 17 | 17 | #import "UIColor+HexString.h" //生成新颜色 |
| 18 | 18 | #import "UIImage+ScaleImageSize.h" //缩放图片 |
| 19 | 19 | #import "UILabel+labelFitSize.h" //UILabel自适应大小 |
| 20 | +#import "UIImageView+ZXExtension.h" //圆角图片 | |
| 21 | +#import "Tools.h" //工具类 | |
| 20 | 22 | |
| 21 | 23 | #import "ZXDeviceInfo.h" //设备信息 |
| 22 | 24 | #import "ZXConst.h" //常量 |
| ... | ... | @@ -24,4 +26,5 @@ |
| 24 | 26 | #import "Macros.h" //宏定义 |
| 25 | 27 | |
| 26 | 28 | |
| 29 | + | |
| 27 | 30 | #endif /* UtilKits_h */ | ... | ... |
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/private chat.imageset/Contents.json renamed to LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/defaultUserIcon.imageset/Contents.json
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/defaultUserIcon.imageset/贡献榜小头像.png
0 → 100644
5.71 KB
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/private chat.imageset/1 2.png deleted
100644 → 0
7.63 KB
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/privateChat.png.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "filename" : "privateChat.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/privateChat.png.imageset/privateChat.png
0 → 100644
6.61 KB
LiveVideoCloud/LiveVideoCloud/animation.xcassets/player/Flash off.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "filename" : "Flash off.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/player/Flash off.imageset/Flash off.png
0 → 100644
3.46 KB
LiveVideoCloud/LiveVideoCloud/animation.xcassets/player/Is closed.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "filename" : "Is closed.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/player/Is closed.imageset/Is closed.png
0 → 100644
4.48 KB
LiveVideoCloud/LiveVideoCloud/animation.xcassets/player/Is open.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "filename" : "Is open.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/player/Is open.imageset/Is open.png
0 → 100644
6.14 KB
LiveVideoCloud/LiveVideoCloud/animation.xcassets/player/Select the camera.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "filename" : "Select the camera.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/player/Select the camera.imageset/Select the camera.png
0 → 100644
2.12 KB
LiveVideoCloud/LiveVideoCloud/animation.xcassets/player/camera.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "filename" : "camera.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/player/camera.imageset/camera.png
0 → 100644
2.07 KB
LiveVideoCloud/LiveVideoCloud/animation.xcassets/player/open flash.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "filename" : "open flash.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/player/open flash.imageset/open flash.png
0 → 100644
3.52 KB