Commit 65cd56af0a35307ff10d7d33faeeebfc2fa5de81
Merge branch 'master' of bj.gitlab.cnlive.com:ios-team/LiveVideoCloud
# Conflicts: # LiveVideoCloud.xcodeproj/project.pbxproj # LiveVideoCloud/PrefixHeader.pch
Showing
50 changed files
with
321 additions
and
3260 deletions
LiveVideoCloud.xcodeproj/project.pbxproj
| ... | ... | @@ -85,7 +85,6 @@ |
| 85 | 85 | 8178D44A1F02045500AA78A4 /* CNBarrageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4351F02045500AA78A4 /* CNBarrageManager.m */; }; |
| 86 | 86 | 8178D44B1F02045500AA78A4 /* CNBarrageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4371F02045500AA78A4 /* CNBarrageView.m */; }; |
| 87 | 87 | 8178D4511F02045500AA78A4 /* LVCPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4431F02045500AA78A4 /* LVCPlayer.m */; }; |
| 88 | - 8178D4521F02045500AA78A4 /* LVCPlayerLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4451F02045500AA78A4 /* LVCPlayerLoadingView.m */; }; | |
| 89 | 88 | 8178D4531F02045500AA78A4 /* LVCRequestFailedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4471F02045500AA78A4 /* LVCRequestFailedView.m */; }; |
| 90 | 89 | 8178D4571F0204D600AA78A4 /* LVCTelevisioController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4561F0204D600AA78A4 /* LVCTelevisioController.m */; }; |
| 91 | 90 | 8178D4611F02060B00AA78A4 /* LVCChatView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D45A1F02060B00AA78A4 /* LVCChatView.m */; }; |
| ... | ... | @@ -95,9 +94,8 @@ |
| 95 | 94 | 8178D4681F021C4500AA78A4 /* TelevisionData.json in Resources */ = {isa = PBXBuildFile; fileRef = 8178D4671F021C4500AA78A4 /* TelevisionData.json */; }; |
| 96 | 95 | 8178D46B1F021ED800AA78A4 /* LVCTelevisionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D46A1F021ED800AA78A4 /* LVCTelevisionModel.m */; }; |
| 97 | 96 | 8178D46E1F0225E500AA78A4 /* LVCTelevisionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D46D1F0225E500AA78A4 /* LVCTelevisionCell.m */; }; |
| 97 | + 8178D4711F0239AD00AA78A4 /* LVCPlayerLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4701F0239AD00AA78A4 /* LVCPlayerLoadingView.m */; }; | |
| 98 | 98 | 81A483081E88B6140097A80A /* UIView+ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81A483071E88B6140097A80A /* UIView+ViewController.m */; }; |
| 99 | - 81DFC4261F0113B40029BCB3 /* JsonFile.json in Resources */ = {isa = PBXBuildFile; fileRef = 81DFC4251F0113B40029BCB3 /* JsonFile.json */; }; | |
| 100 | - 81F1C8381E8BBDDA0085C2B8 /* MHPagingScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81F1C8371E8BBDDA0085C2B8 /* MHPagingScrollView.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; | |
| 101 | 99 | 81F1C8401E8BC5CC0085C2B8 /* NSArray+Safety.m in Sources */ = {isa = PBXBuildFile; fileRef = 81F1C83F1E8BC5CC0085C2B8 /* NSArray+Safety.m */; }; |
| 102 | 100 | 81FB5B3C1E7A6FFC00F98E1D /* SevenSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = 81FB5B3B1E7A6FFC00F98E1D /* SevenSwitch.m */; }; |
| 103 | 101 | D2029B861E6EAAA50027CD92 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029B851E6EAAA50027CD92 /* main.m */; }; |
| ... | ... | @@ -186,13 +184,9 @@ |
| 186 | 184 | D209AD6B1EC580F100D82E3B /* LVCWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D209AD6A1EC580F100D82E3B /* LVCWebViewController.m */; }; |
| 187 | 185 | D209AD6E1EC583B700D82E3B /* MineMessageController.m in Sources */ = {isa = PBXBuildFile; fileRef = D209AD6D1EC583B700D82E3B /* MineMessageController.m */; }; |
| 188 | 186 | D209AD711EC583D100D82E3B /* MineAccountController.m in Sources */ = {isa = PBXBuildFile; fileRef = D209AD701EC583D100D82E3B /* MineAccountController.m */; }; |
| 189 | - D20C82BE1EEEA89700BB609F /* LVCHomePageListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D20C82BD1EEEA89700BB609F /* LVCHomePageListModel.m */; }; | |
| 190 | - D214CB4F1EF7BD890014EEBA /* V8HorizontalPickerView.m in Sources */ = {isa = PBXBuildFile; fileRef = D214CB4D1EF7BD890014EEBA /* V8HorizontalPickerView.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; | |
| 191 | - D214CB521EF7CB310014EEBA /* LVCChannelPagingView.m in Sources */ = {isa = PBXBuildFile; fileRef = D214CB511EF7CB310014EEBA /* LVCChannelPagingView.m */; }; | |
| 192 | 187 | D217A24A1E7B76C7003B44CB /* PresentView.m in Sources */ = {isa = PBXBuildFile; fileRef = D217A2471E7B76C7003B44CB /* PresentView.m */; }; |
| 193 | 188 | D217A24B1E7B76C7003B44CB /* PresentViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D217A2491E7B76C7003B44CB /* PresentViewCell.m */; }; |
| 194 | 189 | D217A24E1E7B77C7003B44CB /* ComboCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D217A24D1E7B77C7003B44CB /* ComboCell.m */; }; |
| 195 | - D219E86B1EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D219E86A1EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.m */; }; | |
| 196 | 190 | D224B1971E826ED800CC61D0 /* ChatBarrageAnimAction.m in Sources */ = {isa = PBXBuildFile; fileRef = D224B1961E826ED800CC61D0 /* ChatBarrageAnimAction.m */; }; |
| 197 | 191 | D22830F11E778C0F00627701 /* LiveBaseView.m in Sources */ = {isa = PBXBuildFile; fileRef = D22830F01E778C0F00627701 /* LiveBaseView.m */; }; |
| 198 | 192 | D22830FC1E77C2D900627701 /* BottomToolView.m in Sources */ = {isa = PBXBuildFile; fileRef = D22830FB1E77C2D900627701 /* BottomToolView.m */; }; |
| ... | ... | @@ -225,9 +219,6 @@ |
| 225 | 219 | D245715C1E83A62B00AA85D6 /* BounceView.m in Sources */ = {isa = PBXBuildFile; fileRef = D245715B1E83A62B00AA85D6 /* BounceView.m */; }; |
| 226 | 220 | D245715F1E83B09900AA85D6 /* userInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D245715E1E83B09900AA85D6 /* userInfoModel.m */; }; |
| 227 | 221 | D24571631E83C40B00AA85D6 /* PrivateView.m in Sources */ = {isa = PBXBuildFile; fileRef = D24571621E83C40B00AA85D6 /* PrivateView.m */; }; |
| 228 | - D24CFC201EFA092300AA6ADB /* JBBannerView.m in Sources */ = {isa = PBXBuildFile; fileRef = D24CFC1F1EFA092300AA6ADB /* JBBannerView.m */; }; | |
| 229 | - D24F40921EFB727000833738 /* JBAutoRollTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = D24F40911EFB727000833738 /* JBAutoRollTableView.m */; }; | |
| 230 | - D24F40951EFB965A00833738 /* JBSearchView.m in Sources */ = {isa = PBXBuildFile; fileRef = D24F40941EFB965A00833738 /* JBSearchView.m */; }; | |
| 231 | 222 | D25530001E7909AC00DF38A5 /* GiftAnimOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = D2552FFF1E7909AC00DF38A5 /* GiftAnimOperation.m */; }; |
| 232 | 223 | D25530031E79115100DF38A5 /* AnimQueueManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D25530021E79115100DF38A5 /* AnimQueueManager.m */; }; |
| 233 | 224 | D25530061E7911A800DF38A5 /* GiftAnimationAction.m in Sources */ = {isa = PBXBuildFile; fileRef = D25530051E7911A800DF38A5 /* GiftAnimationAction.m */; }; |
| ... | ... | @@ -266,11 +257,9 @@ |
| 266 | 257 | D2CBC13B1ECC157A00E00279 /* LVCVerifyLiveAuthService.m in Sources */ = {isa = PBXBuildFile; fileRef = D2CBC13A1ECC157A00E00279 /* LVCVerifyLiveAuthService.m */; }; |
| 267 | 258 | D2D7D18D1E8A581000217771 /* timg.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = D2D7D18C1E8A581000217771 /* timg.jpeg */; }; |
| 268 | 259 | D2EBC8571F01FF9200F198FB /* LVCCommentModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8561F01FF9200F198FB /* LVCCommentModel.m */; }; |
| 269 | - D2EBC8641F02105C00F198FB /* LVCHomePageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8631F02105C00F198FB /* LVCHomePageViewController.m */; }; | |
| 270 | 260 | D2EBC8711F02108000F198FB /* LiveListService.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8661F02108000F198FB /* LiveListService.m */; }; |
| 271 | 261 | D2EBC8721F02108000F198FB /* LVCLiveActivityInfoService.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8681F02108000F198FB /* LVCLiveActivityInfoService.m */; }; |
| 272 | 262 | D2EBC8741F02108000F198FB /* LVCUGCLiveListController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC86C1F02108000F198FB /* LVCUGCLiveListController.m */; }; |
| 273 | - D2EBC8751F02108000F198FB /* LVCUGCLiveListView.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC86E1F02108000F198FB /* LVCUGCLiveListView.m */; }; | |
| 274 | 263 | D2EBC8761F02108000F198FB /* LVCUGCLivePlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8701F02108000F198FB /* LVCUGCLivePlayerController.m */; }; |
| 275 | 264 | D2EBC87B1F02108F00F198FB /* LVCUGCLiveListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8781F02108F00F198FB /* LVCUGCLiveListModel.m */; }; |
| 276 | 265 | D2EBC87C1F02108F00F198FB /* LVCUGCLivePlayerModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC87A1F02108F00F198FB /* LVCUGCLivePlayerModel.m */; }; |
| ... | ... | @@ -278,6 +267,8 @@ |
| 278 | 267 | D2EBC8841F02109C00F198FB /* LVCUGCLivePlayerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8801F02109C00F198FB /* LVCUGCLivePlayerCell.m */; }; |
| 279 | 268 | D2EBC8851F02109C00F198FB /* LVCUGCPlayerLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8821F02109C00F198FB /* LVCUGCPlayerLoadingView.m */; }; |
| 280 | 269 | D2EBC8881F0225D900F198FB /* LVCVodPlayerListController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8871F0225D900F198FB /* LVCVodPlayerListController.m */; }; |
| 270 | + D2EBC88B1F02361600F198FB /* LVCUGCLiveListView.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC88A1F02361600F198FB /* LVCUGCLiveListView.m */; }; | |
| 271 | + D2EBC88E1F023AA400F198FB /* LVCVodPlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC88D1F023AA400F198FB /* LVCVodPlayerController.m */; }; | |
| 281 | 272 | /* End PBXBuildFile section */ |
| 282 | 273 | |
| 283 | 274 | /* Begin PBXContainerItemProxy section */ |
| ... | ... | @@ -476,8 +467,6 @@ |
| 476 | 467 | 8178D4371F02045500AA78A4 /* CNBarrageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNBarrageView.m; sourceTree = "<group>"; }; |
| 477 | 468 | 8178D4421F02045500AA78A4 /* LVCPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCPlayer.h; sourceTree = "<group>"; }; |
| 478 | 469 | 8178D4431F02045500AA78A4 /* LVCPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCPlayer.m; sourceTree = "<group>"; }; |
| 479 | - 8178D4441F02045500AA78A4 /* LVCPlayerLoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCPlayerLoadingView.h; sourceTree = "<group>"; }; | |
| 480 | - 8178D4451F02045500AA78A4 /* LVCPlayerLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCPlayerLoadingView.m; sourceTree = "<group>"; }; | |
| 481 | 470 | 8178D4461F02045500AA78A4 /* LVCRequestFailedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCRequestFailedView.h; sourceTree = "<group>"; }; |
| 482 | 471 | 8178D4471F02045500AA78A4 /* LVCRequestFailedView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCRequestFailedView.m; sourceTree = "<group>"; }; |
| 483 | 472 | 8178D4551F0204D600AA78A4 /* LVCTelevisioController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCTelevisioController.h; sourceTree = "<group>"; }; |
| ... | ... | @@ -495,11 +484,10 @@ |
| 495 | 484 | 8178D46A1F021ED800AA78A4 /* LVCTelevisionModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCTelevisionModel.m; sourceTree = "<group>"; }; |
| 496 | 485 | 8178D46C1F0225E500AA78A4 /* LVCTelevisionCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCTelevisionCell.h; sourceTree = "<group>"; }; |
| 497 | 486 | 8178D46D1F0225E500AA78A4 /* LVCTelevisionCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCTelevisionCell.m; sourceTree = "<group>"; }; |
| 487 | + 8178D46F1F0239AD00AA78A4 /* LVCPlayerLoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCPlayerLoadingView.h; sourceTree = "<group>"; }; | |
| 488 | + 8178D4701F0239AD00AA78A4 /* LVCPlayerLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCPlayerLoadingView.m; sourceTree = "<group>"; }; | |
| 498 | 489 | 81A483061E88B6140097A80A /* UIView+ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+ViewController.h"; sourceTree = "<group>"; }; |
| 499 | 490 | 81A483071E88B6140097A80A /* UIView+ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+ViewController.m"; sourceTree = "<group>"; }; |
| 500 | - 81DFC4251F0113B40029BCB3 /* JsonFile.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = JsonFile.json; sourceTree = "<group>"; }; | |
| 501 | - 81F1C8361E8BBDDA0085C2B8 /* MHPagingScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MHPagingScrollView.h; sourceTree = "<group>"; }; | |
| 502 | - 81F1C8371E8BBDDA0085C2B8 /* MHPagingScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MHPagingScrollView.m; sourceTree = "<group>"; }; | |
| 503 | 491 | 81F1C83E1E8BC5CC0085C2B8 /* NSArray+Safety.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+Safety.h"; sourceTree = "<group>"; }; |
| 504 | 492 | 81F1C83F1E8BC5CC0085C2B8 /* NSArray+Safety.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+Safety.m"; sourceTree = "<group>"; }; |
| 505 | 493 | 81FB5B3A1E7A6FFC00F98E1D /* SevenSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SevenSwitch.h; sourceTree = "<group>"; }; |
| ... | ... | @@ -688,13 +676,6 @@ |
| 688 | 676 | D209AD6D1EC583B700D82E3B /* MineMessageController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MineMessageController.m; sourceTree = "<group>"; }; |
| 689 | 677 | D209AD6F1EC583D100D82E3B /* MineAccountController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MineAccountController.h; sourceTree = "<group>"; }; |
| 690 | 678 | D209AD701EC583D100D82E3B /* MineAccountController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MineAccountController.m; sourceTree = "<group>"; }; |
| 691 | - D20C82BC1EEEA89700BB609F /* LVCHomePageListModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCHomePageListModel.h; sourceTree = "<group>"; }; | |
| 692 | - D20C82BD1EEEA89700BB609F /* LVCHomePageListModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCHomePageListModel.m; sourceTree = "<group>"; }; | |
| 693 | - D214CB4C1EF7BD890014EEBA /* V8HorizontalPickerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = V8HorizontalPickerView.h; sourceTree = "<group>"; }; | |
| 694 | - D214CB4D1EF7BD890014EEBA /* V8HorizontalPickerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = V8HorizontalPickerView.m; sourceTree = "<group>"; }; | |
| 695 | - D214CB4E1EF7BD890014EEBA /* V8HorizontalPickerViewProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = V8HorizontalPickerViewProtocol.h; sourceTree = "<group>"; }; | |
| 696 | - D214CB501EF7CB310014EEBA /* LVCChannelPagingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCChannelPagingView.h; sourceTree = "<group>"; }; | |
| 697 | - D214CB511EF7CB310014EEBA /* LVCChannelPagingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCChannelPagingView.m; sourceTree = "<group>"; }; | |
| 698 | 679 | D217A2451E7B76C7003B44CB /* PresentModelAble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PresentModelAble.h; sourceTree = "<group>"; }; |
| 699 | 680 | D217A2461E7B76C7003B44CB /* PresentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PresentView.h; sourceTree = "<group>"; }; |
| 700 | 681 | D217A2471E7B76C7003B44CB /* PresentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PresentView.m; sourceTree = "<group>"; }; |
| ... | ... | @@ -702,8 +683,6 @@ |
| 702 | 683 | D217A2491E7B76C7003B44CB /* PresentViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PresentViewCell.m; sourceTree = "<group>"; }; |
| 703 | 684 | D217A24C1E7B77C7003B44CB /* ComboCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ComboCell.h; path = Present/ComboCell.h; sourceTree = "<group>"; }; |
| 704 | 685 | D217A24D1E7B77C7003B44CB /* ComboCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ComboCell.m; path = Present/ComboCell.m; sourceTree = "<group>"; }; |
| 705 | - D219E8691EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCBigHorizontalCollectionViewCell.h; sourceTree = "<group>"; }; | |
| 706 | - D219E86A1EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCBigHorizontalCollectionViewCell.m; sourceTree = "<group>"; }; | |
| 707 | 686 | D224B1951E826ED800CC61D0 /* ChatBarrageAnimAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatBarrageAnimAction.h; sourceTree = "<group>"; }; |
| 708 | 687 | D224B1961E826ED800CC61D0 /* ChatBarrageAnimAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatBarrageAnimAction.m; sourceTree = "<group>"; }; |
| 709 | 688 | D22830EF1E778C0F00627701 /* LiveBaseView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveBaseView.h; sourceTree = "<group>"; }; |
| ... | ... | @@ -768,12 +747,6 @@ |
| 768 | 747 | D245715E1E83B09900AA85D6 /* userInfoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = userInfoModel.m; sourceTree = "<group>"; }; |
| 769 | 748 | D24571611E83C40B00AA85D6 /* PrivateView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrivateView.h; sourceTree = "<group>"; }; |
| 770 | 749 | D24571621E83C40B00AA85D6 /* PrivateView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PrivateView.m; sourceTree = "<group>"; }; |
| 771 | - D24CFC1E1EFA092300AA6ADB /* JBBannerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JBBannerView.h; sourceTree = "<group>"; }; | |
| 772 | - D24CFC1F1EFA092300AA6ADB /* JBBannerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JBBannerView.m; sourceTree = "<group>"; }; | |
| 773 | - D24F40901EFB727000833738 /* JBAutoRollTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JBAutoRollTableView.h; sourceTree = "<group>"; }; | |
| 774 | - D24F40911EFB727000833738 /* JBAutoRollTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JBAutoRollTableView.m; sourceTree = "<group>"; }; | |
| 775 | - D24F40931EFB965A00833738 /* JBSearchView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JBSearchView.h; sourceTree = "<group>"; }; | |
| 776 | - D24F40941EFB965A00833738 /* JBSearchView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JBSearchView.m; sourceTree = "<group>"; }; | |
| 777 | 750 | D2552FFE1E7909AC00DF38A5 /* GiftAnimOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GiftAnimOperation.h; sourceTree = "<group>"; }; |
| 778 | 751 | D2552FFF1E7909AC00DF38A5 /* GiftAnimOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GiftAnimOperation.m; sourceTree = "<group>"; }; |
| 779 | 752 | D25530011E79115100DF38A5 /* AnimQueueManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimQueueManager.h; sourceTree = "<group>"; }; |
| ... | ... | @@ -838,16 +811,12 @@ |
| 838 | 811 | D2D7D18C1E8A581000217771 /* timg.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = timg.jpeg; sourceTree = "<group>"; }; |
| 839 | 812 | D2EBC8551F01FF9200F198FB /* LVCCommentModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCCommentModel.h; sourceTree = "<group>"; }; |
| 840 | 813 | D2EBC8561F01FF9200F198FB /* LVCCommentModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCCommentModel.m; sourceTree = "<group>"; }; |
| 841 | - D2EBC8621F02105C00F198FB /* LVCHomePageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCHomePageViewController.h; sourceTree = "<group>"; }; | |
| 842 | - D2EBC8631F02105C00F198FB /* LVCHomePageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCHomePageViewController.m; sourceTree = "<group>"; }; | |
| 843 | 814 | D2EBC8651F02108000F198FB /* LiveListService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveListService.h; sourceTree = "<group>"; }; |
| 844 | 815 | D2EBC8661F02108000F198FB /* LiveListService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveListService.m; sourceTree = "<group>"; }; |
| 845 | 816 | D2EBC8671F02108000F198FB /* LVCLiveActivityInfoService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCLiveActivityInfoService.h; sourceTree = "<group>"; }; |
| 846 | 817 | D2EBC8681F02108000F198FB /* LVCLiveActivityInfoService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCLiveActivityInfoService.m; sourceTree = "<group>"; }; |
| 847 | 818 | D2EBC86B1F02108000F198FB /* LVCUGCLiveListController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLiveListController.h; sourceTree = "<group>"; }; |
| 848 | 819 | D2EBC86C1F02108000F198FB /* LVCUGCLiveListController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLiveListController.m; sourceTree = "<group>"; }; |
| 849 | - D2EBC86D1F02108000F198FB /* LVCUGCLiveListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLiveListView.h; sourceTree = "<group>"; }; | |
| 850 | - D2EBC86E1F02108000F198FB /* LVCUGCLiveListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLiveListView.m; sourceTree = "<group>"; }; | |
| 851 | 820 | D2EBC86F1F02108000F198FB /* LVCUGCLivePlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLivePlayerController.h; sourceTree = "<group>"; }; |
| 852 | 821 | D2EBC8701F02108000F198FB /* LVCUGCLivePlayerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLivePlayerController.m; sourceTree = "<group>"; }; |
| 853 | 822 | D2EBC8771F02108F00F198FB /* LVCUGCLiveListModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLiveListModel.h; sourceTree = "<group>"; }; |
| ... | ... | @@ -862,6 +831,10 @@ |
| 862 | 831 | D2EBC8821F02109C00F198FB /* LVCUGCPlayerLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCPlayerLoadingView.m; sourceTree = "<group>"; }; |
| 863 | 832 | D2EBC8861F0225D900F198FB /* LVCVodPlayerListController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCVodPlayerListController.h; sourceTree = "<group>"; }; |
| 864 | 833 | D2EBC8871F0225D900F198FB /* LVCVodPlayerListController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCVodPlayerListController.m; sourceTree = "<group>"; }; |
| 834 | + D2EBC8891F02361600F198FB /* LVCUGCLiveListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLiveListView.h; sourceTree = "<group>"; }; | |
| 835 | + D2EBC88A1F02361600F198FB /* LVCUGCLiveListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLiveListView.m; sourceTree = "<group>"; }; | |
| 836 | + D2EBC88C1F023AA400F198FB /* LVCVodPlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCVodPlayerController.h; sourceTree = "<group>"; }; | |
| 837 | + D2EBC88D1F023AA400F198FB /* LVCVodPlayerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCVodPlayerController.m; sourceTree = "<group>"; }; | |
| 865 | 838 | /* End PBXFileReference section */ |
| 866 | 839 | |
| 867 | 840 | /* Begin PBXFrameworksBuildPhase section */ |
| ... | ... | @@ -1196,8 +1169,8 @@ |
| 1196 | 1169 | 8178D4431F02045500AA78A4 /* LVCPlayer.m */, |
| 1197 | 1170 | 8178D46C1F0225E500AA78A4 /* LVCTelevisionCell.h */, |
| 1198 | 1171 | 8178D46D1F0225E500AA78A4 /* LVCTelevisionCell.m */, |
| 1199 | - 8178D4441F02045500AA78A4 /* LVCPlayerLoadingView.h */, | |
| 1200 | - 8178D4451F02045500AA78A4 /* LVCPlayerLoadingView.m */, | |
| 1172 | + 8178D46F1F0239AD00AA78A4 /* LVCPlayerLoadingView.h */, | |
| 1173 | + 8178D4701F0239AD00AA78A4 /* LVCPlayerLoadingView.m */, | |
| 1201 | 1174 | 8178D4461F02045500AA78A4 /* LVCRequestFailedView.h */, |
| 1202 | 1175 | 8178D4471F02045500AA78A4 /* LVCRequestFailedView.m */, |
| 1203 | 1176 | ); |
| ... | ... | @@ -1239,15 +1212,6 @@ |
| 1239 | 1212 | path = Model; |
| 1240 | 1213 | sourceTree = "<group>"; |
| 1241 | 1214 | }; |
| 1242 | - 81F1C8351E8BBDDA0085C2B8 /* MHPagingScrollView */ = { | |
| 1243 | - isa = PBXGroup; | |
| 1244 | - children = ( | |
| 1245 | - 81F1C8361E8BBDDA0085C2B8 /* MHPagingScrollView.h */, | |
| 1246 | - 81F1C8371E8BBDDA0085C2B8 /* MHPagingScrollView.m */, | |
| 1247 | - ); | |
| 1248 | - path = MHPagingScrollView; | |
| 1249 | - sourceTree = "<group>"; | |
| 1250 | - }; | |
| 1251 | 1215 | 81FB5B391E7A6FFC00F98E1D /* SevenSwitch */ = { |
| 1252 | 1216 | isa = PBXGroup; |
| 1253 | 1217 | children = ( |
| ... | ... | @@ -1386,7 +1350,6 @@ |
| 1386 | 1350 | D2393D041F02505400D3EE17 /* QQSDK */, |
| 1387 | 1351 | D214CB4B1EF7BD890014EEBA /* V8HorizontalPickerView */, |
| 1388 | 1352 | 4BD855D41EBACD530082061D /* AFNetworking */, |
| 1389 | - 81F1C8351E8BBDDA0085C2B8 /* MHPagingScrollView */, | |
| 1390 | 1353 | 81FB5B391E7A6FFC00F98E1D /* SevenSwitch */, |
| 1391 | 1354 | 810B64E41E779B1F00133E15 /* Masonry */, |
| 1392 | 1355 | D2029BF81E6EADE10027CD92 /* MBProgressHUD */, |
| ... | ... | @@ -1625,7 +1588,6 @@ |
| 1625 | 1588 | D2888D951E6EBAA7003A77C8 /* LiveSections */, |
| 1626 | 1589 | D2575C431E76846900E3A8FC /* InteractionSections */, |
| 1627 | 1590 | D2029C751E6EADE10027CD92 /* ZXSections(例子) */, |
| 1628 | - D233EE731EEA8A1500674ED5 /* HomePageSections */, | |
| 1629 | 1591 | ); |
| 1630 | 1592 | path = Sections; |
| 1631 | 1593 | sourceTree = "<group>"; |
| ... | ... | @@ -1819,54 +1781,6 @@ |
| 1819 | 1781 | name = Model; |
| 1820 | 1782 | sourceTree = "<group>"; |
| 1821 | 1783 | }; |
| 1822 | - D20C82BF1EEEA89E00BB609F /* Model */ = { | |
| 1823 | - isa = PBXGroup; | |
| 1824 | - children = ( | |
| 1825 | - D20C82BC1EEEA89700BB609F /* LVCHomePageListModel.h */, | |
| 1826 | - D20C82BD1EEEA89700BB609F /* LVCHomePageListModel.m */, | |
| 1827 | - D23BBDB91EF8E8B2002FE0B8 /* LVCBannerAndMarqueeModel.h */, | |
| 1828 | - D23BBDBA1EF8E8B2002FE0B8 /* LVCBannerAndMarqueeModel.m */, | |
| 1829 | - D23BBDBC1EF8ED4A002FE0B8 /* LVCChannelDetailModel.h */, | |
| 1830 | - D23BBDBD1EF8ED4A002FE0B8 /* LVCChannelDetailModel.m */, | |
| 1831 | - D23BBDBF1EF8F513002FE0B8 /* LVCBqWqXgModel.h */, | |
| 1832 | - D23BBDC01EF8F513002FE0B8 /* LVCBqWqXgModel.m */, | |
| 1833 | - ); | |
| 1834 | - name = Model; | |
| 1835 | - sourceTree = "<group>"; | |
| 1836 | - }; | |
| 1837 | - D214CB4B1EF7BD890014EEBA /* V8HorizontalPickerView */ = { | |
| 1838 | - isa = PBXGroup; | |
| 1839 | - children = ( | |
| 1840 | - D214CB4C1EF7BD890014EEBA /* V8HorizontalPickerView.h */, | |
| 1841 | - D214CB4D1EF7BD890014EEBA /* V8HorizontalPickerView.m */, | |
| 1842 | - D214CB4E1EF7BD890014EEBA /* V8HorizontalPickerViewProtocol.h */, | |
| 1843 | - ); | |
| 1844 | - path = V8HorizontalPickerView; | |
| 1845 | - sourceTree = "<group>"; | |
| 1846 | - }; | |
| 1847 | - D214CB531EF7CB380014EEBA /* View */ = { | |
| 1848 | - isa = PBXGroup; | |
| 1849 | - children = ( | |
| 1850 | - D214CB501EF7CB310014EEBA /* LVCChannelPagingView.h */, | |
| 1851 | - D214CB511EF7CB310014EEBA /* LVCChannelPagingView.m */, | |
| 1852 | - D23BBDB61EF8D15D002FE0B8 /* LVCMainHeaderCollectionReusableView.h */, | |
| 1853 | - D23BBDB71EF8D15D002FE0B8 /* LVCMainHeaderCollectionReusableView.m */, | |
| 1854 | - D23BBDC51EF8FBD1002FE0B8 /* LVCSectionHeaderCollectionReusableView.h */, | |
| 1855 | - D23BBDC61EF8FBD1002FE0B8 /* LVCSectionHeaderCollectionReusableView.m */, | |
| 1856 | - D23BBDC21EF8FB99002FE0B8 /* LVCMainHorizontalCollectionViewCell.h */, | |
| 1857 | - D23BBDC31EF8FB99002FE0B8 /* LVCMainHorizontalCollectionViewCell.m */, | |
| 1858 | - D219E8691EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.h */, | |
| 1859 | - D219E86A1EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.m */, | |
| 1860 | - D24F40931EFB965A00833738 /* JBSearchView.h */, | |
| 1861 | - D24F40941EFB965A00833738 /* JBSearchView.m */, | |
| 1862 | - D24CFC1E1EFA092300AA6ADB /* JBBannerView.h */, | |
| 1863 | - D24CFC1F1EFA092300AA6ADB /* JBBannerView.m */, | |
| 1864 | - D24F40901EFB727000833738 /* JBAutoRollTableView.h */, | |
| 1865 | - D24F40911EFB727000833738 /* JBAutoRollTableView.m */, | |
| 1866 | - ); | |
| 1867 | - name = View; | |
| 1868 | - sourceTree = "<group>"; | |
| 1869 | - }; | |
| 1870 | 1784 | D217A2441E7B76C7003B44CB /* Present */ = { |
| 1871 | 1785 | isa = PBXGroup; |
| 1872 | 1786 | children = ( |
| ... | ... | @@ -1936,25 +1850,6 @@ |
| 1936 | 1850 | path = GiftModel; |
| 1937 | 1851 | sourceTree = "<group>"; |
| 1938 | 1852 | }; |
| 1939 | - D233EE731EEA8A1500674ED5 /* HomePageSections */ = { | |
| 1940 | - isa = PBXGroup; | |
| 1941 | - children = ( | |
| 1942 | - D233EE741EEE26C700674ED5 /* Controller */, | |
| 1943 | - D20C82BF1EEEA89E00BB609F /* Model */, | |
| 1944 | - D214CB531EF7CB380014EEBA /* View */, | |
| 1945 | - ); | |
| 1946 | - path = HomePageSections; | |
| 1947 | - sourceTree = "<group>"; | |
| 1948 | - }; | |
| 1949 | - D233EE741EEE26C700674ED5 /* Controller */ = { | |
| 1950 | - isa = PBXGroup; | |
| 1951 | - children = ( | |
| 1952 | - D2EBC8621F02105C00F198FB /* LVCHomePageViewController.h */, | |
| 1953 | - D2EBC8631F02105C00F198FB /* LVCHomePageViewController.m */, | |
| 1954 | - ); | |
| 1955 | - name = Controller; | |
| 1956 | - sourceTree = "<group>"; | |
| 1957 | - }; | |
| 1958 | 1853 | D236968F1E7FC83800E4BF71 /* ChatMsgModel */ = { |
| 1959 | 1854 | isa = PBXGroup; |
| 1960 | 1855 | children = ( |
| ... | ... | @@ -2123,7 +2018,6 @@ |
| 2123 | 2018 | isa = PBXGroup; |
| 2124 | 2019 | children = ( |
| 2125 | 2020 | 8178D4671F021C4500AA78A4 /* TelevisionData.json */, |
| 2126 | - 81DFC4251F0113B40029BCB3 /* JsonFile.json */, | |
| 2127 | 2021 | D25BF88C1E7F7F77007FB138 /* Images */, |
| 2128 | 2022 | D25BF88B1E7F7F77007FB138 /* Fonts */, |
| 2129 | 2023 | D25BF88D1E7F7F77007FB138 /* Sound */, |
| ... | ... | @@ -2223,6 +2117,8 @@ |
| 2223 | 2117 | children = ( |
| 2224 | 2118 | D2EBC8861F0225D900F198FB /* LVCVodPlayerListController.h */, |
| 2225 | 2119 | D2EBC8871F0225D900F198FB /* LVCVodPlayerListController.m */, |
| 2120 | + D2EBC88C1F023AA400F198FB /* LVCVodPlayerController.h */, | |
| 2121 | + D2EBC88D1F023AA400F198FB /* LVCVodPlayerController.m */, | |
| 2226 | 2122 | ); |
| 2227 | 2123 | path = Controller; |
| 2228 | 2124 | sourceTree = "<group>"; |
| ... | ... | @@ -2262,16 +2158,14 @@ |
| 2262 | 2158 | D2EBC85F1F020F3C00F198FB /* Controller */ = { |
| 2263 | 2159 | isa = PBXGroup; |
| 2264 | 2160 | children = ( |
| 2265 | - D2EBC8651F02108000F198FB /* LiveListService.h */, | |
| 2266 | - D2EBC8661F02108000F198FB /* LiveListService.m */, | |
| 2267 | - D2EBC8671F02108000F198FB /* LVCLiveActivityInfoService.h */, | |
| 2268 | - D2EBC8681F02108000F198FB /* LVCLiveActivityInfoService.m */, | |
| 2269 | 2161 | D2EBC86B1F02108000F198FB /* LVCUGCLiveListController.h */, |
| 2270 | 2162 | D2EBC86C1F02108000F198FB /* LVCUGCLiveListController.m */, |
| 2271 | - D2EBC86D1F02108000F198FB /* LVCUGCLiveListView.h */, | |
| 2272 | - D2EBC86E1F02108000F198FB /* LVCUGCLiveListView.m */, | |
| 2273 | 2163 | D2EBC86F1F02108000F198FB /* LVCUGCLivePlayerController.h */, |
| 2274 | 2164 | D2EBC8701F02108000F198FB /* LVCUGCLivePlayerController.m */, |
| 2165 | + D2EBC8651F02108000F198FB /* LiveListService.h */, | |
| 2166 | + D2EBC8661F02108000F198FB /* LiveListService.m */, | |
| 2167 | + D2EBC8671F02108000F198FB /* LVCLiveActivityInfoService.h */, | |
| 2168 | + D2EBC8681F02108000F198FB /* LVCLiveActivityInfoService.m */, | |
| 2275 | 2169 | ); |
| 2276 | 2170 | path = Controller; |
| 2277 | 2171 | sourceTree = "<group>"; |
| ... | ... | @@ -2290,6 +2184,8 @@ |
| 2290 | 2184 | D2EBC8611F020F3C00F198FB /* View */ = { |
| 2291 | 2185 | isa = PBXGroup; |
| 2292 | 2186 | children = ( |
| 2187 | + D2EBC8891F02361600F198FB /* LVCUGCLiveListView.h */, | |
| 2188 | + D2EBC88A1F02361600F198FB /* LVCUGCLiveListView.m */, | |
| 2293 | 2189 | D2EBC87D1F02109C00F198FB /* LVCUGCBackgroundView.h */, |
| 2294 | 2190 | D2EBC87E1F02109C00F198FB /* LVCUGCBackgroundView.m */, |
| 2295 | 2191 | D2EBC87F1F02109C00F198FB /* LVCUGCLivePlayerCell.h */, |
| ... | ... | @@ -2411,7 +2307,6 @@ |
| 2411 | 2307 | files = ( |
| 2412 | 2308 | D2393D081F02505400D3EE17 /* TencentOpenApi_IOS_Bundle.bundle in Resources */, |
| 2413 | 2309 | D2029C971E6EADE10027CD92 /* Info.plist in Resources */, |
| 2414 | - 81DFC4261F0113B40029BCB3 /* JsonFile.json in Resources */, | |
| 2415 | 2310 | D2575C7F1E76A4F300E3A8FC /* NHPlaneViews.xib in Resources */, |
| 2416 | 2311 | D2393D0F1F0250A100D3EE17 /* read_me.txt in Resources */, |
| 2417 | 2312 | D2393D1E1F0250A700D3EE17 /* WeiboSDK.bundle in Resources */, |
| ... | ... | @@ -2457,7 +2352,6 @@ |
| 2457 | 2352 | D2029CC01E6EADE10027CD92 /* UIImage+GIF.m in Sources */, |
| 2458 | 2353 | 4B45CE851EB86A590079AFB7 /* LVCClearCachesCell.m in Sources */, |
| 2459 | 2354 | 4B45CE9B1EB86A760079AFB7 /* ZXUIKit.m in Sources */, |
| 2460 | - D214CB4F1EF7BD890014EEBA /* V8HorizontalPickerView.m in Sources */, | |
| 2461 | 2355 | D2029BCF1E6EADD70027CD92 /* ZXTabBarController.m in Sources */, |
| 2462 | 2356 | D2029CB81E6EADE10027CD92 /* SDImageCache.m in Sources */, |
| 2463 | 2357 | D2029CBB1E6EADE10027CD92 /* SDWebImageDownloader.m in Sources */, |
| ... | ... | @@ -2467,7 +2361,6 @@ |
| 2467 | 2361 | 8178D4241F02043500AA78A4 /* LVCFullScreenPlayerController.m in Sources */, |
| 2468 | 2362 | D2029C861E6EADE10027CD92 /* Tools.m in Sources */, |
| 2469 | 2363 | 4B42A6C41EC00CC800DA09D7 /* UIAlertView+Blocks.m in Sources */, |
| 2470 | - D214CB521EF7CB310014EEBA /* LVCChannelPagingView.m in Sources */, | |
| 2471 | 2364 | 4B45CE861EB86A590079AFB7 /* LVCLoginShowView.m in Sources */, |
| 2472 | 2365 | D2029CA01E6EADE10027CD92 /* NSObject+MJProperty.m in Sources */, |
| 2473 | 2366 | 4BD855FE1EBACD530082061D /* AFSecurityPolicy.m in Sources */, |
| ... | ... | @@ -2475,7 +2368,6 @@ |
| 2475 | 2368 | 4B45CE981EB86A760079AFB7 /* UILabel+createLabel.m in Sources */, |
| 2476 | 2369 | D2029C9C1E6EADE10027CD92 /* MJPropertyType.m in Sources */, |
| 2477 | 2370 | D22831091E77D8D500627701 /* GiftModel.m in Sources */, |
| 2478 | - D23BBDBE1EF8ED4A002FE0B8 /* LVCChannelDetailModel.m in Sources */, | |
| 2479 | 2371 | D2029CCD1E6EADE10027CD92 /* SearchModel.m in Sources */, |
| 2480 | 2372 | 4BD8560F1EBACEF80082061D /* CNLiveWebView.m in Sources */, |
| 2481 | 2373 | 810B65051E779B1F00133E15 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */, |
| ... | ... | @@ -2487,7 +2379,6 @@ |
| 2487 | 2379 | 81F1C8401E8BC5CC0085C2B8 /* NSArray+Safety.m in Sources */, |
| 2488 | 2380 | D2029D011E6EAE2E0027CD92 /* UIColor+HexString.m in Sources */, |
| 2489 | 2381 | 4B45CE7D1EB86A590079AFB7 /* ModifyInfomationController.m in Sources */, |
| 2490 | - D23BBDBB1EF8E8B2002FE0B8 /* LVCBannerAndMarqueeModel.m in Sources */, | |
| 2491 | 2382 | D2029CA41E6EADE10027CD92 /* MJRefreshComponent.m in Sources */, |
| 2492 | 2383 | D2575C7A1E76A4F300E3A8FC /* NHCarViews.m in Sources */, |
| 2493 | 2384 | 8178D44A1F02045500AA78A4 /* CNBarrageManager.m in Sources */, |
| ... | ... | @@ -2504,7 +2395,6 @@ |
| 2504 | 2395 | 4BD8561D1EBAD6490082061D /* ZXConst.m in Sources */, |
| 2505 | 2396 | D2029CB71E6EADE10027CD92 /* NSData+ImageContentType.m in Sources */, |
| 2506 | 2397 | D23DC1551ECC41C100103B0E /* LVCVerifyViewController.m in Sources */, |
| 2507 | - D2EBC8641F02105C00F198FB /* LVCHomePageViewController.m in Sources */, | |
| 2508 | 2398 | D29E81ED1E88DC5B008C9906 /* PriChatCell.m in Sources */, |
| 2509 | 2399 | D2029CD01E6EADE10027CD92 /* SearchPresenter.m in Sources */, |
| 2510 | 2400 | D2029CBE1E6EADE10027CD92 /* SDWebImagePrefetcher.m in Sources */, |
| ... | ... | @@ -2515,9 +2405,7 @@ |
| 2515 | 2405 | D2029CCE1E6EADE10027CD92 /* SearchRecomListModel.m in Sources */, |
| 2516 | 2406 | D2029CA11E6EADE10027CD92 /* NSString+MJExtension.m in Sources */, |
| 2517 | 2407 | 4B45CE7A1EB86A590079AFB7 /* MineLiveController.m in Sources */, |
| 2518 | - D24F40951EFB965A00833738 /* JBSearchView.m in Sources */, | |
| 2519 | 2408 | D2029BCB1E6EADD70027CD92 /* BaseTableViewCell.m in Sources */, |
| 2520 | - 81F1C8381E8BBDDA0085C2B8 /* MHPagingScrollView.m in Sources */, | |
| 2521 | 2409 | D2029CAA1E6EADE10027CD92 /* MJRefreshBackGifFooter.m in Sources */, |
| 2522 | 2410 | 8178D4531F02045500AA78A4 /* LVCRequestFailedView.m in Sources */, |
| 2523 | 2411 | 4BD855FB1EBACD530082061D /* AFHTTPRequestOperationManager.m in Sources */, |
| ... | ... | @@ -2532,7 +2420,6 @@ |
| 2532 | 2420 | 4B45CEA61EB86B9F0079AFB7 /* NSNumber+ScaleHeight.m in Sources */, |
| 2533 | 2421 | 810B65031E779B1F00133E15 /* MASViewConstraint.m in Sources */, |
| 2534 | 2422 | D2029BCE1E6EADD70027CD92 /* ZXNavigationController.m in Sources */, |
| 2535 | - D23BBDC71EF8FBD1002FE0B8 /* LVCSectionHeaderCollectionReusableView.m in Sources */, | |
| 2536 | 2423 | D2029CA21E6EADE10027CD92 /* MJRefreshAutoFooter.m in Sources */, |
| 2537 | 2424 | D2029CC71E6EADE10027CD92 /* SVIndefiniteAnimatedView.m in Sources */, |
| 2538 | 2425 | D2029CA31E6EADE10027CD92 /* MJRefreshBackFooter.m in Sources */, |
| ... | ... | @@ -2542,16 +2429,13 @@ |
| 2542 | 2429 | 4BD856011EBACD530082061D /* AFURLResponseSerialization.m in Sources */, |
| 2543 | 2430 | D2575C4A1E7685DE00E3A8FC /* UIView+Bubbling.m in Sources */, |
| 2544 | 2431 | D2EBC8571F01FF9200F198FB /* LVCCommentModel.m in Sources */, |
| 2545 | - D23BBDB81EF8D15D002FE0B8 /* LVCMainHeaderCollectionReusableView.m in Sources */, | |
| 2432 | + D2EBC88B1F02361600F198FB /* LVCUGCLiveListView.m in Sources */, | |
| 2546 | 2433 | D2029CA61E6EADE10027CD92 /* MJRefreshHeader.m in Sources */, |
| 2547 | 2434 | D2029CC41E6EADE10027CD92 /* UIImageView+WebCache.m in Sources */, |
| 2548 | 2435 | 4B45CE801EB86A590079AFB7 /* idAndPwdView.m in Sources */, |
| 2549 | - 8178D4521F02045500AA78A4 /* LVCPlayerLoadingView.m in Sources */, | |
| 2550 | - D23BBDC41EF8FB99002FE0B8 /* LVCMainHorizontalCollectionViewCell.m in Sources */, | |
| 2551 | 2436 | 8178D4251F02043500AA78A4 /* LVCLivePlayerController.m in Sources */, |
| 2552 | 2437 | D236967E1E7F9E4100E4BF71 /* GiftPayButton.m in Sources */, |
| 2553 | 2438 | 4BD8560A1EBACD530082061D /* UIWebView+AFNetworking.m in Sources */, |
| 2554 | - D219E86B1EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.m in Sources */, | |
| 2555 | 2439 | D2EBC8881F0225D900F198FB /* LVCVodPlayerListController.m in Sources */, |
| 2556 | 2440 | 4B45CE831EB86A590079AFB7 /* LVCMineModel.m in Sources */, |
| 2557 | 2441 | 4B45CE791EB86A590079AFB7 /* MineAboutUsController.m in Sources */, |
| ... | ... | @@ -2560,8 +2444,8 @@ |
| 2560 | 2444 | D2029CC81E6EADE10027CD92 /* SVProgressAnimatedView.m in Sources */, |
| 2561 | 2445 | 4B45CE891EB86A590079AFB7 /* LVCPersonalImageCell.m in Sources */, |
| 2562 | 2446 | D2029C961E6EADE10027CD92 /* MBProgressHUD.m in Sources */, |
| 2563 | - D24F40921EFB727000833738 /* JBAutoRollTableView.m in Sources */, | |
| 2564 | 2447 | 810B65071E779B1F00133E15 /* ViewController+MASAdditions.m in Sources */, |
| 2448 | + D2EBC88E1F023AA400F198FB /* LVCVodPlayerController.m in Sources */, | |
| 2565 | 2449 | D2029C9A1E6EADE10027CD92 /* MJProperty.m in Sources */, |
| 2566 | 2450 | 4BD856031EBACD530082061D /* AFNetworkActivityIndicatorManager.m in Sources */, |
| 2567 | 2451 | 4BD855CD1EBAC4B70082061D /* CNLiveKeychainWrapper.m in Sources */, |
| ... | ... | @@ -2657,13 +2541,10 @@ |
| 2657 | 2541 | 4BD856041EBACD530082061D /* UIActivityIndicatorView+AFNetworking.m in Sources */, |
| 2658 | 2542 | 4B45CE781EB86A590079AFB7 /* LVCMineViewController.m in Sources */, |
| 2659 | 2543 | D2888D9E1E6EBF1B003A77C8 /* LVCLiveViewController.m in Sources */, |
| 2660 | - D20C82BE1EEEA89700BB609F /* LVCHomePageListModel.m in Sources */, | |
| 2661 | 2544 | 4B42A6C71EC0171800DA09D7 /* PlayRecordCell.m in Sources */, |
| 2662 | 2545 | D217A24E1E7B77C7003B44CB /* ComboCell.m in Sources */, |
| 2663 | - D24CFC201EFA092300AA6ADB /* JBBannerView.m in Sources */, | |
| 2664 | 2546 | D2029CBD1E6EADE10027CD92 /* SDWebImageManager.m in Sources */, |
| 2665 | 2547 | D2029CB41E6EADE10027CD92 /* UIView+MJExtension.m in Sources */, |
| 2666 | - D2EBC8751F02108000F198FB /* LVCUGCLiveListView.m in Sources */, | |
| 2667 | 2548 | 81FB5B3C1E7A6FFC00F98E1D /* SevenSwitch.m in Sources */, |
| 2668 | 2549 | D2EBC8761F02108000F198FB /* LVCUGCLivePlayerController.m in Sources */, |
| 2669 | 2550 | D2029CA91E6EADE10027CD92 /* MJRefreshAutoStateFooter.m in Sources */, |
| ... | ... | @@ -2671,9 +2552,9 @@ |
| 2671 | 2552 | D2029D061E6EAE2E0027CD92 /* UIView+Extension.m in Sources */, |
| 2672 | 2553 | D25530001E7909AC00DF38A5 /* GiftAnimOperation.m in Sources */, |
| 2673 | 2554 | D2029C9D1E6EADE10027CD92 /* NSObject+MJClass.m in Sources */, |
| 2674 | - D23BBDC11EF8F513002FE0B8 /* LVCBqWqXgModel.m in Sources */, | |
| 2675 | 2555 | D2029CCF1E6EADE10027CD92 /* SearchHttp.m in Sources */, |
| 2676 | 2556 | 810B65001E779B1F00133E15 /* MASConstraintMaker.m in Sources */, |
| 2557 | + 8178D4711F0239AD00AA78A4 /* LVCPlayerLoadingView.m in Sources */, | |
| 2677 | 2558 | D245715C1E83A62B00AA85D6 /* BounceView.m in Sources */, |
| 2678 | 2559 | D2029D021E6EAE2E0027CD92 /* UIImage+ScaleImageSize.m in Sources */, |
| 2679 | 2560 | D2029BCC1E6EADD70027CD92 /* BaseView.m in Sources */, | ... | ... |
LiveVideoCloud.xcodeproj/xcuserdata/cnlive.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
| ... | ... | @@ -10,54 +10,6 @@ |
| 10 | 10 | ignoreCount = "0" |
| 11 | 11 | continueAfterRunningActions = "No" |
| 12 | 12 | filePath = "LiveVideoCloud/Classes/Sections/Mine/Login/Controller/RegisterCommonController.m" |
| 13 | - timestampString = "520247902.968764" | |
| 14 | - startingColumnNumber = "9223372036854775807" | |
| 15 | - endingColumnNumber = "9223372036854775807" | |
| 16 | - startingLineNumber = "111" | |
| 17 | - endingLineNumber = "111" | |
| 18 | - landmarkName = "-verificationBtnAction" | |
| 19 | - landmarkType = "7"> | |
| 20 | - </BreakpointContent> | |
| 21 | - </BreakpointProxy> | |
| 22 | - <BreakpointProxy | |
| 23 | - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | |
| 24 | - <BreakpointContent | |
| 25 | - shouldBeEnabled = "Yes" | |
| 26 | - ignoreCount = "0" | |
| 27 | - continueAfterRunningActions = "No" | |
| 28 | - filePath = "LiveVideoCloud/Classes/Sections/Mine/Login/Controller/RegisterCommonController.m" | |
| 29 | - timestampString = "520247904.16889" | |
| 30 | - startingColumnNumber = "9223372036854775807" | |
| 31 | - endingColumnNumber = "9223372036854775807" | |
| 32 | - startingLineNumber = "116" | |
| 33 | - endingLineNumber = "116" | |
| 34 | - landmarkName = "-verificationBtnAction" | |
| 35 | - landmarkType = "7"> | |
| 36 | - </BreakpointContent> | |
| 37 | - </BreakpointProxy> | |
| 38 | - <BreakpointProxy | |
| 39 | - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | |
| 40 | - <BreakpointContent | |
| 41 | - shouldBeEnabled = "Yes" | |
| 42 | - ignoreCount = "0" | |
| 43 | - continueAfterRunningActions = "No" | |
| 44 | - filePath = "LiveVideoCloud/Classes/Sections/Mine/Login/Controller/RegisterCommonController.m" | |
| 45 | - timestampString = "520248047.063621" | |
| 46 | - startingColumnNumber = "9223372036854775807" | |
| 47 | - endingColumnNumber = "9223372036854775807" | |
| 48 | - startingLineNumber = "101" | |
| 49 | - endingLineNumber = "101" | |
| 50 | - landmarkName = "-verificationBtnAction" | |
| 51 | - landmarkType = "7"> | |
| 52 | - </BreakpointContent> | |
| 53 | - </BreakpointProxy> | |
| 54 | - <BreakpointProxy | |
| 55 | - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | |
| 56 | - <BreakpointContent | |
| 57 | - shouldBeEnabled = "Yes" | |
| 58 | - ignoreCount = "0" | |
| 59 | - continueAfterRunningActions = "No" | |
| 60 | - filePath = "LiveVideoCloud/Classes/Sections/Mine/Login/Controller/RegisterCommonController.m" | |
| 61 | 13 | timestampString = "520251044.009626" |
| 62 | 14 | startingColumnNumber = "9223372036854775807" |
| 63 | 15 | endingColumnNumber = "9223372036854775807" | ... | ... |
LiveVideoCloud/AppCustoms/Main/ZXTabBarController.m
| ... | ... | @@ -52,7 +52,7 @@ |
| 52 | 52 | - (void)createUI |
| 53 | 53 | { |
| 54 | 54 | [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[LVCVodPlayerListController alloc]init]] title:@"" image:@"ic_home" selectedImage:@"ic_home_sel"]; |
| 55 | - [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[UIViewController alloc]init]] title:@"" image:@"ic_live_tv" selectedImage:@"ic_live_tv_sel"]; | |
| 55 | + [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[LVCTelevisioController alloc]init]] title:@"" image:@"ic_live_tv" selectedImage:@"ic_live_tv_sel"]; | |
| 56 | 56 | [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[LVCUGCLiveListController alloc]init]] title:@"" image:@"ic_videocam" selectedImage:@"ic_videocam_sel"]; |
| 57 | 57 | [self setupOneChildViewController:[[ZXNavigationController alloc]initWithRootViewController:[[LVCMineViewController alloc]init]] title:@"" image:@"ic_person" selectedImage:@"ic_person_sel"]; |
| 58 | 58 | } | ... | ... |
LiveVideoCloud/AppDelegate/AppDelegate.m
| ... | ... | @@ -23,12 +23,12 @@ |
| 23 | 23 | self.window.rootViewController = [[ZXTabBarController alloc] init]; |
| 24 | 24 | |
| 25 | 25 | //初始化直播SDK |
| 26 | - [[CNLiveWebcastManager manager] initWithAppId:UserAppId appKey:UserAppKey]; | |
| 26 | + [[CNLiveWebcastManager manager] initWithAppId:UserAppId appKey:UserAppKey isTestEnvironment:YES]; | |
| 27 | 27 | |
| 28 | 28 | //初始化聊天SDK并连接服务器 |
| 29 | - [[CNLiveChatManager sharedCNLiveChatManager] initWithAppKey:UserAppKey appId:UserAppId]; | |
| 29 | + [[CNLiveChatManager sharedCNLiveChatManager] initWithAppKey:UserAppKey appId:UserAppId ]; | |
| 30 | 30 | |
| 31 | - //初始化用户SDK(用户SDK无测试环境) | |
| 31 | + //初始化用户SDK | |
| 32 | 32 | [CNLiveUserSystemCenter setAppId:UserAppId appKey:UserAppKey appSecret:UserAppSceret isTestEnvironment:YES]; |
| 33 | 33 | |
| 34 | 34 | /* |
| ... | ... | @@ -52,6 +52,7 @@ |
| 52 | 52 | } error:^(CNLiveChatConnectErrorCode errors) { |
| 53 | 53 | NSLog(@"连接服务器失败-----%ld", errors); |
| 54 | 54 | }]; |
| 55 | + | |
| 55 | 56 | [self.window makeKeyAndVisible]; |
| 56 | 57 | |
| 57 | 58 | return YES; | ... | ... |
LiveVideoCloud/Classes/SDK/MHPagingScrollView/MHPagingScrollView.h deleted
100755 → 0
| 1 | - | |
| 2 | -#import <Foundation/Foundation.h> | |
| 3 | -#import <UIKit/UIKit.h> | |
| 4 | -@class MHPagingScrollView; | |
| 5 | - | |
| 6 | -/* | |
| 7 | - * Delegate protocol for MHPagingScrollView. | |
| 8 | - */ | |
| 9 | -@protocol MHPagingScrollViewDelegate <NSObject> | |
| 10 | - | |
| 11 | -/* | |
| 12 | - * Asks the delegate to return the number of pages. | |
| 13 | - */ | |
| 14 | -- (NSUInteger)numberOfPagesInPagingScrollView:(MHPagingScrollView *)pagingScrollView; | |
| 15 | - | |
| 16 | -/* | |
| 17 | - * Asks the delegate for a page to insert. The delegate should ask for a | |
| 18 | - * reusable view using dequeueReusablePageView. | |
| 19 | - */ | |
| 20 | -- (UIView *)pagingScrollView:(MHPagingScrollView *)pagingScrollView pageForIndex:(NSUInteger)index; | |
| 21 | - | |
| 22 | -@end | |
| 23 | - | |
| 24 | -/* | |
| 25 | - * A paging scroll view that employs a reusable page mechanism like UITableView. | |
| 26 | - * | |
| 27 | - * MHPagingScrollView allows you to show partial previews of the pages to the | |
| 28 | - * left and right of the current page. The bounds of the scroll view always | |
| 29 | - * correspond to a single page. To allow these previews, make the scroll view | |
| 30 | - * smaller to make room for the preview pages and set the previewInsets | |
| 31 | - * property. | |
| 32 | - */ | |
| 33 | -@interface MHPagingScrollView : UIScrollView | |
| 34 | - | |
| 35 | -/* The delegate for paging events. */ | |
| 36 | -@property (nonatomic, weak) id <MHPagingScrollViewDelegate> pagingDelegate; | |
| 37 | - | |
| 38 | -/* The width of the preview pages. */ | |
| 39 | -@property (nonatomic, assign) UIEdgeInsets previewInsets; | |
| 40 | - | |
| 41 | -/* set prepare, default is 0 */ | |
| 42 | -@property (nonatomic, assign) NSUInteger rightPrepareCount; | |
| 43 | -@property (nonatomic, assign) NSUInteger leftPrepareCount; | |
| 44 | - | |
| 45 | -//- (void)refreshPage; | |
| 46 | - | |
| 47 | -/* | |
| 48 | - * Makes the page at the requested index visible. | |
| 49 | - */ | |
| 50 | -- (void)selectPageAtIndex:(NSUInteger)index animated:(BOOL)animated; | |
| 51 | - | |
| 52 | -/* | |
| 53 | - * Returns the index of the page that is currently visible. | |
| 54 | - */ | |
| 55 | -- (NSUInteger)indexOfSelectedPage; | |
| 56 | - | |
| 57 | -/* | |
| 58 | - * Returns a reusable UIView object. | |
| 59 | - */ | |
| 60 | -- (UIView *)dequeueReusablePage; | |
| 61 | - | |
| 62 | -- (UIView *)dequeueReusablePageWithIdentify:(NSString *)identify; | |
| 63 | - | |
| 64 | -/* | |
| 65 | - * Reloads the pages. Call this method when the number of pages has changed. | |
| 66 | - */ | |
| 67 | -- (void)reloadPages; | |
| 68 | - | |
| 69 | -/* | |
| 70 | - * Call this from your view controller's UIScrollViewDelegate. | |
| 71 | - */ | |
| 72 | -- (void)scrollViewDidScroll; | |
| 73 | - | |
| 74 | -/* | |
| 75 | - * Call this from your view controller's willRotateToInterfaceOrientation if | |
| 76 | - * you want to support autorotation. | |
| 77 | - */ | |
| 78 | -- (void)beforeRotation; | |
| 79 | - | |
| 80 | -/* | |
| 81 | - * Call this from your view controller's willAnimateRotationToInterfaceOrientation | |
| 82 | - * if you want to support autorotation. | |
| 83 | - */ | |
| 84 | -- (void)afterRotation; | |
| 85 | - | |
| 86 | -/* | |
| 87 | - * Call this from your view controller's didReceiveMemoryWarning. | |
| 88 | - */ | |
| 89 | -- (void)didReceiveMemoryWarning; | |
| 90 | - | |
| 91 | -@end | |
| 92 | - | |
| 93 | -@interface MHPagingScrollView (UNREUSE) | |
| 94 | - | |
| 95 | -/* | |
| 96 | - * Returns a UIView object by index. | |
| 97 | - */ | |
| 98 | -- (UIView *)pageViewByIndex:(NSInteger)index; | |
| 99 | - | |
| 100 | -/* | |
| 101 | - * Returns the select UIView object . | |
| 102 | - */ | |
| 103 | -- (UIView *)selectPageView; | |
| 104 | - | |
| 105 | -- (BOOL)isLoadedPageByIndex:(NSInteger)index; | |
| 106 | - | |
| 107 | -- (void)preLoadedPageView:(UIView*)view index:(NSInteger)index; | |
| 108 | - | |
| 109 | -@end |
LiveVideoCloud/Classes/SDK/MHPagingScrollView/MHPagingScrollView.m deleted
100755 → 0
| 1 | - | |
| 2 | -#import "MHPagingScrollView.h" | |
| 3 | - | |
| 4 | -@interface MHPage : NSObject | |
| 5 | - | |
| 6 | -@property (nonatomic, strong) UIView *view; | |
| 7 | -@property (nonatomic, assign) NSUInteger index; | |
| 8 | - | |
| 9 | -@end | |
| 10 | - | |
| 11 | -@implementation MHPage | |
| 12 | - | |
| 13 | -@end | |
| 14 | - | |
| 15 | -@implementation MHPagingScrollView | |
| 16 | -{ | |
| 17 | - NSMutableSet *_recycledPages; | |
| 18 | - NSMutableSet *_visiblePages; | |
| 19 | - NSUInteger _firstVisiblePageIndexBeforeRotation; // for autorotation | |
| 20 | - CGFloat _percentScrolledIntoFirstVisiblePage; | |
| 21 | -} | |
| 22 | - | |
| 23 | -- (void)commonInit | |
| 24 | -{ | |
| 25 | - _recycledPages = [[NSMutableSet alloc] init]; | |
| 26 | - _visiblePages = [[NSMutableSet alloc] init]; | |
| 27 | - | |
| 28 | - self.pagingEnabled = YES; | |
| 29 | - self.showsVerticalScrollIndicator = NO; | |
| 30 | - self.showsHorizontalScrollIndicator = NO; | |
| 31 | - self.contentOffset = CGPointZero; | |
| 32 | -} | |
| 33 | - | |
| 34 | -- (id)initWithFrame:(CGRect)frame | |
| 35 | -{ | |
| 36 | - if ((self = [super initWithFrame:frame])) | |
| 37 | - { | |
| 38 | - [self commonInit]; | |
| 39 | - } | |
| 40 | - return self; | |
| 41 | -} | |
| 42 | - | |
| 43 | -- (id)initWithCoder:(NSCoder *)aDecoder | |
| 44 | -{ | |
| 45 | - if ((self = [super initWithCoder:aDecoder])) | |
| 46 | - { | |
| 47 | - [self commonInit]; | |
| 48 | - } | |
| 49 | - return self; | |
| 50 | -} | |
| 51 | - | |
| 52 | -- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event | |
| 53 | -{ | |
| 54 | - // This allows for touch handling outside of the scroll view's bounds. | |
| 55 | - | |
| 56 | - CGPoint parentLocation = [self convertPoint:point toView:self.superview]; | |
| 57 | - | |
| 58 | - CGRect responseRect = self.frame; | |
| 59 | - responseRect.origin.x -= _previewInsets.left; | |
| 60 | - responseRect.origin.y -= _previewInsets.top; | |
| 61 | - responseRect.size.width += (_previewInsets.left + _previewInsets.right); | |
| 62 | - responseRect.size.height += (_previewInsets.top + _previewInsets.bottom); | |
| 63 | - | |
| 64 | - return CGRectContainsPoint(responseRect, parentLocation); | |
| 65 | -} | |
| 66 | - | |
| 67 | -- (void)selectPageAtIndex:(NSUInteger)index animated:(BOOL)animated | |
| 68 | -{ | |
| 69 | - if (animated) { | |
| 70 | - | |
| 71 | - [UIView beginAnimations:nil context:NULL]; | |
| 72 | - [UIView setAnimationDuration:0.3f]; | |
| 73 | - [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; | |
| 74 | - } | |
| 75 | - | |
| 76 | - self.contentOffset = CGPointMake(self.bounds.size.width * index, 0); | |
| 77 | - if (animated) { | |
| 78 | - | |
| 79 | - [UIView commitAnimations]; | |
| 80 | - } | |
| 81 | -} | |
| 82 | - | |
| 83 | -- (NSUInteger)indexOfSelectedPage | |
| 84 | -{ | |
| 85 | - CGFloat width = self.bounds.size.width; | |
| 86 | - int currentPage = (self.contentOffset.x + width/2.0f) / width; | |
| 87 | - return currentPage; | |
| 88 | -} | |
| 89 | - | |
| 90 | -- (NSUInteger)numberOfPages | |
| 91 | -{ | |
| 92 | - return [_pagingDelegate numberOfPagesInPagingScrollView:self]; | |
| 93 | -} | |
| 94 | - | |
| 95 | -- (CGSize)contentSizeForPagingScrollView | |
| 96 | -{ | |
| 97 | - CGRect rect = self.bounds; | |
| 98 | - return CGSizeMake(rect.size.width * [self numberOfPages], rect.size.height); | |
| 99 | -} | |
| 100 | - | |
| 101 | -- (BOOL)isDisplayingPageForIndex:(NSUInteger)index | |
| 102 | -{ | |
| 103 | - for (MHPage *page in _visiblePages) | |
| 104 | - { | |
| 105 | - if (page.index == index) | |
| 106 | - return YES; | |
| 107 | - } | |
| 108 | - return NO; | |
| 109 | -} | |
| 110 | - | |
| 111 | -- (UIView *)dequeueReusablePage | |
| 112 | -{ | |
| 113 | - MHPage *page = [_recycledPages anyObject]; | |
| 114 | - if (page != nil) | |
| 115 | - { | |
| 116 | - UIView *view = page.view; | |
| 117 | - [_recycledPages removeObject:page]; | |
| 118 | - return view; | |
| 119 | - } | |
| 120 | - return nil; | |
| 121 | -} | |
| 122 | - | |
| 123 | -- (UIView *)dequeueReusablePageWithIdentify:(NSString *)identify | |
| 124 | -{ | |
| 125 | - for (MHPage *page in _recycledPages) { | |
| 126 | - if (page != nil) { | |
| 127 | - if ([[NSString stringWithFormat:@"%ld", (long)page.view.tag] isEqualToString:identify]) { | |
| 128 | - UIView *view = page.view; | |
| 129 | - [_recycledPages removeObject:page]; | |
| 130 | - return view; | |
| 131 | - } | |
| 132 | - } | |
| 133 | - } | |
| 134 | - return nil; | |
| 135 | -} | |
| 136 | - | |
| 137 | -- (CGRect)frameForPageAtIndex:(NSUInteger)index | |
| 138 | -{ | |
| 139 | - CGRect rect = self.bounds; | |
| 140 | - rect.origin.x = rect.size.width * index; | |
| 141 | - return rect; | |
| 142 | -} | |
| 143 | - | |
| 144 | -- (void)tilePages | |
| 145 | -{ | |
| 146 | - CGRect visibleBounds = self.bounds; | |
| 147 | - CGFloat pageWidth = CGRectGetWidth(visibleBounds); | |
| 148 | - visibleBounds.origin.x -= _previewInsets.left; | |
| 149 | - visibleBounds.size.width += (_previewInsets.left + _previewInsets.right); | |
| 150 | - | |
| 151 | - int firstNeededPageIndex = floorf(CGRectGetMinX(visibleBounds) / pageWidth)-self.leftPrepareCount; | |
| 152 | - int lastNeededPageIndex = floorf((CGRectGetMaxX(visibleBounds) - 1.0f) / pageWidth)+self.rightPrepareCount; | |
| 153 | - firstNeededPageIndex = MAX(firstNeededPageIndex, 0); | |
| 154 | - lastNeededPageIndex = MIN(lastNeededPageIndex, (int)[self numberOfPages] - 1); | |
| 155 | - | |
| 156 | - for (MHPage *page in _visiblePages) | |
| 157 | - { | |
| 158 | - if ((int)page.index < firstNeededPageIndex || (int)page.index > lastNeededPageIndex) | |
| 159 | - { | |
| 160 | - [_recycledPages addObject:page]; | |
| 161 | - [page.view removeFromSuperview]; | |
| 162 | - } | |
| 163 | - } | |
| 164 | - | |
| 165 | - [_visiblePages minusSet:_recycledPages]; | |
| 166 | - for (UIView *view in _recycledPages) { | |
| 167 | - if ([view isKindOfClass:[UIScrollView class]]) { | |
| 168 | - UIScrollView *scroll = (UIScrollView *)view; | |
| 169 | - scroll.scrollsToTop = NO; | |
| 170 | - } | |
| 171 | - } | |
| 172 | - | |
| 173 | - for (int i = firstNeededPageIndex; i <= lastNeededPageIndex; ++i) | |
| 174 | - { | |
| 175 | - if (![self isDisplayingPageForIndex:i]) | |
| 176 | - { | |
| 177 | - UIView *pageView = [_pagingDelegate pagingScrollView:self pageForIndex:i]; | |
| 178 | - if ([pageView isKindOfClass:[UIScrollView class]]) { | |
| 179 | - UIScrollView *scroll = (UIScrollView *)pageView; | |
| 180 | - scroll.scrollsToTop = YES; | |
| 181 | - } | |
| 182 | - pageView.frame = [self frameForPageAtIndex:i]; | |
| 183 | - pageView.autoresizingMask = UIViewAutoresizingFlexibleHeight; | |
| 184 | - [self addSubview:pageView]; | |
| 185 | - | |
| 186 | - MHPage *page = [[MHPage alloc] init]; | |
| 187 | - page.index = i; | |
| 188 | - page.view = pageView; | |
| 189 | - [_visiblePages addObject:page]; | |
| 190 | - } | |
| 191 | - } | |
| 192 | -} | |
| 193 | - | |
| 194 | -- (void)reloadPages | |
| 195 | -{ | |
| 196 | - self.contentSize = [self contentSizeForPagingScrollView]; | |
| 197 | - for (MHPage *page in _visiblePages) { | |
| 198 | - [page.view removeFromSuperview]; | |
| 199 | - } | |
| 200 | - for (MHPage *page in _recycledPages) { | |
| 201 | - [page.view removeFromSuperview]; | |
| 202 | - } | |
| 203 | - [_visiblePages removeAllObjects]; | |
| 204 | - [_recycledPages removeAllObjects]; | |
| 205 | - [self tilePages]; | |
| 206 | -} | |
| 207 | - | |
| 208 | -- (void)scrollViewDidScroll | |
| 209 | -{ | |
| 210 | - [self tilePages]; | |
| 211 | -} | |
| 212 | - | |
| 213 | -- (void)beforeRotation | |
| 214 | -{ | |
| 215 | - CGFloat offset = self.contentOffset.x; | |
| 216 | - CGFloat pageWidth = self.bounds.size.width; | |
| 217 | - | |
| 218 | - if (offset >= 0) | |
| 219 | - _firstVisiblePageIndexBeforeRotation = floorf(offset / pageWidth); | |
| 220 | - else | |
| 221 | - _firstVisiblePageIndexBeforeRotation = 0; | |
| 222 | - | |
| 223 | - _percentScrolledIntoFirstVisiblePage = offset / pageWidth - _firstVisiblePageIndexBeforeRotation; | |
| 224 | -} | |
| 225 | - | |
| 226 | -- (void)afterRotation | |
| 227 | -{ | |
| 228 | - self.contentSize = [self contentSizeForPagingScrollView]; | |
| 229 | - | |
| 230 | - for (MHPage *page in _visiblePages) | |
| 231 | - page.view.frame = [self frameForPageAtIndex:page.index]; | |
| 232 | - | |
| 233 | - CGFloat pageWidth = self.bounds.size.width; | |
| 234 | - CGFloat newOffset = (_firstVisiblePageIndexBeforeRotation + _percentScrolledIntoFirstVisiblePage) * pageWidth; | |
| 235 | - self.contentOffset = CGPointMake(newOffset, 0); | |
| 236 | -} | |
| 237 | - | |
| 238 | -- (void)didReceiveMemoryWarning | |
| 239 | -{ | |
| 240 | - [_recycledPages removeAllObjects]; | |
| 241 | -} | |
| 242 | - | |
| 243 | -@end | |
| 244 | - | |
| 245 | -@implementation MHPagingScrollView (UNREUSE) | |
| 246 | - | |
| 247 | -- (UIView *)pageViewByIndex:(NSInteger)index{ | |
| 248 | - for (MHPage* page in _recycledPages) { | |
| 249 | - if (page.index == index) { | |
| 250 | - UIView *view = page.view; | |
| 251 | - [_recycledPages removeObject:page]; | |
| 252 | - return view; | |
| 253 | - } | |
| 254 | - } | |
| 255 | - for (MHPage *page in _visiblePages) { | |
| 256 | - if (page.index == index) { | |
| 257 | - UIView *view = page.view; | |
| 258 | - return view; | |
| 259 | - } | |
| 260 | - } | |
| 261 | - return nil; | |
| 262 | -} | |
| 263 | - | |
| 264 | -- (UIView *)selectPageView{ | |
| 265 | - NSUInteger index = [self indexOfSelectedPage]; | |
| 266 | - for (MHPage *page in _visiblePages) { | |
| 267 | - if (page.index == index) { | |
| 268 | - UIView *view = page.view; | |
| 269 | - return view; | |
| 270 | - } | |
| 271 | - } | |
| 272 | - return nil; | |
| 273 | -} | |
| 274 | - | |
| 275 | -- (BOOL)isLoadedPageByIndex:(NSInteger)index{ | |
| 276 | - | |
| 277 | - for (MHPage* page in _recycledPages) { | |
| 278 | - if (page.index == index) { | |
| 279 | - return true; | |
| 280 | - } | |
| 281 | - } | |
| 282 | - for (MHPage *page in _visiblePages) { | |
| 283 | - if (page.index == index) { | |
| 284 | - return true; | |
| 285 | - } | |
| 286 | - } | |
| 287 | - return false; | |
| 288 | - | |
| 289 | -} | |
| 290 | - | |
| 291 | -- (void)preLoadedPageView:(UIView*)view index:(NSInteger)index{ | |
| 292 | - | |
| 293 | - MHPage *page = [[MHPage alloc] init]; | |
| 294 | - page.index = index; | |
| 295 | - page.view = view; | |
| 296 | - [_recycledPages addObject:page]; | |
| 297 | - | |
| 298 | -} | |
| 299 | - | |
| 300 | -- (void)refreshPage | |
| 301 | -{ | |
| 302 | - [_pagingDelegate pagingScrollView:self pageForIndex:0]; | |
| 303 | -} | |
| 304 | - | |
| 305 | -@end | |
| 306 | 0 | \ No newline at end of file |
LiveVideoCloud/Classes/SDK/V8HorizontalPickerView/V8HorizontalPickerView.h deleted
100755 → 0
| 1 | -// | |
| 2 | -// V8HorizontalPickerView.h | |
| 3 | -// | |
| 4 | -// Created by Shawn Veader on 9/17/10. | |
| 5 | -// Copyright 2010 V8 Labs, LLC. All rights reserved. | |
| 6 | -// | |
| 7 | - | |
| 8 | -#import <UIKit/UIKit.h> | |
| 9 | -#import "V8HorizontalPickerViewProtocol.h" | |
| 10 | - | |
| 11 | -@interface V8HorizontalPickerView : UIView <UIScrollViewDelegate> { } | |
| 12 | - | |
| 13 | -// delegate and datasources to feed scroll view. this view only maintains a weak reference to these | |
| 14 | -@property (nonatomic, assign) id <V8HorizontalPickerViewDataSource> dataSource; | |
| 15 | -@property (nonatomic, assign) id <V8HorizontalPickerViewDelegate> delegate; | |
| 16 | - | |
| 17 | -@property (nonatomic, readonly) NSInteger numberOfElements; | |
| 18 | -@property (nonatomic, readonly) NSInteger currentSelectedIndex; | |
| 19 | - | |
| 20 | -// what font to use for the element labels? | |
| 21 | -@property (nonatomic, retain) UIFont *elementFont; | |
| 22 | - | |
| 23 | -// color of labels used in picker | |
| 24 | -@property (nonatomic, retain) UIColor *textColor; | |
| 25 | -@property (nonatomic, retain) UIColor *selectedTextColor; // color of current selected element | |
| 26 | - | |
| 27 | -// select bg image | |
| 28 | -@property (nonatomic, retain) UIImage *currentBgImage; | |
| 29 | -@property (nonatomic, retain) NSString *isChatRoom; | |
| 30 | - | |
| 31 | -// views to display on edges of picker (eg: gradients, etc) | |
| 32 | -@property (nonatomic, retain) UIView *leftEdgeView; | |
| 33 | -@property (nonatomic, retain) UIView *rightEdgeView; | |
| 34 | - | |
| 35 | -// views for left and right of scrolling area | |
| 36 | -@property (nonatomic, retain) UIView *leftScrollEdgeView; | |
| 37 | -@property (nonatomic, retain) UIView *rightScrollEdgeView; | |
| 38 | - | |
| 39 | -// padding for left/right scroll edge views | |
| 40 | -@property (nonatomic, assign) CGFloat scrollEdgeViewPadding; | |
| 41 | - | |
| 42 | -@property (nonatomic, assign) NSInteger elementPadding; | |
| 43 | -@property (nonatomic, retain) UIScrollView *scrollView; | |
| 44 | -@property (nonatomic, retain) NSMutableArray *elementWidths; | |
| 45 | - | |
| 46 | -@property (nonatomic, assign) BOOL clickElementEnable; | |
| 47 | - | |
| 48 | -@property (nonatomic, assign) BOOL plugins; | |
| 49 | -@property (nonatomic, assign) BOOL myVideos; | |
| 50 | -@property (nonatomic, assign) BOOL home; | |
| 51 | - | |
| 52 | -- (id)initWithFrame:(CGRect)frame plugins:(BOOL)plugins myVideos:(BOOL)myVideos; | |
| 53 | -- (id)initWithFrame:(CGRect)frame home:(BOOL)home; | |
| 54 | - | |
| 55 | -- (void)reloadData; | |
| 56 | -- (void)scrollToElement:(NSInteger)index animated:(BOOL)animate; | |
| 57 | -@end | |
| 58 | - | |
| 59 | -// sub-class of UILabel that knows how to change it's state | |
| 60 | -@interface V8HorizontalPickerLabel : UILabel <V8HorizontalPickerElementState> { } | |
| 61 | - | |
| 62 | -@property (nonatomic, assign) BOOL selectedElement; | |
| 63 | -@property (nonatomic, retain) UIColor *selectedStateColor; | |
| 64 | -@property (nonatomic, retain) UIColor *normalStateColor; | |
| 65 | - | |
| 66 | -@end |
LiveVideoCloud/Classes/SDK/V8HorizontalPickerView/V8HorizontalPickerView.m deleted
100755 → 0
| 1 | -// | |
| 2 | -// V8HorizontalPickerView.m | |
| 3 | -// | |
| 4 | -// Created by Shawn Veader on 9/17/10. | |
| 5 | -// Copyright 2010 V8 Labs, LLC. All rights reserved. | |
| 6 | -// | |
| 7 | - | |
| 8 | -#import "V8HorizontalPickerView.h" | |
| 9 | - | |
| 10 | -#define CurrentBgTag 9999 | |
| 11 | - | |
| 12 | -#pragma mark - Internal Method Interface | |
| 13 | -@interface V8HorizontalPickerView () { | |
| 14 | - UIScrollView *_scrollView; | |
| 15 | - UIView *_currentBg; | |
| 16 | - | |
| 17 | - // collection of widths of each element. | |
| 18 | - NSMutableArray *_elementWidths; | |
| 19 | - | |
| 20 | - // state keepers | |
| 21 | - BOOL dataHasBeenLoaded; | |
| 22 | - BOOL scrollSizeHasBeenSet; | |
| 23 | - | |
| 24 | - // keep track of which elements are visible for tiling | |
| 25 | - int firstVisibleElement; | |
| 26 | - int lastVisibleElement; | |
| 27 | - | |
| 28 | - NSMutableArray *_lineArray; | |
| 29 | - BOOL _reload; | |
| 30 | -} | |
| 31 | - | |
| 32 | -@end | |
| 33 | - | |
| 34 | - | |
| 35 | -#pragma mark - Implementation | |
| 36 | -@implementation V8HorizontalPickerView : UIView | |
| 37 | - | |
| 38 | -@synthesize dataSource, delegate; | |
| 39 | -@synthesize numberOfElements, currentSelectedIndex; // readonly | |
| 40 | -@synthesize elementFont, textColor, selectedTextColor, currentBgImage; | |
| 41 | -@synthesize leftEdgeView, rightEdgeView; | |
| 42 | -@synthesize leftScrollEdgeView, rightScrollEdgeView, scrollEdgeViewPadding,elementPadding; | |
| 43 | - | |
| 44 | -#pragma mark - Init/Dealloc | |
| 45 | -- (id)initWithFrame:(CGRect)frame { | |
| 46 | - if ((self = [super initWithFrame:frame])) { | |
| 47 | - _elementWidths = [[NSMutableArray array] retain]; | |
| 48 | - _lineArray = [[NSMutableArray array] retain]; | |
| 49 | - | |
| 50 | - [self addScrollView]; | |
| 51 | - | |
| 52 | - self.textColor = [UIColor blackColor]; | |
| 53 | - self.elementFont = [UIFont systemFontOfSize:12.0f]; | |
| 54 | - | |
| 55 | - currentSelectedIndex = -1; // nothing is selected yet | |
| 56 | - | |
| 57 | - numberOfElements = 0; | |
| 58 | - elementPadding = 8; | |
| 59 | - dataHasBeenLoaded = NO; | |
| 60 | - scrollSizeHasBeenSet = NO; | |
| 61 | - | |
| 62 | - firstVisibleElement = -1; | |
| 63 | - lastVisibleElement = -1; | |
| 64 | - | |
| 65 | - scrollEdgeViewPadding = 0.0f; | |
| 66 | - | |
| 67 | - self.autoresizesSubviews = YES; | |
| 68 | - _reload = NO; | |
| 69 | - self.clickElementEnable = YES; | |
| 70 | - } | |
| 71 | - return self; | |
| 72 | -} | |
| 73 | - | |
| 74 | -- (id)initWithFrame:(CGRect)frame plugins:(BOOL)plugins myVideos:(BOOL)myVideos | |
| 75 | -{ | |
| 76 | - if ((self = [super initWithFrame:frame])) { | |
| 77 | - _plugins = plugins; | |
| 78 | - _myVideos = myVideos; | |
| 79 | - _elementWidths = [[NSMutableArray array] retain]; | |
| 80 | - _lineArray = [[NSMutableArray array] retain]; | |
| 81 | - | |
| 82 | - [self addScrollView]; | |
| 83 | - | |
| 84 | - self.textColor = [UIColor blackColor]; | |
| 85 | - self.elementFont = [UIFont systemFontOfSize:12.0f]; | |
| 86 | - | |
| 87 | - currentSelectedIndex = -1; // nothing is selected yet | |
| 88 | - | |
| 89 | - numberOfElements = 0; | |
| 90 | - elementPadding = 8; | |
| 91 | - dataHasBeenLoaded = NO; | |
| 92 | - scrollSizeHasBeenSet = NO; | |
| 93 | - | |
| 94 | - firstVisibleElement = -1; | |
| 95 | - lastVisibleElement = -1; | |
| 96 | - | |
| 97 | - scrollEdgeViewPadding = 0.0f; | |
| 98 | - | |
| 99 | - self.autoresizesSubviews = YES; | |
| 100 | - _reload = NO; | |
| 101 | - self.clickElementEnable = YES; | |
| 102 | - } | |
| 103 | - return self; | |
| 104 | -} | |
| 105 | - | |
| 106 | -- (id)initWithFrame:(CGRect)frame home:(BOOL)home | |
| 107 | -{ | |
| 108 | - if ((self = [super initWithFrame:frame])) { | |
| 109 | - | |
| 110 | - _home = home; | |
| 111 | - | |
| 112 | - _elementWidths = [[NSMutableArray array] retain]; | |
| 113 | - _lineArray = [[NSMutableArray array] retain]; | |
| 114 | - | |
| 115 | - [self addScrollView]; | |
| 116 | - | |
| 117 | - self.textColor = [UIColor blackColor]; | |
| 118 | - self.elementFont = [UIFont systemFontOfSize:12.0f]; | |
| 119 | - | |
| 120 | - currentSelectedIndex = -1; // nothing is selected yet | |
| 121 | - | |
| 122 | - numberOfElements = 0; | |
| 123 | - elementPadding = 8; | |
| 124 | - dataHasBeenLoaded = NO; | |
| 125 | - scrollSizeHasBeenSet = NO; | |
| 126 | - | |
| 127 | - firstVisibleElement = -1; | |
| 128 | - lastVisibleElement = -1; | |
| 129 | - | |
| 130 | - scrollEdgeViewPadding = 0.0f; | |
| 131 | - | |
| 132 | - self.autoresizesSubviews = YES; | |
| 133 | - _reload = NO; | |
| 134 | - self.clickElementEnable = YES; | |
| 135 | - } | |
| 136 | - return self; | |
| 137 | -} | |
| 138 | - | |
| 139 | -- (void)dealloc { | |
| 140 | - _scrollView.delegate = nil; | |
| 141 | - | |
| 142 | - [_lineArray release]; | |
| 143 | - [_scrollView release]; | |
| 144 | - [_elementWidths release]; | |
| 145 | - [elementFont release]; | |
| 146 | - [leftEdgeView release]; | |
| 147 | - [rightEdgeView release]; | |
| 148 | - | |
| 149 | - [leftScrollEdgeView release]; | |
| 150 | - [rightScrollEdgeView release]; | |
| 151 | - | |
| 152 | - [textColor release]; | |
| 153 | - [_currentBg release]; | |
| 154 | - [super dealloc]; | |
| 155 | -} | |
| 156 | - | |
| 157 | - | |
| 158 | -#pragma mark - LayoutSubViews | |
| 159 | -- (void)layoutSubviews { | |
| 160 | - [super layoutSubviews]; | |
| 161 | - | |
| 162 | -// if (!(_isChatRoom && [_isChatRoom isEqualToString:@"yes"])) { | |
| 163 | -// if (![self viewWithTag:1110]) { | |
| 164 | -// UIView *line = [[UIView alloc] initWithFrame:CGRectMake(0, self.frame.size.height-0.5, self.frame.size.width, 0.5)]; | |
| 165 | -// line.tag = 1110; | |
| 166 | -// [self addSubview:line]; | |
| 167 | -// line.backgroundColor = [Tools colorWithHexString:@"#d5d5d5"]; | |
| 168 | -// [line release]; | |
| 169 | -// } | |
| 170 | -// } | |
| 171 | - | |
| 172 | - BOOL adjustWhenFinished = NO; | |
| 173 | - | |
| 174 | - if (!dataHasBeenLoaded) { | |
| 175 | - [self collectData]; | |
| 176 | - } | |
| 177 | - if (!scrollSizeHasBeenSet) { | |
| 178 | - adjustWhenFinished = YES; | |
| 179 | - [self setTotalWidthOfScrollContent]; | |
| 180 | - } | |
| 181 | - | |
| 182 | - SEL titleForElementSelector = @selector(horizontalPickerView:titleForElementAtIndex:); | |
| 183 | - SEL viewForElementSelector = @selector(horizontalPickerView:viewForElementAtIndex:); | |
| 184 | - SEL setSelectedSelector = @selector(setSelectedElement:); | |
| 185 | - | |
| 186 | - CGRect visibleBounds = [self bounds]; | |
| 187 | - CGRect scaledViewFrame = CGRectZero; | |
| 188 | - | |
| 189 | - // remove any subviews that are no longer visible | |
| 190 | - for (UIView *view in [_scrollView subviews]) { | |
| 191 | - scaledViewFrame = [_scrollView convertRect:[view frame] toView:self]; | |
| 192 | - | |
| 193 | - // if the view doesn't intersect, it's not visible, so we can recycle it | |
| 194 | - if (view.tag!=CurrentBgTag&&!CGRectIntersectsRect(scaledViewFrame, visibleBounds)) { | |
| 195 | - [view removeFromSuperview]; | |
| 196 | - }else { // if it is still visible, update it's selected state | |
| 197 | - if ([view respondsToSelector:setSelectedSelector]) { | |
| 198 | - // view's tag is it's index | |
| 199 | - BOOL isSelected = (currentSelectedIndex == [self indexForElement:view]); | |
| 200 | - // casting to V8HorizontalPickerLabel so we can call this without all the NSInvocation jazz | |
| 201 | - [(V8HorizontalPickerLabel *)view setSelectedElement:isSelected]; | |
| 202 | - } else { | |
| 203 | - for (UIView *view1 in [view subviews]) { | |
| 204 | - if ([view1 respondsToSelector:setSelectedSelector]) { | |
| 205 | - // view's tag is it's index | |
| 206 | - BOOL isSelected = (currentSelectedIndex == view1.tag-100); | |
| 207 | - // casting to V8HorizontalPickerLabel so we can call this without all the NSInvocation jazz | |
| 208 | - [(V8HorizontalPickerLabel *)view1 setSelectedElement:isSelected]; | |
| 209 | - } | |
| 210 | - } | |
| 211 | - } | |
| 212 | - } | |
| 213 | - } | |
| 214 | - | |
| 215 | - // find needed elements by looking at left and right edges of frame | |
| 216 | - CGPoint offset = _scrollView.contentOffset; | |
| 217 | - int firstNeededElement = [self nearestElementToPoint:CGPointMake(offset.x, 0.0f)]; | |
| 218 | - int lastNeededElement = [self nearestElementToPoint:CGPointMake(offset.x + visibleBounds.size.width, 0.0f)]; | |
| 219 | - | |
| 220 | - // add any views that have become visible | |
| 221 | - UIView *view = nil; | |
| 222 | - CGRect tmpViewFrame = CGRectZero; | |
| 223 | - CGPoint itemViewCenter = CGPointZero; | |
| 224 | - for (int i = firstNeededElement; i <= lastNeededElement; i++) { | |
| 225 | - view = nil; // paranoia | |
| 226 | - view = [_scrollView viewWithTag:[self tagForElementAtIndex:i]]; | |
| 227 | - if (!view) { | |
| 228 | - if (i < numberOfElements) { // make sure we are not requesting data out of range | |
| 229 | - if (self.delegate && [self.delegate respondsToSelector:titleForElementSelector]) { | |
| 230 | - NSString *title = [self.delegate horizontalPickerView:self titleForElementAtIndex:i]; | |
| 231 | - view = [self labelForForElementAtIndex:i withTitle:title]; | |
| 232 | - } else if (self.delegate && [self.delegate respondsToSelector:viewForElementSelector]) { | |
| 233 | - view = [self.delegate horizontalPickerView:self viewForElementAtIndex:i]; | |
| 234 | - // move view's center to the center of item's ideal frame | |
| 235 | - tmpViewFrame = [self frameForElementAtIndex:i currentBg:NO]; | |
| 236 | - itemViewCenter = CGPointMake((tmpViewFrame.size.width / 2.0f) + tmpViewFrame.origin.x, (tmpViewFrame.size.height / 2.0f)); | |
| 237 | - view.center = itemViewCenter; | |
| 238 | - } | |
| 239 | - | |
| 240 | - if (view) { | |
| 241 | - // use the index as the tag so we can find it later | |
| 242 | - view.tag = [self tagForElementAtIndex:i]; | |
| 243 | - | |
| 244 | - [_scrollView addSubview:view]; | |
| 245 | - } | |
| 246 | - } | |
| 247 | - } | |
| 248 | - } | |
| 249 | - | |
| 250 | - // add the left or right edge views if visible | |
| 251 | - CGRect viewFrame = CGRectZero; | |
| 252 | - if (leftScrollEdgeView) { | |
| 253 | - viewFrame = [self frameForLeftScrollEdgeView]; | |
| 254 | - scaledViewFrame = [_scrollView convertRect:viewFrame toView:self]; | |
| 255 | - if (CGRectIntersectsRect(scaledViewFrame, visibleBounds) && ![leftScrollEdgeView isDescendantOfView:_scrollView]) { | |
| 256 | - leftScrollEdgeView.frame = viewFrame; | |
| 257 | - [_scrollView addSubview:leftScrollEdgeView]; | |
| 258 | - } | |
| 259 | - } | |
| 260 | - if (rightScrollEdgeView) { | |
| 261 | - viewFrame = [self frameForRightScrollEdgeView]; | |
| 262 | - scaledViewFrame = [_scrollView convertRect:viewFrame toView:self]; | |
| 263 | - if (CGRectIntersectsRect(scaledViewFrame, visibleBounds) && ![rightScrollEdgeView isDescendantOfView:_scrollView]) { | |
| 264 | - rightScrollEdgeView.frame = viewFrame; | |
| 265 | - [_scrollView addSubview:rightScrollEdgeView]; | |
| 266 | - } | |
| 267 | - } | |
| 268 | - | |
| 269 | - // save off what's visible now | |
| 270 | - firstVisibleElement = firstNeededElement; | |
| 271 | - lastVisibleElement = lastNeededElement; | |
| 272 | - | |
| 273 | - // determine if scroll view needs to shift in response to resizing? | |
| 274 | - if (currentSelectedIndex > -1 && adjustWhenFinished) { | |
| 275 | - [self scrollToElement:currentSelectedIndex animated:NO]; | |
| 276 | - } | |
| 277 | - | |
| 278 | - if (_reload) { | |
| 279 | - for (UIView *view in _lineArray) { | |
| 280 | - [view removeFromSuperview]; | |
| 281 | - } | |
| 282 | - [_lineArray removeAllObjects]; | |
| 283 | - } | |
| 284 | - | |
| 285 | -// if (_lineArray.count == 0) { | |
| 286 | -// int x = 0; | |
| 287 | -// int i = 0; | |
| 288 | -// for (NSNumber *number in _elementWidths) { | |
| 289 | -// if (i < _elementWidths.count-1) { | |
| 290 | -// NSInteger width = [number integerValue]; | |
| 291 | -// x += width; | |
| 292 | -// UIView *line = [[UIView alloc] initWithFrame:CGRectMake(x+8*i+3, (self.bounds.size.height-15)/2, 0.5, 15)]; | |
| 293 | -// line.backgroundColor = [Tools colorWithHexString:@"#d5d5d5"]; | |
| 294 | -// if (_isChatRoom && [_isChatRoom isEqualToString:@"yes"]) { | |
| 295 | -// line.backgroundColor = [UIColor whiteColor]; | |
| 296 | -// } | |
| 297 | -// [_lineArray addObject:line]; | |
| 298 | -// [line release]; | |
| 299 | -// } | |
| 300 | -// i++; | |
| 301 | -// } | |
| 302 | -// if (_lineArray.count != 0) { | |
| 303 | -// _reload = NO; | |
| 304 | -// [self setNeedsLayout]; | |
| 305 | -// } | |
| 306 | -// } else { | |
| 307 | -// for (UIView *view in _lineArray) { | |
| 308 | -// if (view.superview == nil) { | |
| 309 | -// [_scrollView addSubview:view]; | |
| 310 | -// } | |
| 311 | -// } | |
| 312 | -// } | |
| 313 | - | |
| 314 | -} | |
| 315 | - | |
| 316 | - | |
| 317 | -#pragma mark - Getters and Setters | |
| 318 | -- (void)setDelegate:(id)newDelegate { | |
| 319 | - if (delegate != newDelegate) { | |
| 320 | - delegate = newDelegate; | |
| 321 | - [self collectData]; | |
| 322 | - } | |
| 323 | -} | |
| 324 | - | |
| 325 | -- (void)setDataSource:(id)newDataSource { | |
| 326 | - if (dataSource != newDataSource) { | |
| 327 | - dataSource = newDataSource; | |
| 328 | - [self collectData]; | |
| 329 | - } | |
| 330 | -} | |
| 331 | - | |
| 332 | -// allow the setting of this views background color to change the scroll view | |
| 333 | -- (void)setBackgroundColor:(UIColor *)newColor { | |
| 334 | - [super setBackgroundColor:newColor]; | |
| 335 | - _scrollView.backgroundColor = newColor; | |
| 336 | - // TODO: set all subviews as well? | |
| 337 | -} | |
| 338 | - | |
| 339 | -- (void)setLeftEdgeView:(UIView *)leftView { | |
| 340 | - if (leftEdgeView != leftView) { | |
| 341 | - if (leftEdgeView) { | |
| 342 | - [leftEdgeView removeFromSuperview]; | |
| 343 | - [leftEdgeView release]; | |
| 344 | - } | |
| 345 | - leftEdgeView = [leftView retain]; | |
| 346 | - | |
| 347 | - CGRect tmpFrame = leftEdgeView.frame; | |
| 348 | - tmpFrame.origin.x = 0.0f; | |
| 349 | - tmpFrame.origin.y = 0.0f; | |
| 350 | - leftEdgeView.frame = tmpFrame; | |
| 351 | - [self addSubview:leftEdgeView]; | |
| 352 | - } | |
| 353 | -} | |
| 354 | - | |
| 355 | -- (void)setRightEdgeView:(UIView *)rightView { | |
| 356 | - if (rightEdgeView != rightView) { | |
| 357 | - if (rightEdgeView) { | |
| 358 | - [rightEdgeView removeFromSuperview]; | |
| 359 | - [rightEdgeView release]; | |
| 360 | - } | |
| 361 | - rightEdgeView = [rightView retain]; | |
| 362 | - | |
| 363 | - CGRect tmpFrame = rightEdgeView.frame; | |
| 364 | - tmpFrame.origin.x = self.frame.size.width - tmpFrame.size.width; | |
| 365 | - tmpFrame.origin.y = 0.0f; | |
| 366 | - rightEdgeView.frame = tmpFrame; | |
| 367 | - [self addSubview:rightEdgeView]; | |
| 368 | - } | |
| 369 | -} | |
| 370 | - | |
| 371 | -- (void)setLeftScrollEdgeView:(UIView *)leftView { | |
| 372 | - if (leftScrollEdgeView != leftView) { | |
| 373 | - if (leftScrollEdgeView) { | |
| 374 | - [leftScrollEdgeView removeFromSuperview]; | |
| 375 | - [leftScrollEdgeView release]; | |
| 376 | - } | |
| 377 | - leftScrollEdgeView = [leftView retain]; | |
| 378 | - | |
| 379 | - scrollSizeHasBeenSet = NO; | |
| 380 | - [self setNeedsLayout]; | |
| 381 | - } | |
| 382 | -} | |
| 383 | - | |
| 384 | -- (void)setRightScrollEdgeView:(UIView *)rightView { | |
| 385 | - if (rightScrollEdgeView != rightView) { | |
| 386 | - if (rightScrollEdgeView) { | |
| 387 | - [rightScrollEdgeView removeFromSuperview]; | |
| 388 | - [rightScrollEdgeView release]; | |
| 389 | - } | |
| 390 | - rightScrollEdgeView = [rightView retain]; | |
| 391 | - | |
| 392 | - scrollSizeHasBeenSet = NO; | |
| 393 | - [self setNeedsLayout]; | |
| 394 | - } | |
| 395 | -} | |
| 396 | - | |
| 397 | -- (void)setFrame:(CGRect)newFrame { | |
| 398 | - if (!CGRectEqualToRect(self.frame, newFrame)) { | |
| 399 | - // causes recalulation of offsets, etc based on new size | |
| 400 | - scrollSizeHasBeenSet = NO; | |
| 401 | - } | |
| 402 | - [super setFrame:newFrame]; | |
| 403 | -} | |
| 404 | - | |
| 405 | -- (void)setCurrentBgImage:(UIImage *)bgImage{ | |
| 406 | - if (currentBgImage != bgImage) { | |
| 407 | - if (currentBgImage) { | |
| 408 | - [currentBgImage release]; | |
| 409 | - } | |
| 410 | - currentBgImage = [bgImage retain]; | |
| 411 | - | |
| 412 | - if (_currentBg) { | |
| 413 | - if (_isChatRoom && [_isChatRoom isEqualToString:@"yes"]) { | |
| 414 | - | |
| 415 | - CGFloat y = self.plugins ? (self.bounds.size.height-27)/2 : self.height - 4; | |
| 416 | - CGFloat height = self.plugins ? 27 : 4; | |
| 417 | - _currentBg.frame = CGRectMake(0, y, 0, height); | |
| 418 | - _currentBg.backgroundColor = [UIColor whiteColor]; | |
| 419 | - } | |
| 420 | - } | |
| 421 | - } | |
| 422 | -} | |
| 423 | - | |
| 424 | -#pragma mark - Data Fetching Methods | |
| 425 | -- (void)reloadData { | |
| 426 | - // remove all scrollview subviews and "recycle" them | |
| 427 | - for (UIView *view in [_scrollView subviews]) { | |
| 428 | - if (view.tag==CurrentBgTag) { | |
| 429 | - view.frame = CGRectZero; | |
| 430 | - continue; | |
| 431 | - } | |
| 432 | - [view removeFromSuperview]; | |
| 433 | - } | |
| 434 | - _reload = YES; | |
| 435 | - firstVisibleElement = NSIntegerMax; | |
| 436 | - lastVisibleElement = NSIntegerMin; | |
| 437 | - | |
| 438 | - [self collectData]; | |
| 439 | -} | |
| 440 | - | |
| 441 | -- (void)collectData { | |
| 442 | - scrollSizeHasBeenSet = NO; | |
| 443 | - dataHasBeenLoaded = NO; | |
| 444 | - | |
| 445 | - [self getNumberOfElementsFromDataSource]; | |
| 446 | - [self getElementWidthsFromDelegate]; | |
| 447 | - [self setTotalWidthOfScrollContent]; | |
| 448 | - | |
| 449 | - dataHasBeenLoaded = YES; | |
| 450 | - [self setNeedsLayout]; | |
| 451 | - | |
| 452 | - [self scrollToElement:currentSelectedIndex animated:NO]; | |
| 453 | -} | |
| 454 | - | |
| 455 | - | |
| 456 | -#pragma mark - Scroll To Element Method | |
| 457 | -- (void)scrollToElement:(NSInteger)index animated:(BOOL)animate { | |
| 458 | - if (numberOfElements < 1) { | |
| 459 | - return ; | |
| 460 | - }else if (index<0) { | |
| 461 | - index = 0; | |
| 462 | - }else if (index>numberOfElements-1) { | |
| 463 | - index = numberOfElements-1; | |
| 464 | - } | |
| 465 | - | |
| 466 | - currentSelectedIndex = index; | |
| 467 | - | |
| 468 | - [UIView beginAnimations:nil context:nil]; | |
| 469 | - _currentBg.frame = [self frameForElementAtIndex:index currentBg:YES]; | |
| 470 | - if (self.plugins) { | |
| 471 | - _currentBg.frame = CGRectMake(_currentBg.frame.origin.x+(_currentBg.bounds.size.width-100)/2, (self.bounds.size.height-28)/2, 100, 28); | |
| 472 | - } | |
| 473 | -// _selectLine.frame = CGRectMake([self frameForElementAtIndex:index].origin.x, 35, [self frameForElementAtIndex:index].size.width, 2); | |
| 474 | - [UIView commitAnimations]; | |
| 475 | - | |
| 476 | - int offsetX = [self offsetForElementAtIndex:index]; | |
| 477 | - int width = [self widthOfElementAtIndex:index]; | |
| 478 | - | |
| 479 | - if (offsetX < _scrollView.contentOffset.x) { | |
| 480 | - [_scrollView setContentOffset:CGPointMake(offsetX, 0) animated:animate]; | |
| 481 | - }else if((offsetX+width) > (_scrollView.contentOffset.x+self.bounds.size.width)){ | |
| 482 | - [_scrollView setContentOffset:CGPointMake((offsetX+width-self.bounds.size.width), 0) animated:animate]; | |
| 483 | - } | |
| 484 | - | |
| 485 | - // notify delegate of the selected index | |
| 486 | - SEL delegateCall = @selector(horizontalPickerView:didSelectElementAtIndex:); | |
| 487 | - if (self.delegate && [self.delegate respondsToSelector:delegateCall]) { | |
| 488 | - [self.delegate horizontalPickerView:self didSelectElementAtIndex:index]; | |
| 489 | - } | |
| 490 | - | |
| 491 | -#if (__IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_4_3) | |
| 492 | - [self setNeedsLayout]; | |
| 493 | -#endif | |
| 494 | -} | |
| 495 | - | |
| 496 | -#pragma mark - UIScrollViewDelegate Methods | |
| 497 | -- (void)scrollViewDidScroll:(UIScrollView *)scrollView { | |
| 498 | -#if (__IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_4_3) | |
| 499 | - [self setNeedsLayout]; | |
| 500 | -#endif | |
| 501 | -} | |
| 502 | - | |
| 503 | -#pragma mark - View Creation Methods (Internal Methods) | |
| 504 | -- (void)addScrollView { | |
| 505 | - if (_scrollView == nil) { | |
| 506 | - _scrollView = [[UIScrollView alloc] initWithFrame:self.bounds]; | |
| 507 | - _scrollView.delegate = self; | |
| 508 | - _scrollView.scrollEnabled = YES; | |
| 509 | - _scrollView.scrollsToTop = NO; | |
| 510 | - _scrollView.showsVerticalScrollIndicator = NO; | |
| 511 | - _scrollView.showsHorizontalScrollIndicator = NO; | |
| 512 | - _scrollView.bouncesZoom = NO; | |
| 513 | - _scrollView.alwaysBounceHorizontal = YES; | |
| 514 | - _scrollView.alwaysBounceVertical = NO; | |
| 515 | - _scrollView.minimumZoomScale = 1.0; // setting min/max the same disables zooming | |
| 516 | - _scrollView.maximumZoomScale = 1.0; | |
| 517 | - _scrollView.contentInset = UIEdgeInsetsZero; | |
| 518 | - _scrollView.decelerationRate = 0.1; //UIScrollViewDecelerationRateNormal; | |
| 519 | - _scrollView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; | |
| 520 | - _scrollView.autoresizesSubviews = YES; | |
| 521 | - | |
| 522 | - UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(scrollViewTapped:)]; | |
| 523 | - [_scrollView addGestureRecognizer:tapRecognizer]; | |
| 524 | - [tapRecognizer release]; | |
| 525 | - | |
| 526 | - if (self.plugins || self.myVideos || self.home) { | |
| 527 | - | |
| 528 | - CGFloat y = self.plugins ? (self.bounds.size.height-27)/2 : self.height - 4; | |
| 529 | - CGFloat height = self.plugins ? 27 : 4; | |
| 530 | - | |
| 531 | - _currentBg = [[UIImageView alloc]init]; | |
| 532 | - _currentBg = [[UIView alloc] initWithFrame:CGRectMake(0, y, 0, height)]; | |
| 533 | - _currentBg.tag = CurrentBgTag; | |
| 534 | - _currentBg.backgroundColor = self.plugins ? [UIColor colorWithHexString:@"#fff100"] : [UIColor yellowColorCNLive]; | |
| 535 | - _currentBg.layer.borderColor = [UIColor colorWithHexString:@"#f6e80e"].CGColor; | |
| 536 | - _currentBg.layer.borderWidth = 0.5; | |
| 537 | - | |
| 538 | - if (self.plugins) { | |
| 539 | - _currentBg.layer.cornerRadius = 13.5; | |
| 540 | - _currentBg.layer.masksToBounds = YES; | |
| 541 | - | |
| 542 | - } | |
| 543 | - [_scrollView addSubview:_currentBg]; | |
| 544 | - } | |
| 545 | - | |
| 546 | - [self addSubview:_scrollView]; | |
| 547 | - | |
| 548 | - } | |
| 549 | -} | |
| 550 | - | |
| 551 | -// create a UILabel for this element. | |
| 552 | -- (V8HorizontalPickerLabel *)labelForForElementAtIndex:(NSInteger)index withTitle:(NSString *)title { | |
| 553 | - CGRect labelFrame = [self frameForElementAtIndex:index currentBg:NO]; | |
| 554 | - V8HorizontalPickerLabel *elementLabel = [[V8HorizontalPickerLabel alloc] initWithFrame:labelFrame]; | |
| 555 | - | |
| 556 | - elementLabel.textAlignment = NSTextAlignmentCenter; | |
| 557 | - elementLabel.backgroundColor = [UIColor clearColor]; | |
| 558 | - elementLabel.text = title; | |
| 559 | - elementLabel.font = self.elementFont; | |
| 560 | - | |
| 561 | - elementLabel.normalStateColor = self.textColor; | |
| 562 | - elementLabel.selectedStateColor = self.selectedTextColor; | |
| 563 | - | |
| 564 | - elementLabel.selectedElement = (currentSelectedIndex == index); | |
| 565 | - | |
| 566 | - return [elementLabel autorelease]; | |
| 567 | -} | |
| 568 | - | |
| 569 | - | |
| 570 | -#pragma mark - DataSource Calling Method (Internal Method) | |
| 571 | -- (void)getNumberOfElementsFromDataSource { | |
| 572 | - SEL dataSourceCall = @selector(numberOfElementsInHorizontalPickerView:); | |
| 573 | - if (self.dataSource && [self.dataSource respondsToSelector:dataSourceCall]) { | |
| 574 | - numberOfElements = [self.dataSource numberOfElementsInHorizontalPickerView:self]; | |
| 575 | - } else { | |
| 576 | - numberOfElements = 0; | |
| 577 | - } | |
| 578 | -} | |
| 579 | - | |
| 580 | - | |
| 581 | -#pragma mark - Delegate Calling Method (Internal Method) | |
| 582 | -- (void)getElementWidthsFromDelegate { | |
| 583 | - SEL delegateCall = @selector(horizontalPickerView:widthForElementAtIndex:); | |
| 584 | - [_elementWidths removeAllObjects]; | |
| 585 | - for (int i = 0; i < numberOfElements; i++) { | |
| 586 | - if (self.delegate && [self.delegate respondsToSelector:delegateCall]) { | |
| 587 | - NSInteger width = [self.delegate horizontalPickerView:self widthForElementAtIndex:i]; | |
| 588 | - [_elementWidths addObject:[NSNumber numberWithInteger:width]]; | |
| 589 | - } | |
| 590 | - } | |
| 591 | - | |
| 592 | -// int x = 0; | |
| 593 | -// for (NSNumber *number in _elementWidths) { | |
| 594 | -// NSInteger width = [number integerValue]; | |
| 595 | -// x += width; | |
| 596 | -// UIView *line = [[UIView alloc] initWithFrame:CGRectMake(x, 11, 1, 15)]; | |
| 597 | -// [_scrollView addSubview:line]; | |
| 598 | -//// line.backgroundColor = [Utility colorWithHexString:@"#d5d5d5"]; | |
| 599 | -// line.backgroundColor = [UIColor redColor]; | |
| 600 | -// [line release]; | |
| 601 | -// } | |
| 602 | - | |
| 603 | -} | |
| 604 | - | |
| 605 | - | |
| 606 | -#pragma mark - View Calculation and Manipulation Methods (Internal Methods) | |
| 607 | -// what is the total width of the content area? | |
| 608 | -- (void)setTotalWidthOfScrollContent { | |
| 609 | - NSInteger totalWidth = 0; | |
| 610 | - | |
| 611 | - totalWidth += [self leftScrollEdgeWidth]; | |
| 612 | - totalWidth += [self rightScrollEdgeWidth]; | |
| 613 | - | |
| 614 | - // sum the width of all elements | |
| 615 | - for (NSNumber *width in _elementWidths) { | |
| 616 | - totalWidth += [width intValue]; | |
| 617 | - totalWidth += elementPadding; | |
| 618 | - } | |
| 619 | - // TODO: is this necessary? | |
| 620 | - totalWidth -= elementPadding; // we add "one too many" in for loop | |
| 621 | - | |
| 622 | - if (_scrollView) { | |
| 623 | - // create our scroll view as wide as all the elements to be included | |
| 624 | - _scrollView.contentSize = CGSizeMake(totalWidth, self.bounds.size.height); | |
| 625 | - scrollSizeHasBeenSet = YES; | |
| 626 | - } | |
| 627 | -} | |
| 628 | - | |
| 629 | -// what is the left-most edge of the element at the given index? | |
| 630 | -- (NSInteger)offsetForElementAtIndex:(NSInteger)index { | |
| 631 | - NSInteger offset = 0; | |
| 632 | - if (index >= [_elementWidths count]) { | |
| 633 | - return 0; | |
| 634 | - } | |
| 635 | - | |
| 636 | - offset += [self leftScrollEdgeWidth]; | |
| 637 | - | |
| 638 | - for (int i = 0; i < index && i < [_elementWidths count]; i++) { | |
| 639 | - offset += [[_elementWidths safetyObjectAtIndex:i] intValue]; | |
| 640 | - offset += elementPadding; | |
| 641 | - } | |
| 642 | - return offset; | |
| 643 | -} | |
| 644 | - | |
| 645 | -// return the tag for an element at a given index | |
| 646 | -- (NSInteger)tagForElementAtIndex:(NSInteger)index { | |
| 647 | - return (index + 1) * 10; | |
| 648 | -} | |
| 649 | - | |
| 650 | -// return the index given an element's tag | |
| 651 | -- (NSInteger)indexForElement:(UIView *)element { | |
| 652 | - return (element.tag / 10) - 1; | |
| 653 | -} | |
| 654 | - | |
| 655 | -// what is the width of the element at the given index? | |
| 656 | -- (NSInteger)widthOfElementAtIndex:(NSInteger)index { | |
| 657 | - return [[_elementWidths safetyObjectAtIndex:index] intValue]; | |
| 658 | -} | |
| 659 | - | |
| 660 | -// what is the frame for the element at the given index? | |
| 661 | -- (CGRect)frameForElementAtIndex:(NSInteger)index currentBg:(BOOL)flag { | |
| 662 | - CGFloat width = 0.0f; | |
| 663 | - if ([_elementWidths count] > index) { | |
| 664 | - width = [[_elementWidths safetyObjectAtIndex:index] intValue]; | |
| 665 | - } | |
| 666 | - if (flag) { | |
| 667 | - if (_isChatRoom && [_isChatRoom isEqualToString:@"yes"]) { | |
| 668 | - return CGRectMake([self offsetForElementAtIndex:index]-5, self.bounds.size.height-28, width+8.5, 28); | |
| 669 | - } | |
| 670 | - CGFloat y = self.plugins ? (self.bounds.size.height-27)/2 : self.height -4; | |
| 671 | - CGFloat height = self.plugins ? 27 : 4; | |
| 672 | - if (self.home) { | |
| 673 | - return CGRectMake([self offsetForElementAtIndex:index]+8, y, width-16, height); | |
| 674 | - } | |
| 675 | - return CGRectMake([self offsetForElementAtIndex:index], y, width, height); | |
| 676 | - } else { | |
| 677 | - return CGRectMake([self offsetForElementAtIndex:index], 0.0f, width, self.frame.size.height); | |
| 678 | - } | |
| 679 | -} | |
| 680 | - | |
| 681 | -// what is the frame for the left scroll edge view? | |
| 682 | -- (CGRect)frameForLeftScrollEdgeView { | |
| 683 | - if (leftScrollEdgeView) { | |
| 684 | - CGFloat scrollHeight = _scrollView.contentSize.height; | |
| 685 | - CGFloat viewHeight = leftScrollEdgeView.frame.size.height; | |
| 686 | - return CGRectMake(0.0f, ((scrollHeight / 2.0f) - (viewHeight / 2.0f)), | |
| 687 | - leftScrollEdgeView.frame.size.width, viewHeight); | |
| 688 | - } else { | |
| 689 | - return CGRectZero; | |
| 690 | - } | |
| 691 | -} | |
| 692 | - | |
| 693 | -// what is the width of the left edge of the scroll area? | |
| 694 | -- (CGFloat)leftScrollEdgeWidth { | |
| 695 | - if (leftScrollEdgeView) { | |
| 696 | - CGFloat width = leftScrollEdgeView.frame.size.width; | |
| 697 | - width += scrollEdgeViewPadding; | |
| 698 | - return width; | |
| 699 | - } | |
| 700 | - return 0.0f; | |
| 701 | -} | |
| 702 | - | |
| 703 | -// what is the frame for the right scroll edge view? | |
| 704 | -- (CGRect)frameForRightScrollEdgeView { | |
| 705 | - if (rightScrollEdgeView) { | |
| 706 | - CGFloat scrollWidth = _scrollView.contentSize.width; | |
| 707 | - CGFloat scrollHeight = _scrollView.contentSize.height; | |
| 708 | - CGFloat viewWidth = rightScrollEdgeView.frame.size.width; | |
| 709 | - CGFloat viewHeight = rightScrollEdgeView.frame.size.height; | |
| 710 | - return CGRectMake(scrollWidth - viewWidth, ((scrollHeight / 2.0f) - (viewHeight / 2.0f)), | |
| 711 | - viewWidth, viewHeight); | |
| 712 | - } else { | |
| 713 | - return CGRectZero; | |
| 714 | - } | |
| 715 | -} | |
| 716 | - | |
| 717 | -// what is the width of the right edge of the scroll area? | |
| 718 | -- (CGFloat)rightScrollEdgeWidth { | |
| 719 | - if (rightScrollEdgeView) { | |
| 720 | - CGFloat width = rightScrollEdgeView.frame.size.width; | |
| 721 | - width += scrollEdgeViewPadding; | |
| 722 | - return width; | |
| 723 | - } | |
| 724 | - return 0.0f; | |
| 725 | -} | |
| 726 | - | |
| 727 | -// what is the element nearest to the given point? | |
| 728 | -- (NSInteger)nearestElementToPoint:(CGPoint)point { | |
| 729 | - for (int i = 0; i < numberOfElements; i++) { | |
| 730 | - CGRect frame = [self frameForElementAtIndex:i currentBg:NO]; | |
| 731 | - if (CGRectContainsPoint(frame, point)) { | |
| 732 | - return i; | |
| 733 | - } else if (point.x < frame.origin.x) { | |
| 734 | - // if the center is before this element, go back to last one, | |
| 735 | - // unless we're at the beginning | |
| 736 | - if (i > 0) { | |
| 737 | - return i - 1; | |
| 738 | - } else { | |
| 739 | - return 0; | |
| 740 | - } | |
| 741 | - break; | |
| 742 | - } else if (point.x > frame.origin.y) { | |
| 743 | - // if the center is past the last element, scroll to it | |
| 744 | - if (i == numberOfElements - 1) { | |
| 745 | - return i; | |
| 746 | - } | |
| 747 | - } | |
| 748 | - } | |
| 749 | - return 0; | |
| 750 | -} | |
| 751 | - | |
| 752 | -// similar to nearestElementToPoint: however, this method does not look past beginning/end | |
| 753 | -- (NSInteger)elementContainingPoint:(CGPoint)point { | |
| 754 | - for (int i = 0; i < numberOfElements; i++) { | |
| 755 | - CGRect frame = [self frameForElementAtIndex:i currentBg:NO]; | |
| 756 | - if (CGRectContainsPoint(frame, point)) { | |
| 757 | - return i; | |
| 758 | - } | |
| 759 | - } | |
| 760 | - return -1; | |
| 761 | -} | |
| 762 | - | |
| 763 | -#pragma mark - Tap Gesture Recognizer Handler Method | |
| 764 | -// use the gesture recognizer to slide to element under tap | |
| 765 | -- (void)scrollViewTapped:(UITapGestureRecognizer *)recognizer { | |
| 766 | - if (!self.clickElementEnable) { | |
| 767 | - return; | |
| 768 | - } | |
| 769 | - if (recognizer.state == UIGestureRecognizerStateRecognized) { | |
| 770 | - CGPoint tapLocation = [recognizer locationInView:_scrollView]; | |
| 771 | - NSInteger elementIndex = [self elementContainingPoint:tapLocation]; | |
| 772 | - if (elementIndex != -1) { // point not in element | |
| 773 | - [self scrollToElement:elementIndex animated:YES]; | |
| 774 | - } | |
| 775 | - } | |
| 776 | -} | |
| 777 | - | |
| 778 | -@end | |
| 779 | - | |
| 780 | -// ------------------------------------------------------------------------ | |
| 781 | -#pragma mark - Picker Label Implementation | |
| 782 | -@implementation V8HorizontalPickerLabel : UILabel | |
| 783 | - | |
| 784 | -@synthesize selectedElement, selectedStateColor, normalStateColor; | |
| 785 | - | |
| 786 | -- (void)setSelectedElement:(BOOL)selected { | |
| 787 | - if (selectedElement != selected) { | |
| 788 | - if (selected) { | |
| 789 | - self.textColor = self.selectedStateColor; | |
| 790 | - } else { | |
| 791 | - self.textColor = self.normalStateColor; | |
| 792 | - } | |
| 793 | - selectedElement = selected; | |
| 794 | - [self setNeedsLayout]; | |
| 795 | - } | |
| 796 | -} | |
| 797 | - | |
| 798 | -- (void)setNormalStateColor:(UIColor *)color { | |
| 799 | - if (normalStateColor != color) { | |
| 800 | - [normalStateColor release]; | |
| 801 | - normalStateColor = [color retain]; | |
| 802 | - self.textColor = normalStateColor; | |
| 803 | - [self setNeedsLayout]; | |
| 804 | - } | |
| 805 | -} | |
| 806 | - | |
| 807 | -@end |
LiveVideoCloud/Classes/SDK/V8HorizontalPickerView/V8HorizontalPickerViewProtocol.h deleted
100755 → 0
| 1 | -// | |
| 2 | -// V8HorizontalPickerViewProtocol.h | |
| 3 | -// | |
| 4 | -// Created by Shawn Veader on 9/17/10. | |
| 5 | -// Copyright 2010 V8 Labs, LLC. All rights reserved. | |
| 6 | -// | |
| 7 | - | |
| 8 | -@class V8HorizontalPickerView; | |
| 9 | - | |
| 10 | -// ------------------------------------------------------------------ | |
| 11 | -// V8HorizontalPickerView DataSource Protocol | |
| 12 | -@protocol V8HorizontalPickerViewDataSource <NSObject> | |
| 13 | -@required | |
| 14 | -// data source is responsible for reporting how many elements there are | |
| 15 | -- (NSInteger)numberOfElementsInHorizontalPickerView:(V8HorizontalPickerView *)picker; | |
| 16 | -@end | |
| 17 | - | |
| 18 | - | |
| 19 | -// ------------------------------------------------------------------ | |
| 20 | -// V8HorizontalPickerView Delegate Protocol | |
| 21 | -@protocol V8HorizontalPickerViewDelegate <NSObject> | |
| 22 | - | |
| 23 | -@optional | |
| 24 | -// delegate callback to notify delegate selected element has changed | |
| 25 | -- (void)horizontalPickerView:(V8HorizontalPickerView *)picker didSelectElementAtIndex:(NSInteger)index; | |
| 26 | - | |
| 27 | -// one of these two methods must be defined | |
| 28 | -- (NSString *)horizontalPickerView:(V8HorizontalPickerView *)picker titleForElementAtIndex:(NSInteger)index; | |
| 29 | -- (UIView *)horizontalPickerView:(V8HorizontalPickerView *)picker viewForElementAtIndex:(NSInteger)index; | |
| 30 | -// any view returned from this must confirm to the V8HorizontalPickerElementState protocol | |
| 31 | - | |
| 32 | -@required | |
| 33 | -// delegate is responsible for reporting the size of each element | |
| 34 | -- (NSInteger)horizontalPickerView:(V8HorizontalPickerView *)picker widthForElementAtIndex:(NSInteger)index; | |
| 35 | - | |
| 36 | -@end | |
| 37 | - | |
| 38 | -// ------------------------------------------------------------------ | |
| 39 | -// V8HorizontalPickerElementState Protocol | |
| 40 | -@protocol V8HorizontalPickerElementState <NSObject> | |
| 41 | -@required | |
| 42 | -// element views should know how display themselves based on selected status | |
| 43 | -- (void)setSelectedElement:(BOOL)selected; | |
| 44 | -@end | |
| 45 | 0 | \ No newline at end of file |
LiveVideoCloud/Classes/Sections/HomePageSections/JBAutoRollTableView.h deleted
100644 → 0
| 1 | -// | |
| 2 | -// JBAutoRollTableView.h | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/22. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import <UIKit/UIKit.h> | |
| 10 | - | |
| 11 | -@interface JBAutoRollTableView : UITableView | |
| 12 | - | |
| 13 | -@property (nonatomic, strong) NSArray *news; | |
| 14 | - | |
| 15 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/JBAutoRollTableView.m deleted
100644 → 0
| 1 | -// | |
| 2 | -// JBAutoRollTableView.m | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/22. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import "JBAutoRollTableView.h" | |
| 10 | - | |
| 11 | -@interface JBAutoRollTableView()<UITableViewDataSource, UITableViewDelegate> { | |
| 12 | - | |
| 13 | - NSTimer *_timer; | |
| 14 | - NSIndexPath *_currentIndexPath; | |
| 15 | -} | |
| 16 | - | |
| 17 | -@end | |
| 18 | - | |
| 19 | -@implementation JBAutoRollTableView | |
| 20 | - | |
| 21 | -- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style | |
| 22 | -{ | |
| 23 | - self = [super initWithFrame:frame style:style]; | |
| 24 | - if (self) { | |
| 25 | - self.showsHorizontalScrollIndicator = NO; | |
| 26 | - self.showsVerticalScrollIndicator = NO; | |
| 27 | - self.delegate = self; | |
| 28 | - self.dataSource = self; | |
| 29 | - self.rowHeight = self.height; | |
| 30 | - self.separatorStyle = UITableViewCellSeparatorStyleNone; | |
| 31 | - self.scrollEnabled = NO; | |
| 32 | - self.scrollsToTop = NO; | |
| 33 | - } | |
| 34 | - return self; | |
| 35 | -} | |
| 36 | - | |
| 37 | -- (void)setNews:(NSArray *)news { | |
| 38 | - if (_news != news) { | |
| 39 | - _news = news; | |
| 40 | - [self reloadData]; | |
| 41 | - [_timer invalidate]; | |
| 42 | - _currentIndexPath = [NSIndexPath indexPathForRow:0 inSection:0]; | |
| 43 | - if (news.count > 1) { | |
| 44 | - _timer = [NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(autoRollNews) userInfo:nil repeats:YES]; | |
| 45 | - } | |
| 46 | - } | |
| 47 | -} | |
| 48 | - | |
| 49 | -- (void)autoRollNews | |
| 50 | -{ | |
| 51 | - if (_news.count < 2) { | |
| 52 | - [_timer invalidate]; | |
| 53 | - _timer = nil; | |
| 54 | - return; | |
| 55 | - } | |
| 56 | - if (_currentIndexPath.row < _news.count-1) { | |
| 57 | - [self scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:_currentIndexPath.row + 1 inSection:0] atScrollPosition:UITableViewScrollPositionMiddle animated:YES]; | |
| 58 | - _currentIndexPath = [NSIndexPath indexPathForRow:_currentIndexPath.row + 1 inSection:0]; | |
| 59 | - } else { | |
| 60 | - | |
| 61 | - NSMutableArray *array = [NSMutableArray arrayWithArray:_news]; | |
| 62 | - [array insertObject:[_news lastObject] atIndex:0]; | |
| 63 | - [array removeLastObject]; | |
| 64 | - _news = array; | |
| 65 | - [self reloadData]; | |
| 66 | - [self scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionMiddle animated:NO]; | |
| 67 | - [self scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0] atScrollPosition:UITableViewScrollPositionMiddle animated:YES]; | |
| 68 | - _currentIndexPath = [NSIndexPath indexPathForRow:1 inSection:0]; | |
| 69 | - } | |
| 70 | -} | |
| 71 | - | |
| 72 | -#pragma mark - UITableViewDataSource !!!!!!!!!!!!!!!!!!!! | |
| 73 | -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | |
| 74 | -{ | |
| 75 | - return _news.count; | |
| 76 | -} | |
| 77 | - | |
| 78 | -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
| 79 | -{ | |
| 80 | - static NSString *identify = @"newsTableViewcell"; | |
| 81 | - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identify]; | |
| 82 | - if (cell == nil) { | |
| 83 | - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identify]; | |
| 84 | - cell.selectionStyle = UITableViewCellSelectionStyleNone; | |
| 85 | - UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, self.height)]; | |
| 86 | - label.tag = 101; | |
| 87 | - label.textColor = [UIColor grayColorCNLive]; | |
| 88 | - label.font = [UIFont systemFontOfSize:14]; | |
| 89 | - [cell addSubview:label]; | |
| 90 | - } | |
| 91 | - ProgramModel *model = [_news safetyObjectAtIndex:indexPath.row]; | |
| 92 | - UILabel *label = (UILabel *)[cell viewWithTag:101]; | |
| 93 | - label.text = model.title; | |
| 94 | - return cell; | |
| 95 | -} | |
| 96 | - | |
| 97 | -#pragma mark - UITableViewDelegate !!!!!!!!!!!!!!!!!!!! | |
| 98 | -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 99 | - | |
| 100 | - [tableView deselectRowAtIndexPath:indexPath animated:YES]; | |
| 101 | -} | |
| 102 | - | |
| 103 | -- (void)removeFromSuperview { | |
| 104 | - [super removeFromSuperview]; | |
| 105 | - | |
| 106 | - [_timer invalidate]; | |
| 107 | - _timer = nil; | |
| 108 | -} | |
| 109 | - | |
| 110 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/JBBannerView.h deleted
100644 → 0
| 1 | -// | |
| 2 | -// JBBannerView.h | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/21. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import <UIKit/UIKit.h> | |
| 10 | -@class JBBannerView; | |
| 11 | - | |
| 12 | -@protocol JBBannerViewDelegate <NSObject> | |
| 13 | -@optional | |
| 14 | -- (void)didSelectedBannerView:(JBBannerView *)banner atIndex:(NSInteger)index; | |
| 15 | -@end | |
| 16 | - | |
| 17 | -@protocol JBBannerViewDatasource <NSObject> | |
| 18 | -@required | |
| 19 | -- (NSInteger)numberOfPages; | |
| 20 | -- (UIView *)pageAtIndex:(NSInteger)index; | |
| 21 | -@end | |
| 22 | - | |
| 23 | -@interface JBBannerView : UIView | |
| 24 | - | |
| 25 | -@property (nonatomic, weak) id <JBBannerViewDelegate> delegate; | |
| 26 | -@property (nonatomic, weak) id <JBBannerViewDatasource> datasource; | |
| 27 | -@property (nonatomic, strong) NSArray *bannerArray; | |
| 28 | - | |
| 29 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/JBBannerView.m deleted
100644 → 0
| 1 | -// | |
| 2 | -// JBBannerView.m | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/21. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import "JBBannerView.h" | |
| 10 | - | |
| 11 | -#define kDataScaleSeed 100 | |
| 12 | - | |
| 13 | -@interface JBBannerView() <UICollectionViewDelegate, UICollectionViewDataSource> { | |
| 14 | - | |
| 15 | - NSTimer *_timer; | |
| 16 | - NSTimeInterval _timerDuration; | |
| 17 | -} | |
| 18 | - | |
| 19 | -@property (nonatomic, strong) UICollectionView *collectionView; | |
| 20 | -@property (nonatomic, strong) UILabel *cycleViewTitle; | |
| 21 | - | |
| 22 | -@end | |
| 23 | - | |
| 24 | -@implementation JBBannerView | |
| 25 | - | |
| 26 | -- (instancetype)initWithFrame:(CGRect)frame | |
| 27 | -{ | |
| 28 | - self = [super initWithFrame:frame]; | |
| 29 | - if (self) { | |
| 30 | - _timerDuration = 3.0; | |
| 31 | - _timer = [NSTimer timerWithTimeInterval:_timerDuration target:self selector:@selector(updateTimer) userInfo:nil repeats:YES]; | |
| 32 | - [[NSRunLoop currentRunLoop] addTimer:_timer forMode:NSRunLoopCommonModes]; | |
| 33 | - | |
| 34 | - [self addSubview:self.collectionView]; | |
| 35 | - [self addSubview:self.cycleViewTitle]; | |
| 36 | - } | |
| 37 | - return self; | |
| 38 | -} | |
| 39 | - | |
| 40 | -#pragma mark - 时钟方法 | |
| 41 | -- (void)updateTimer { | |
| 42 | - | |
| 43 | - NSIndexPath *indexPath = [_collectionView indexPathsForVisibleItems].lastObject; | |
| 44 | - NSIndexPath *newIndexPath = [NSIndexPath indexPathForItem:indexPath.item + 1 inSection:indexPath.section]; | |
| 45 | - | |
| 46 | - [_collectionView scrollToItemAtIndexPath:newIndexPath atScrollPosition:UICollectionViewScrollPositionLeft animated:YES]; | |
| 47 | -} | |
| 48 | - | |
| 49 | -- (void)setBannerArray:(NSArray *)bannerArray { | |
| 50 | - | |
| 51 | - if (_bannerArray != bannerArray) { | |
| 52 | - _bannerArray = bannerArray; | |
| 53 | - | |
| 54 | - | |
| 55 | - } | |
| 56 | -} | |
| 57 | - | |
| 58 | -#pragma mark - UICollectionViewDelegate !!!!!!!!!!!! | |
| 59 | -- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { | |
| 60 | - | |
| 61 | - | |
| 62 | -} | |
| 63 | - | |
| 64 | -- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView { | |
| 65 | - | |
| 66 | - [self scrollViewDidEndDecelerating:scrollView]; | |
| 67 | -} | |
| 68 | - | |
| 69 | -- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { | |
| 70 | - | |
| 71 | - NSInteger page = scrollView.contentOffset.x / scrollView.bounds.size.width; | |
| 72 | - | |
| 73 | - self.cycleViewTitle.text = [NSString stringWithFormat:@" %ld",(long)(page % 3)]; | |
| 74 | - | |
| 75 | - NSInteger lastItem = [_collectionView numberOfItemsInSection:0]; | |
| 76 | - | |
| 77 | - if (page == 0 || page == (lastItem - 1)) { | |
| 78 | - | |
| 79 | - NSInteger offset = 3; | |
| 80 | - | |
| 81 | - if (page == (lastItem - 1)) { | |
| 82 | - offset = offset - 1; | |
| 83 | - } | |
| 84 | - | |
| 85 | - CGFloat width = scrollView.bounds.size.width; | |
| 86 | - | |
| 87 | - scrollView.contentOffset = CGPointMake(offset * width, 0); | |
| 88 | - } | |
| 89 | -} | |
| 90 | - | |
| 91 | -- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { | |
| 92 | - | |
| 93 | - _timer.fireDate = [NSDate distantFuture]; | |
| 94 | -} | |
| 95 | - | |
| 96 | -- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { | |
| 97 | - | |
| 98 | - _timer.fireDate = [NSDate dateWithTimeIntervalSinceNow:_timerDuration]; | |
| 99 | -} | |
| 100 | - | |
| 101 | -#pragma mark - UICollectionViewDataSource !!!!!!!!!!!! | |
| 102 | -- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { | |
| 103 | - | |
| 104 | - return 6; | |
| 105 | -} | |
| 106 | - | |
| 107 | -- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { | |
| 108 | - | |
| 109 | - UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"collcellId" forIndexPath:indexPath]; | |
| 110 | - switch (indexPath.item) { | |
| 111 | - case 0: | |
| 112 | - cell.backgroundColor = [UIColor yellowColor]; | |
| 113 | - break; | |
| 114 | - case 1: | |
| 115 | - cell.backgroundColor = [UIColor greenColor]; | |
| 116 | - break; | |
| 117 | - case 2: | |
| 118 | - cell.backgroundColor = [UIColor blueColor]; | |
| 119 | - break; | |
| 120 | - case 3: | |
| 121 | - cell.backgroundColor = [UIColor yellowColor]; | |
| 122 | - break; | |
| 123 | - case 4: | |
| 124 | - cell.backgroundColor = [UIColor greenColor]; | |
| 125 | - break; | |
| 126 | - case 5: | |
| 127 | - cell.backgroundColor = [UIColor blueColor]; | |
| 128 | - break; | |
| 129 | - default: | |
| 130 | - break; | |
| 131 | - } | |
| 132 | - | |
| 133 | - return cell; | |
| 134 | -} | |
| 135 | - | |
| 136 | -#pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 137 | -- (UICollectionView *)collectionView { | |
| 138 | - | |
| 139 | - if (!_collectionView) { | |
| 140 | - UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; | |
| 141 | - layout.minimumLineSpacing = 0; | |
| 142 | - layout.minimumInteritemSpacing = 0; | |
| 143 | - layout.itemSize = CGSizeMake(KScreenWidth-20, (KScreenWidth-20)/2); | |
| 144 | - layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; | |
| 145 | - | |
| 146 | - _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(10, 10, KScreenWidth-20, (KScreenWidth-20)/2) collectionViewLayout:layout]; | |
| 147 | - _collectionView.backgroundColor = [UIColor whiteColor]; | |
| 148 | - _collectionView.delegate = self; | |
| 149 | - _collectionView.dataSource = self; | |
| 150 | - _collectionView.pagingEnabled = YES; | |
| 151 | - _collectionView.showsVerticalScrollIndicator = NO; | |
| 152 | - _collectionView.showsHorizontalScrollIndicator = NO; | |
| 153 | - _collectionView.bounces = NO; | |
| 154 | - [_collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"collcellId"]; | |
| 155 | - } | |
| 156 | - return _collectionView; | |
| 157 | -} | |
| 158 | - | |
| 159 | -- (UILabel *)cycleViewTitle { | |
| 160 | - | |
| 161 | - if (!_cycleViewTitle) { | |
| 162 | - | |
| 163 | - _cycleViewTitle = [[UILabel alloc] initWithFrame:CGRectMake(10, self.collectionView.bottom-35, self.collectionView.width, 35)]; | |
| 164 | - _cycleViewTitle.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5]; | |
| 165 | - _cycleViewTitle.textColor = [UIColor whiteColor]; | |
| 166 | - _cycleViewTitle.font = [UIFont systemFontOfSize:19]; | |
| 167 | - } | |
| 168 | - return _cycleViewTitle; | |
| 169 | -} | |
| 170 | - | |
| 171 | -- (void)removeFromSuperview { | |
| 172 | - [super removeFromSuperview]; | |
| 173 | - | |
| 174 | - [_timer invalidate]; | |
| 175 | - _timer = nil; | |
| 176 | -} | |
| 177 | - | |
| 178 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/JBSearchView.h deleted
100644 → 0
LiveVideoCloud/Classes/Sections/HomePageSections/JBSearchView.m deleted
100644 → 0
| 1 | -// | |
| 2 | -// JBSearchView.m | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/22. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import "JBSearchView.h" | |
| 10 | - | |
| 11 | -@interface JBSearchView() | |
| 12 | - | |
| 13 | -@property (nonatomic, strong) UIButton *searchBtn; | |
| 14 | -@property (nonatomic, strong) UIView *searchLine; | |
| 15 | -@property (nonatomic, strong) UIView *sortBtnBackground; | |
| 16 | - | |
| 17 | -@end | |
| 18 | - | |
| 19 | -@implementation JBSearchView | |
| 20 | - | |
| 21 | -- (instancetype)initWithFrame:(CGRect)frame | |
| 22 | -{ | |
| 23 | - self = [super initWithFrame:frame]; | |
| 24 | - if (self) { | |
| 25 | - [self addSubview:self.searchBtn]; | |
| 26 | - } | |
| 27 | - return self; | |
| 28 | -} | |
| 29 | - | |
| 30 | -- (void)setSortArray:(NSArray *)sortArray { | |
| 31 | - | |
| 32 | - if (_sortArray != sortArray) { | |
| 33 | - _sortArray = sortArray; | |
| 34 | - } | |
| 35 | - | |
| 36 | - if ([Tools isArray:sortArray]) { | |
| 37 | - | |
| 38 | - [self addSubview:self.sortBtnBackground]; | |
| 39 | - CGFloat width = 13; | |
| 40 | - for (int i = 0; i < sortArray.count; i++) { | |
| 41 | - NSDictionary *dic = [sortArray safetyObjectAtIndex:i]; | |
| 42 | - NSString *name = dic[@"name"]; | |
| 43 | - CGRect rect = [name boundingRectWithSize:CGSizeMake(0, 0) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:15]} context:nil]; | |
| 44 | - UIButton *sortBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 45 | - sortBtn.tag = 100+i; | |
| 46 | - sortBtn.frame = CGRectMake(width, 0, rect.size.width, 33); | |
| 47 | - sortBtn.titleLabel.font = [UIFont systemFontOfSize:14]; | |
| 48 | - [sortBtn setTitle:name forState:UIControlStateNormal]; | |
| 49 | - [sortBtn setTitleColor:[UIColor grayColorCNLive] forState:UIControlStateNormal]; | |
| 50 | - [sortBtn addTarget:self action:@selector(sortBtnAction:) forControlEvents:UIControlEventTouchUpInside]; | |
| 51 | - [self.sortBtnBackground addSubview:sortBtn]; | |
| 52 | - width += rect.size.width + 13; | |
| 53 | - } | |
| 54 | - self.sortBtnBackground.width = width; | |
| 55 | - self.sortBtnBackground.x = KScreenWidth-self.sortBtnBackground.width-10; | |
| 56 | - self.searchBtn.width = KScreenWidth-20-7-self.sortBtnBackground.width; | |
| 57 | - [self addSubview:self.sortBtnBackground]; | |
| 58 | - | |
| 59 | - } else { | |
| 60 | - | |
| 61 | - self.searchBtn.width = KScreenWidth-20; | |
| 62 | - [self.sortBtnBackground removeFromSuperview]; | |
| 63 | - } | |
| 64 | -} | |
| 65 | - | |
| 66 | -#pragma mark - ACtion !!!!!!!!!!!!!!!!!!!!!!! | |
| 67 | -- (void)searchBtnAction { | |
| 68 | - | |
| 69 | - NSLog(@"搜索!!!!!!"); | |
| 70 | -} | |
| 71 | - | |
| 72 | -- (void)sortBtnAction:(UIButton *)button | |
| 73 | -{ | |
| 74 | - NSLog(@"分类按钮!!!!!"); | |
| 75 | - | |
| 76 | - NSDictionary *dic = [_sortArray safetyObjectAtIndex:button.tag-100]; | |
| 77 | -// SortViewController *sort=[[SortViewController alloc] init]; | |
| 78 | -// sort.searchBtn = YES; | |
| 79 | -// sort.title = _model.title; | |
| 80 | -// sort.cid = self.model.cid; | |
| 81 | -// if ([Tools isDictionary:dic]) { | |
| 82 | -// sort.sortId = dic[@"id"]; | |
| 83 | -// sort.sortType = dic[@"type"]; | |
| 84 | -// } | |
| 85 | -// [self.viewController.navigationController pushViewController:sort animated:YES]; | |
| 86 | -} | |
| 87 | - | |
| 88 | -#pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 89 | -- (UIButton *)searchBtn { | |
| 90 | - if (!_searchBtn) { | |
| 91 | - _searchBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 92 | - _searchBtn.frame = CGRectMake(10, 6, KScreenWidth-20, 33); | |
| 93 | - [_searchBtn setImage:[UIImage imageNamed:@"search"] forState:UIControlStateNormal]; | |
| 94 | - [_searchBtn setTitle:@"搜索" forState:UIControlStateNormal]; | |
| 95 | - [_searchBtn setTitleColor:[UIColor grayColor] forState:UIControlStateNormal]; | |
| 96 | - [_searchBtn setImageEdgeInsets:UIEdgeInsetsMake(0, -5, 0, 0)]; | |
| 97 | - _searchBtn.titleLabel.font = [UIFont systemFontOfSize:14]; | |
| 98 | - _searchBtn.backgroundColor = [UIColor whiteColor]; | |
| 99 | - _searchBtn.layer.cornerRadius = 16; | |
| 100 | - _searchBtn.layer.masksToBounds = YES; | |
| 101 | - [_searchBtn addTarget:self action:@selector(searchBtnAction) forControlEvents:UIControlEventTouchUpInside]; | |
| 102 | - } | |
| 103 | - return _searchBtn; | |
| 104 | -} | |
| 105 | - | |
| 106 | -- (UIView *)sortBtnBackground | |
| 107 | -{ | |
| 108 | - if (!_sortBtnBackground) { | |
| 109 | - _sortBtnBackground = [[UIView alloc] initWithFrame:CGRectMake(0, 6, 0, 33)]; | |
| 110 | - _sortBtnBackground.backgroundColor = [UIColor whiteColor]; | |
| 111 | - _sortBtnBackground.layer.cornerRadius = 16; | |
| 112 | - _sortBtnBackground.layer.masksToBounds = YES; | |
| 113 | - } | |
| 114 | - return _sortBtnBackground; | |
| 115 | -} | |
| 116 | - | |
| 117 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCBannerAndMarqueeModel.h deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCBannerAndMarqueeModel.h | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/20. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import "BaseModel.h" | |
| 10 | - | |
| 11 | -@interface LVCBannerAndMarqueeModel : BaseModel // channels 中 programs 也用这个model | |
| 12 | - | |
| 13 | -@property (nonatomic, copy)NSString *url; | |
| 14 | -@property (nonatomic, copy)NSString *img; | |
| 15 | -@property (nonatomic, copy)NSString *mediaId; | |
| 16 | -@property (nonatomic, copy)NSString *title; | |
| 17 | -@property (nonatomic, copy)NSString *vipFlag; | |
| 18 | -@property (nonatomic, copy)NSString *docID; | |
| 19 | -@property (nonatomic, copy)NSString *picType; //列表显示图片类型 H 横图 V 竖图 M 明星人气榜 | |
| 20 | -@property (nonatomic, copy)NSString *subTitle; | |
| 21 | -@property (nonatomic, copy)NSString *type; //节目类型 live:直播,program:普通视频,web:网页,series:连续剧,album:专辑 | |
| 22 | - | |
| 23 | -//@property (nonatomic, copy)NSString *playMediaId; | |
| 24 | -//@property (nonatomic, copy)NSString *desc; | |
| 25 | -//@property (nonatomic, copy)NSString *itemId; | |
| 26 | -//@property (nonatomic, copy)NSString *activityId; | |
| 27 | - | |
| 28 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCBannerAndMarqueeModel.m deleted
100644 → 0
LiveVideoCloud/Classes/Sections/HomePageSections/LVCBigHorizontalCollectionViewCell.h deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCBigHorizontalCollectionViewCell.h | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/23. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import <UIKit/UIKit.h> | |
| 10 | - | |
| 11 | -@interface LVCBigHorizontalCollectionViewCell : UICollectionViewCell | |
| 12 | - | |
| 13 | -@property (nonatomic, strong)ProgramModel *model; | |
| 14 | -@property (nonatomic, strong)ProgramModel *liveModel; | |
| 15 | - | |
| 16 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCBigHorizontalCollectionViewCell.m deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCBigHorizontalCollectionViewCell.m | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/23. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import "LVCBigHorizontalCollectionViewCell.h" | |
| 10 | - | |
| 11 | -@interface LVCBigHorizontalCollectionViewCell() { | |
| 12 | - | |
| 13 | - CGFloat _x; | |
| 14 | -} | |
| 15 | - | |
| 16 | -@property (nonatomic, strong) UIImageView *imageView; | |
| 17 | -@property (nonatomic, strong) UILabel *title; | |
| 18 | -@property (nonatomic, strong) UILabel *detail; | |
| 19 | -@property (nonatomic, strong) UIImageView *typeImage; //节目类型角标 | |
| 20 | - | |
| 21 | -@end | |
| 22 | - | |
| 23 | -@implementation LVCBigHorizontalCollectionViewCell | |
| 24 | - | |
| 25 | -- (instancetype)initWithFrame:(CGRect)frame | |
| 26 | -{ | |
| 27 | - self = [super initWithFrame:frame]; | |
| 28 | - if (self) { | |
| 29 | - if ([UIDevice currentDevice].systemVersion.floatValue >= 10) { | |
| 30 | - _x = 0; | |
| 31 | - } else { | |
| 32 | - _x = 10; | |
| 33 | - } | |
| 34 | - [self.contentView addSubview:self.imageView]; | |
| 35 | - [self.contentView addSubview:self.title]; | |
| 36 | - [self.contentView addSubview:self.detail]; | |
| 37 | - [self.imageView addSubview:self.typeImage]; | |
| 38 | - } | |
| 39 | - return self; | |
| 40 | -} | |
| 41 | - | |
| 42 | -- (void)setModel:(ProgramModel *)model { | |
| 43 | - | |
| 44 | - if (_model != model) { | |
| 45 | - _model = model; | |
| 46 | - } | |
| 47 | -} | |
| 48 | - | |
| 49 | -- (void)setLiveModel:(ProgramModel *)liveModel { | |
| 50 | - | |
| 51 | - if (_liveModel != liveModel) { | |
| 52 | - _liveModel = liveModel; | |
| 53 | - } | |
| 54 | -} | |
| 55 | - | |
| 56 | -#pragma mark - GetMethod !!!!!!!!!!!!!!!!!! | |
| 57 | -- (UIImageView *)imageView | |
| 58 | -{ | |
| 59 | - if (!_imageView) { | |
| 60 | - _imageView = [[UIImageView alloc] initWithFrame:CGRectMake(_x, 0, self.contentView.width-20, (self.contentView.width-20)/2)]; | |
| 61 | - _imageView.backgroundColor = [UIColor grayColor]; | |
| 62 | - } | |
| 63 | - return _imageView; | |
| 64 | -} | |
| 65 | - | |
| 66 | -- (UILabel *)title | |
| 67 | -{ | |
| 68 | - if (!_title) { | |
| 69 | - _title = [[UILabel alloc] initWithFrame:CGRectMake(_x, self.imageView.bottom+7, self.contentView.width-10, 12)]; | |
| 70 | - _title.font = [UIFont systemFontOfSize:14]; | |
| 71 | - _title.textColor = [UIColor blackColorCNLive]; | |
| 72 | - } | |
| 73 | - return _title; | |
| 74 | -} | |
| 75 | - | |
| 76 | -- (UILabel *)detail | |
| 77 | -{ | |
| 78 | - if (!_detail) { | |
| 79 | - _detail = [[UILabel alloc] initWithFrame:CGRectMake(_x, self.title.bottom+7, self.contentView.width-10, 11)]; | |
| 80 | - _detail.font = [UIFont systemFontOfSize:12]; | |
| 81 | - _detail.textColor = [UIColor grayColorCNLive]; | |
| 82 | - } | |
| 83 | - return _detail; | |
| 84 | -} | |
| 85 | - | |
| 86 | -- (UIImageView *)typeImage | |
| 87 | -{ | |
| 88 | - if (!_typeImage) { | |
| 89 | - _typeImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 39, 39)]; | |
| 90 | - } | |
| 91 | - return _typeImage; | |
| 92 | -} | |
| 93 | - | |
| 94 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCBqWqXgModel.h deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCBqWqXgModel.h | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/20. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import "BaseModel.h" | |
| 10 | - | |
| 11 | -@interface LVCBqWqXgModel : BaseModel | |
| 12 | - | |
| 13 | -// 本期看点、往期回看、相关视频、相关明星 公共属性 | |
| 14 | -@property (nonatomic, copy)NSString *title; | |
| 15 | -@property (nonatomic, copy)NSString *img; | |
| 16 | -// 本期看点、往期回看、相关视频 公共属性 | |
| 17 | -@property (nonatomic, copy)NSString *mediaId; | |
| 18 | -@property (nonatomic, copy)NSString *docSubTitle; | |
| 19 | -// 相关视频、相关明星 公共属性 | |
| 20 | -@property (nonatomic, copy)NSString *docID; | |
| 21 | -@property (nonatomic, copy)NSString *type; | |
| 22 | -// 相关视频 | |
| 23 | -@property (nonatomic, copy)NSString *MAM_PosterUrl; | |
| 24 | -@property (nonatomic, copy)NSString *MAM_SmallPosterUrl; | |
| 25 | -@property (nonatomic, copy)NSString *docDescription; | |
| 26 | -@property (nonatomic, copy)NSString *vipFlag; | |
| 27 | -@property (nonatomic, copy)NSString *MAM_BigPostUrl; | |
| 28 | -// 相关明星 | |
| 29 | -@property (nonatomic, copy)NSString *support; | |
| 30 | -@property (nonatomic, copy)NSString *voteRule; | |
| 31 | - | |
| 32 | -// 用于判断播放底页里本期看点、往期回看、相关视频中,播放的视频是否高亮显示 | |
| 33 | -@property (nonatomic, assign)BOOL isPlaying; | |
| 34 | -@property (nonatomic, copy)NSString *module; | |
| 35 | - | |
| 36 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCBqWqXgModel.m deleted
100644 → 0
LiveVideoCloud/Classes/Sections/HomePageSections/LVCChannelDetailModel.h deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCChannelDetailModel.h | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/20. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import "BaseModel.h" | |
| 10 | - | |
| 11 | -@interface LVCChannelDetailModel : BaseModel | |
| 12 | - | |
| 13 | -@property (nonatomic, strong)NSString *cid; | |
| 14 | -@property (nonatomic, strong)NSString *title; | |
| 15 | -@property (nonatomic, strong)NSString *channelType; | |
| 16 | -@property (nonatomic, strong)NSArray *programs; | |
| 17 | -@property (nonatomic, strong)NSString *categoryType; | |
| 18 | - | |
| 19 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCChannelDetailModel.m deleted
100644 → 0
LiveVideoCloud/Classes/Sections/HomePageSections/LVCChannelPagingView.h deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCChannelPagingView.h | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/19. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import <UIKit/UIKit.h> | |
| 10 | - | |
| 11 | -@interface LVCChannelPagingView : UIView | |
| 12 | - | |
| 13 | -@property (nonatomic, strong) LVCHomePageListModel *model; | |
| 14 | - | |
| 15 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCChannelPagingView.m deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCChannelPagingView.m | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/19. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import "LVCChannelPagingView.h" | |
| 10 | -#import "LVCMainHeaderCollectionReusableView.h" | |
| 11 | -#import "LVCSectionHeaderCollectionReusableView.h" | |
| 12 | -#import "LVCMainHorizontalCollectionViewCell.h" | |
| 13 | -#import "JBSearchView.h" | |
| 14 | - | |
| 15 | -static NSString *mainHeaderId = @"mainHeader"; | |
| 16 | -static NSString *SectionHeaderId = @"SectionHeader"; | |
| 17 | -static NSString *MainHorizontalCellId = @"MainHorizontalCell"; | |
| 18 | - | |
| 19 | -@interface LVCChannelPagingView() <UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout> { | |
| 20 | - | |
| 21 | - BOOL _hasSearchBox; //是否显示搜索框 | |
| 22 | - NSArray *_searchColumnArray; | |
| 23 | - NSMutableArray *_banners; | |
| 24 | - NSMutableArray *_marquees; | |
| 25 | - NSMutableArray *_channels; | |
| 26 | - LVCMainHeaderCollectionReusableView *_mainHeader; | |
| 27 | - CGFloat _collectionOffsetY; | |
| 28 | -} | |
| 29 | - | |
| 30 | -@property (nonatomic, strong)UICollectionView *collectionView; | |
| 31 | -//@property (nonatomic, strong)UIView *searchBackground; | |
| 32 | -@property (nonatomic, strong)JBSearchView *searchView; | |
| 33 | -//@property (nonatomic, strong)UIButton *searchBtn; | |
| 34 | -@property (nonatomic, strong)UIView *searchLine; | |
| 35 | -@property (nonatomic, strong)UILabel *searchHotLab; | |
| 36 | - | |
| 37 | -@end | |
| 38 | - | |
| 39 | -@implementation LVCChannelPagingView | |
| 40 | - | |
| 41 | -- (instancetype)initWithFrame:(CGRect)frame | |
| 42 | -{ | |
| 43 | - self = [super initWithFrame:frame]; | |
| 44 | - if (self) { | |
| 45 | - [self addSubview:self.collectionView]; | |
| 46 | - _banners = [[NSMutableArray alloc] init]; | |
| 47 | - _marquees = [[NSMutableArray alloc] init]; | |
| 48 | - _channels = [[NSMutableArray alloc] init]; | |
| 49 | - } | |
| 50 | - return self; | |
| 51 | -} | |
| 52 | - | |
| 53 | -- (void)setModel:(LVCHomePageListModel *)model { | |
| 54 | - | |
| 55 | - if (_model != model) { | |
| 56 | - _model = model; | |
| 57 | - } | |
| 58 | - [self requestAppindex]; | |
| 59 | -} | |
| 60 | - | |
| 61 | -#pragma mark - 请求数据 | |
| 62 | -- (void)requestAppindex { | |
| 63 | - | |
| 64 | - NSString *uid; | |
| 65 | - if ([UserTools isLogin]) { | |
| 66 | - uid = [UserInformationModel manager].uid; | |
| 67 | - } else { | |
| 68 | - uid = [NSString stringWithFormat:@"%u", arc4random()%3]; | |
| 69 | - } | |
| 70 | - NSString *tm = [NSString stringWithFormat:@"%u_%@", arc4random()%10, uid]; | |
| 71 | - | |
| 72 | - NSDictionary *parameter = @{@"cid": self.model.cid ? self.model.cid : @"", | |
| 73 | - @"tm": tm}; | |
| 74 | - | |
| 75 | - NSString *url; | |
| 76 | - if ([self.model.cid isEqualToString:@"tj/"]) { | |
| 77 | - url = Appindexpage; | |
| 78 | - } else { | |
| 79 | - url = Appindex; | |
| 80 | - } | |
| 81 | - | |
| 82 | - [[AFHTTPRequestOperationManager manager] GET:url parameters:[self addParameters:parameter] success:^(AFHTTPRequestOperation *operation, id responseObject) { | |
| 83 | - | |
| 84 | - responseObject = [responseObject validatedDictionary]; | |
| 85 | - | |
| 86 | - _hasSearchBox = [responseObject[@"searchCategory"] isEqualToString:@"false"] ? NO : YES; | |
| 87 | - | |
| 88 | - self.searchHotLab.text = responseObject[@"placeHolder"]; | |
| 89 | - | |
| 90 | - //是否显示搜索旁边的分类 | |
| 91 | - _searchColumnArray = responseObject[@"searchColumn"]; | |
| 92 | - | |
| 93 | - if ([Tools isArray:_searchColumnArray]) { | |
| 94 | - | |
| 95 | - // 搜索旁的分类 | |
| 96 | - } else { | |
| 97 | - | |
| 98 | -// self.searchBtn.width = KScreenWidth - 20; | |
| 99 | - } | |
| 100 | - | |
| 101 | - if (responseObject[@"banner"] && [responseObject[@"banner"] isKindOfClass:[NSArray class]]) { | |
| 102 | - for (NSDictionary *dic in responseObject[@"banner"]) { | |
| 103 | - LVCBannerAndMarqueeModel *model = [LVCBannerAndMarqueeModel modelWithDic:dic]; | |
| 104 | - if (model) { | |
| 105 | - [_banners addObject:model]; | |
| 106 | - } | |
| 107 | - } | |
| 108 | - } | |
| 109 | - if (responseObject[@"marquee"] && [responseObject[@"marquee"] isKindOfClass:[NSArray class]]) { | |
| 110 | - for (NSDictionary *dic in responseObject[@"marquee"]) { | |
| 111 | - LVCBannerAndMarqueeModel *model = [LVCBannerAndMarqueeModel modelWithDic:dic]; | |
| 112 | - if (model) { | |
| 113 | - [_marquees addObject:model]; | |
| 114 | - } | |
| 115 | - } | |
| 116 | - } | |
| 117 | - if (responseObject[@"channels"] && [responseObject[@"channels"] isKindOfClass:[NSArray class]]) { | |
| 118 | - | |
| 119 | - for (NSDictionary *dic in responseObject[@"channels"]) { | |
| 120 | - LVCChannelDetailModel *model = [LVCChannelDetailModel modelWithDic:dic]; | |
| 121 | - NSMutableArray *programs = [[NSMutableArray alloc] init]; | |
| 122 | - | |
| 123 | - if (dic[@"programs"] && [dic[@"programs"] isKindOfClass:[NSArray class]]) { | |
| 124 | - for (NSDictionary *program in dic[@"programs"]) { | |
| 125 | - id programModel; | |
| 126 | - if ([model.channelType isEqualToString:@"M"]) { | |
| 127 | - programModel = [LVCBqWqXgModel modelWithDic:program]; | |
| 128 | - } else { | |
| 129 | - programModel = [LVCBannerAndMarqueeModel modelWithDic:program]; | |
| 130 | - } | |
| 131 | - if (programModel) { | |
| 132 | - [programs addObject:programModel]; | |
| 133 | - } | |
| 134 | - } | |
| 135 | - } | |
| 136 | - model.programs = [[NSArray alloc] initWithArray:programs]; | |
| 137 | - if (model && [Tools isArray:model.programs]) { | |
| 138 | - [_channels addObject:model]; | |
| 139 | - } | |
| 140 | - } | |
| 141 | - } | |
| 142 | - [self.collectionView reloadData]; | |
| 143 | - | |
| 144 | - } failure:^(AFHTTPRequestOperation *operation, NSError *error) { | |
| 145 | - | |
| 146 | - | |
| 147 | - }]; | |
| 148 | -} | |
| 149 | - | |
| 150 | -#pragma mark - UICollectionViewDelegate !!!!!!!!!!!!!!!!!!!!!!!!! | |
| 151 | -- (void)scrollViewDidScroll:(UIScrollView *)scrollView { | |
| 152 | - | |
| 153 | - if (_hasSearchBox) { | |
| 154 | - | |
| 155 | - if (scrollView == self.collectionView) { | |
| 156 | - | |
| 157 | - if (scrollView.contentOffset.y <= 0) { | |
| 158 | - | |
| 159 | - self.searchView.y = 0; | |
| 160 | - if (_channels.count > 0) { | |
| 161 | - [_mainHeader addSubview:self.searchView]; | |
| 162 | - } else { | |
| 163 | - [self.collectionView addSubview:self.searchView]; | |
| 164 | - } | |
| 165 | - _collectionOffsetY = scrollView.contentOffset.y; | |
| 166 | - } else { | |
| 167 | - | |
| 168 | - if (scrollView.contentOffset.y >= 45) { | |
| 169 | - if (self.searchView.superview != self) { | |
| 170 | - self.searchView.y = -45; | |
| 171 | - [self.searchView addSubview:self.searchLine]; | |
| 172 | - [self addSubview:self.searchView]; | |
| 173 | - } | |
| 174 | - } | |
| 175 | - if (scrollView.contentOffset.y-_collectionOffsetY > 0) { | |
| 176 | - _collectionOffsetY = scrollView.contentOffset.y; | |
| 177 | - [UIView animateWithDuration:0.2 animations:^{ | |
| 178 | - self.searchView.y = -45; | |
| 179 | - }]; | |
| 180 | - } else { | |
| 181 | - _collectionOffsetY = scrollView.contentOffset.y; | |
| 182 | - [UIView animateWithDuration:0.2 animations:^{ | |
| 183 | - self.searchView.y = 0; | |
| 184 | - }]; | |
| 185 | - } | |
| 186 | - } | |
| 187 | - } | |
| 188 | - } | |
| 189 | -} | |
| 190 | - | |
| 191 | -- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { | |
| 192 | - | |
| 193 | - | |
| 194 | -} | |
| 195 | - | |
| 196 | -#pragma mark - UICollectionViewDataSource !!!!!!!!!!!!!!!!!!!!!!!!! | |
| 197 | -- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { | |
| 198 | - | |
| 199 | - return 4; | |
| 200 | -} | |
| 201 | - | |
| 202 | -- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { | |
| 203 | - | |
| 204 | - return 6; | |
| 205 | -} | |
| 206 | - | |
| 207 | -- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { | |
| 208 | - | |
| 209 | - LVCMainHorizontalCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:MainHorizontalCellId forIndexPath:indexPath]; | |
| 210 | - cell.backgroundColor = [UIColor blueColor]; | |
| 211 | - return cell; | |
| 212 | -} | |
| 213 | - | |
| 214 | -- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath { | |
| 215 | - | |
| 216 | - if (indexPath.section == 0) { | |
| 217 | - _mainHeader = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:mainHeaderId forIndexPath:indexPath]; | |
| 218 | - _mainHeader.backgroundColor = [UIColor redColor]; | |
| 219 | - if (!self.searchView.superview) { | |
| 220 | - [_mainHeader addSubview:self.searchView]; | |
| 221 | - } | |
| 222 | - _mainHeader.banners = _banners; | |
| 223 | - return _mainHeader; | |
| 224 | - } else { | |
| 225 | - LVCSectionHeaderCollectionReusableView *view = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:SectionHeaderId forIndexPath:indexPath]; | |
| 226 | - view.backgroundColor = [UIColor yellowColor]; | |
| 227 | - | |
| 228 | - LVCChannelDetailModel *model = [[LVCChannelDetailModel alloc] init]; | |
| 229 | - model.title = [NSString stringWithFormat:@"这是第%ld组",(long)indexPath.section]; | |
| 230 | - view.model = model; | |
| 231 | - | |
| 232 | - return view; | |
| 233 | - } | |
| 234 | - return nil; | |
| 235 | -} | |
| 236 | - | |
| 237 | -#pragma mark - UICollectionViewDelegateFlowLayout !!!!!!!!!!!!!!!!!!!!!!!!! | |
| 238 | -- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { | |
| 239 | - | |
| 240 | - return CGSizeMake(KScreenWidth*0.4, 80); | |
| 241 | -} | |
| 242 | - | |
| 243 | -- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section { | |
| 244 | - | |
| 245 | - if (section == 0) { | |
| 246 | - return UIEdgeInsetsMake(0, 0, 0, 0); | |
| 247 | - } | |
| 248 | - return UIEdgeInsetsMake(5, 10, 5, 4); | |
| 249 | -} | |
| 250 | - | |
| 251 | -- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section { | |
| 252 | - | |
| 253 | - if (section == 0) { | |
| 254 | - return CGSizeMake(KScreenWidth, 300); | |
| 255 | - } else { | |
| 256 | - return CGSizeMake(KScreenWidth, 47); | |
| 257 | - } | |
| 258 | -} | |
| 259 | - | |
| 260 | -#pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 261 | -- (UICollectionView *)collectionView { | |
| 262 | - | |
| 263 | - if (!_collectionView) { | |
| 264 | - | |
| 265 | - UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; | |
| 266 | - layout.minimumLineSpacing = 10; | |
| 267 | - layout.minimumInteritemSpacing = 0; | |
| 268 | - | |
| 269 | - _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight - 64 - 49) collectionViewLayout:layout]; | |
| 270 | - _collectionView.delegate = self; | |
| 271 | - _collectionView.dataSource = self; | |
| 272 | - _collectionView.backgroundColor = [UIColor whiteColor]; | |
| 273 | - [_collectionView registerClass:[LVCMainHeaderCollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:mainHeaderId]; | |
| 274 | - | |
| 275 | - [_collectionView registerClass:[LVCSectionHeaderCollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:SectionHeaderId]; | |
| 276 | - | |
| 277 | - [_collectionView registerClass:[LVCMainHorizontalCollectionViewCell class] forCellWithReuseIdentifier:MainHorizontalCellId]; | |
| 278 | - } | |
| 279 | - return _collectionView; | |
| 280 | -} | |
| 281 | - | |
| 282 | -- (JBSearchView *)searchView { | |
| 283 | - | |
| 284 | - if (!_searchView) { | |
| 285 | - _searchView = [[JBSearchView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 45)]; | |
| 286 | - _searchView.backgroundColor = [UIColor backgroundColor]; | |
| 287 | - | |
| 288 | - NSMutableArray *arrayM = [[NSMutableArray alloc] init]; | |
| 289 | - NSDictionary *dict1 = @{@"name":@"liveShow"}; | |
| 290 | - [arrayM addObject:dict1]; | |
| 291 | - NSDictionary *dict2 = @{@"name":@"全部"}; | |
| 292 | - [arrayM addObject:dict2]; | |
| 293 | - _searchView.sortArray = arrayM; | |
| 294 | - | |
| 295 | - } | |
| 296 | - return _searchView; | |
| 297 | -} | |
| 298 | - | |
| 299 | -- (UIView *)searchLine { | |
| 300 | - | |
| 301 | - if (!_searchLine) { | |
| 302 | - _searchLine = [[UIView alloc] initWithFrame:CGRectMake(0, 44.5, KScreenWidth, 0.5)]; | |
| 303 | - _searchLine.backgroundColor = [UIColor navigationLineColor]; | |
| 304 | - } | |
| 305 | - return _searchLine; | |
| 306 | -} | |
| 307 | - | |
| 308 | -//- (UILabel *)searchHotLab { | |
| 309 | -// | |
| 310 | -// if (!_searchHotLab) { | |
| 311 | -// _searchHotLab = [[UILabel alloc] initWithFrame:CGRectMake(35, 0, self.searchBtn.width-45, self.searchBtn.height)]; | |
| 312 | -// _searchHotLab.textColor = [UIColor grayColorCNLive]; | |
| 313 | -// _searchHotLab.font = [UIFont systemFontOfSize:14]; | |
| 314 | -// } | |
| 315 | -// return _searchHotLab; | |
| 316 | -//} | |
| 317 | - | |
| 318 | -// ------------------------------------------分割线--------------------------------------------------- | |
| 319 | -- (NSDictionary *)addParameters:(NSDictionary *)dict { | |
| 320 | - | |
| 321 | - if (![dict isKindOfClass:[NSDictionary class]]) { | |
| 322 | - return dict; | |
| 323 | - } | |
| 324 | - if (!dict) { | |
| 325 | - return @{@"appid": JBAppId, @"plat": @"i", @"version": JBAppVersion}; | |
| 326 | - } else { | |
| 327 | - NSMutableDictionary *dic = [[NSMutableDictionary alloc] initWithDictionary:dict]; | |
| 328 | - [dic addEntriesFromDictionary:@{@"appid": JBAppId, @"plat": @"i", @"version": JBAppVersion}]; | |
| 329 | - return [[NSDictionary alloc] initWithDictionary:dic]; | |
| 330 | - } | |
| 331 | -} | |
| 332 | - | |
| 333 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCHomePageListModel.h deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCHomePageListModel.h | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/12. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import "BaseModel.h" | |
| 10 | - | |
| 11 | -@interface LVCHomePageListModel : NSObject | |
| 12 | - | |
| 13 | -@property (nonatomic, copy) NSString *cid; | |
| 14 | -@property (nonatomic, copy) NSString *img; | |
| 15 | -@property (nonatomic, copy) NSString *title; | |
| 16 | -@property (nonatomic, copy) NSString *type; | |
| 17 | -@property (nonatomic, copy) NSString *url; | |
| 18 | - | |
| 19 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCHomePageListModel.m deleted
100644 → 0
LiveVideoCloud/Classes/Sections/HomePageSections/LVCHomePageViewController.m deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCHomePageViewController.m | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/9. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import "LVCHomePageViewController.h" | |
| 10 | -#import "LVCChannelPagingView.h" | |
| 11 | - | |
| 12 | -@interface LVCHomePageViewController ()<V8HorizontalPickerViewDataSource, V8HorizontalPickerViewDelegate,MHPagingScrollViewDelegate,UIScrollViewDelegate> { | |
| 13 | - | |
| 14 | - NSMutableArray <LVCHomePageListModel *> *_titleArr; | |
| 15 | - CGFloat _titleSpace; | |
| 16 | -} | |
| 17 | - | |
| 18 | -@property (nonatomic, strong)V8HorizontalPickerView *titleView; | |
| 19 | -@property (nonatomic, strong)MHPagingScrollView *pageView; | |
| 20 | -@property (nonatomic, strong)UIButton *reloadBtn; | |
| 21 | -@property (nonatomic, strong)UILabel *reloadLab; | |
| 22 | -@end | |
| 23 | - | |
| 24 | -@implementation LVCHomePageViewController | |
| 25 | - | |
| 26 | -- (void)viewWillAppear:(BOOL)animated | |
| 27 | -{ | |
| 28 | - [super viewWillAppear:animated]; | |
| 29 | - [self pagingScrollView:self.pageView pageForIndex:self.pageView.indexOfSelectedPage]; | |
| 30 | -} | |
| 31 | - | |
| 32 | -- (void)viewDidLoad { | |
| 33 | - [super viewDidLoad]; | |
| 34 | - | |
| 35 | -// [[NSNotificationCenter defaultCenter] addObserver:self | |
| 36 | -// selector:@selector(appBecomeActive) | |
| 37 | -// name:UIApplicationDidBecomeActiveNotification | |
| 38 | -// object:nil]; | |
| 39 | - | |
| 40 | - _titleArr = [[NSMutableArray alloc] init]; | |
| 41 | - | |
| 42 | - [self getChannelList]; | |
| 43 | - | |
| 44 | - self.navigationItem.titleView = self.titleView; | |
| 45 | - [self.view addSubview:self.pageView]; | |
| 46 | - [_pageView reloadPages]; | |
| 47 | - [_titleView reloadData]; | |
| 48 | -} | |
| 49 | - | |
| 50 | -#pragma mark - 请求频道列表 | |
| 51 | -- (void)getChannelList { | |
| 52 | - | |
| 53 | - NSDictionary *para = @{@"appid": @"hdtv", | |
| 54 | - @"plat": @"i", | |
| 55 | - @"version": @"5.5.2.052420"}; //[NSDictionary CommonParameters] | |
| 56 | - | |
| 57 | - MBProgressHUD *waitHUD = [Tools showActivityHudInView:self.view withString:@"加载中..."]; | |
| 58 | - [[AFHTTPRequestOperationManager manager] GET:AllChannellist parameters:para success:^(AFHTTPRequestOperation *operation, id responseObject) { | |
| 59 | - | |
| 60 | - [waitHUD hide:NO]; | |
| 61 | - [self.reloadBtn removeFromSuperview]; | |
| 62 | - responseObject = [responseObject validatedDictionary]; | |
| 63 | - | |
| 64 | - if ([[NSString stringWithFormat:@"%@",responseObject[@"errorCode"]] isEqualToString:@"0"]) { | |
| 65 | - | |
| 66 | - if ([Tools isArray:responseObject[@"channels"]]) { | |
| 67 | - | |
| 68 | - for (NSDictionary *dict in responseObject[@"channels"]) { | |
| 69 | - | |
| 70 | - LVCHomePageListModel *model = [[LVCHomePageListModel alloc] init]; | |
| 71 | - [model setValuesForKeysWithDictionary:dict]; | |
| 72 | - [_titleArr addObject:model]; | |
| 73 | - } | |
| 74 | - | |
| 75 | - CGFloat width = 0; | |
| 76 | - for (LVCHomePageListModel *model in _titleArr) { | |
| 77 | - CGSize size = [model.title sizeWithAttributes:@{NSFontAttributeName:self.titleView.elementFont}]; | |
| 78 | - width += size.width+5; | |
| 79 | - } | |
| 80 | - if (width < self.titleView.width) { | |
| 81 | - _titleSpace = (self.titleView.width-width)/_titleArr.count; | |
| 82 | - } else { | |
| 83 | - _titleSpace = 0; | |
| 84 | - } | |
| 85 | - | |
| 86 | - [_titleView reloadData]; | |
| 87 | - [_pageView reloadPages]; | |
| 88 | - | |
| 89 | - // /*-----------------列表数据处理----------------*/ | |
| 90 | - // [CNHDTVStatManager PVStatForPage:@"tj/" userID:[UserInformationModel manager].uid]; | |
| 91 | - // NSMutableArray *normalArray = [[NSMutableArray alloc] initWithArray:[[NSUserDefaults standardUserDefaults] objectForKey:NormalChannelArray]]; | |
| 92 | - // NSMutableArray *otherArray = [[NSMutableArray alloc] initWithArray:[[NSUserDefaults standardUserDefaults] objectForKey:OtherChannelArray]]; | |
| 93 | - // | |
| 94 | - // NSArray *channelsArray = responseObject[@"channels"]; | |
| 95 | - | |
| 96 | - | |
| 97 | -// /*-----------------根据频道列表网络数据的变化来对本地数据进行处理----------------*/ | |
| 98 | - // //将新增的频道添加到常用频道 | |
| 99 | - // for (NSDictionary *dic in channelsArray) { | |
| 100 | - // if (![normalArray containsObject:dic]) { | |
| 101 | - // [normalArray addObject:dic]; | |
| 102 | - // } | |
| 103 | - // } | |
| 104 | - // | |
| 105 | - // //从常用频道和其他频道中删除网络数据中没有的数据 | |
| 106 | - // NSMutableArray *tempNormalArray = [normalArray mutableCopy]; | |
| 107 | - // for (NSDictionary *dic in tempNormalArray) { | |
| 108 | - // if (![channelsArray containsObject:dic]) { | |
| 109 | - // [normalArray removeObject:dic]; | |
| 110 | - // } | |
| 111 | - // } | |
| 112 | - // | |
| 113 | - // NSMutableArray *tempOtherArray = [otherArray mutableCopy]; | |
| 114 | - // for (NSDictionary *dic in tempOtherArray) { | |
| 115 | - // if (![channelsArray containsObject:dic]) { | |
| 116 | - // [otherArray removeObject:dic]; | |
| 117 | - // } | |
| 118 | - // } | |
| 119 | - // | |
| 120 | - // [[NSUserDefaults standardUserDefaults] setObject:normalArray forKey:NormalChannelArray]; | |
| 121 | - // [[NSUserDefaults standardUserDefaults] setObject:otherArray forKey:OtherChannelArray]; | |
| 122 | - // [[NSUserDefaults standardUserDefaults] synchronize]; | |
| 123 | - | |
| 124 | - } | |
| 125 | - else { | |
| 126 | - | |
| 127 | - [Tools showHUDInView:self.view withString:@"获取数据失败" autoHide:YES]; | |
| 128 | - } | |
| 129 | - | |
| 130 | - | |
| 131 | - } else { | |
| 132 | - | |
| 133 | - [Tools showHUDInView:self.view withString:@"获取数据失败" autoHide:YES]; | |
| 134 | - } | |
| 135 | - | |
| 136 | - self.reloadLab.text = @"暂无数据"; | |
| 137 | - | |
| 138 | - } failure:^(AFHTTPRequestOperation *operation, NSError *error) { | |
| 139 | - | |
| 140 | - [waitHUD hide:NO]; | |
| 141 | - [self.reloadBtn removeFromSuperview]; | |
| 142 | - self.reloadLab.text = @"您好像掉线了"; | |
| 143 | - }]; | |
| 144 | -} | |
| 145 | - | |
| 146 | -#pragma mark - V8HorizontalPickerViewDataSource | |
| 147 | - | |
| 148 | -- (NSInteger)numberOfElementsInHorizontalPickerView:(V8HorizontalPickerView *)picker | |
| 149 | -{ | |
| 150 | - return _titleArr.count; | |
| 151 | -} | |
| 152 | - | |
| 153 | -#pragma mark - V8HorizontalPickerViewDelegate | |
| 154 | - | |
| 155 | -- (NSString *)horizontalPickerView:(V8HorizontalPickerView *)picker titleForElementAtIndex:(NSInteger)index | |
| 156 | -{ | |
| 157 | - return _titleArr[index].title; | |
| 158 | -} | |
| 159 | - | |
| 160 | -- (NSInteger)horizontalPickerView:(V8HorizontalPickerView *)picker widthForElementAtIndex:(NSInteger)index | |
| 161 | -{ | |
| 162 | - | |
| 163 | - if (_titleSpace != 0) { | |
| 164 | - | |
| 165 | - CGSize size = [_titleArr[index].title sizeWithAttributes:@{NSFontAttributeName:self.titleView.elementFont}]; | |
| 166 | - return size.width +_titleSpace; | |
| 167 | - } else { | |
| 168 | - | |
| 169 | - CGSize size = [_titleArr[index].title sizeWithAttributes:@{NSFontAttributeName:self.titleView.elementFont}]; | |
| 170 | - return size.width + 15; | |
| 171 | - } | |
| 172 | -} | |
| 173 | - | |
| 174 | -- (void)horizontalPickerView:(V8HorizontalPickerView *)picker didSelectElementAtIndex:(NSInteger)index | |
| 175 | -{ | |
| 176 | - if (self.pageView.indexOfSelectedPage != index) { | |
| 177 | - [self.pageView selectPageAtIndex:index animated:YES]; | |
| 178 | - } | |
| 179 | -} | |
| 180 | - | |
| 181 | -#pragma mark - UIScrollViewDelegate | |
| 182 | - | |
| 183 | -- (void)scrollViewDidScroll:(UIScrollView *)scrollView | |
| 184 | -{ | |
| 185 | - | |
| 186 | - if (self.titleView.currentSelectedIndex != self.pageView.indexOfSelectedPage) { | |
| 187 | - | |
| 188 | - [self.titleView scrollToElement:self.pageView.indexOfSelectedPage animated:YES]; | |
| 189 | - | |
| 190 | - } | |
| 191 | - [self.pageView scrollViewDidScroll]; | |
| 192 | - | |
| 193 | -} | |
| 194 | - | |
| 195 | -#pragma mark - MHPagingScrollViewDelegate | |
| 196 | - | |
| 197 | -- (NSUInteger)numberOfPagesInPagingScrollView:(MHPagingScrollView *)pagingScrollView | |
| 198 | -{ | |
| 199 | - return _titleArr.count; | |
| 200 | -} | |
| 201 | - | |
| 202 | -- (UIView *)pagingScrollView:(MHPagingScrollView *)pagingScrollView pageForIndex:(NSUInteger)index | |
| 203 | -{ | |
| 204 | - LVCHomePageListModel *model = [_titleArr safetyObjectAtIndex:index]; | |
| 205 | - | |
| 206 | - if ([model.type isEqualToString:@"channel"] || [model.type isEqualToString:@"tuijian"]) { | |
| 207 | - | |
| 208 | - LVCChannelPagingView *channelView = (LVCChannelPagingView *)[pagingScrollView pageViewByIndex:index]; | |
| 209 | - if (!channelView) { | |
| 210 | - channelView = [[LVCChannelPagingView alloc] initWithFrame:self.pageView.bounds]; | |
| 211 | - channelView.model = _titleArr[index]; | |
| 212 | - } | |
| 213 | - return channelView; | |
| 214 | - | |
| 215 | - } else if ([model.type isEqualToString:@"news"]) { | |
| 216 | - | |
| 217 | - UIView *view2 = [pagingScrollView pageViewByIndex:index]; | |
| 218 | - if (!view2) { | |
| 219 | - view2 = [[UIView alloc] init]; | |
| 220 | - } | |
| 221 | - view2.backgroundColor = [UIColor redColor]; | |
| 222 | - return view2; | |
| 223 | -// LVCUGCLiveListView *liveListView = (LVCUGCLiveListView *)[pagingScrollView pageViewByIndex:index]; | |
| 224 | -// if (!liveListView) { | |
| 225 | -// liveListView = [[LVCUGCLiveListView alloc] initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT - 114)]; | |
| 226 | -// } else { | |
| 227 | -// [liveListView isNeedToRefresh]; | |
| 228 | -// } | |
| 229 | -// liveListView.scrollToTop = YES; | |
| 230 | -// return liveListView; | |
| 231 | - } else if ([model.type isEqualToString:@"link"]) { | |
| 232 | - | |
| 233 | - UIView *view1 = [pagingScrollView pageViewByIndex:index]; | |
| 234 | - if (!view1) { | |
| 235 | - view1 = [[UIView alloc] init]; | |
| 236 | - } | |
| 237 | - view1.backgroundColor = [UIColor yellowColor]; | |
| 238 | - return view1; | |
| 239 | - } | |
| 240 | - | |
| 241 | - return nil; | |
| 242 | -} | |
| 243 | - | |
| 244 | -#pragma mark - Action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 245 | - | |
| 246 | -#pragma mark - GetMetohd !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 247 | -- (V8HorizontalPickerView *)titleView | |
| 248 | -{ | |
| 249 | - if (!_titleView) { | |
| 250 | - | |
| 251 | - _titleView = [[V8HorizontalPickerView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-120, 44) home:YES]; | |
| 252 | - _titleView.textColor = [UIColor colorWithHexString:@"#7e7e7d"]; | |
| 253 | - _titleView.selectedTextColor = [UIColor blackColorCNLive]; | |
| 254 | - _titleView.delegate = self; | |
| 255 | - _titleView.dataSource = self; | |
| 256 | - _titleView.elementFont = [UIFont boldSystemFontOfSize:18]; | |
| 257 | - _titleView.scrollView.scrollsToTop = NO; | |
| 258 | - | |
| 259 | - } | |
| 260 | - return _titleView; | |
| 261 | -} | |
| 262 | - | |
| 263 | -- (MHPagingScrollView *)pageView | |
| 264 | -{ | |
| 265 | - if (!_pageView) { | |
| 266 | - _pageView = [[MHPagingScrollView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-49)]; | |
| 267 | - _pageView.pagingDelegate = self; | |
| 268 | - _pageView.delegate = self; | |
| 269 | - _pageView.scrollsToTop = NO; | |
| 270 | - _pageView.bounces = NO; | |
| 271 | - } | |
| 272 | - return _pageView; | |
| 273 | -} | |
| 274 | - | |
| 275 | -- (UIButton *)reloadBtn | |
| 276 | -{ | |
| 277 | - if (!_reloadBtn) { | |
| 278 | - _reloadBtn = [self getReloadBtn]; | |
| 279 | - _reloadBtn.frame = self.view.bounds; | |
| 280 | - [_reloadBtn addTarget:self action:@selector(getChannelList) forControlEvents:UIControlEventTouchUpInside]; | |
| 281 | - [_reloadBtn addSubview:self.reloadLab]; | |
| 282 | - } | |
| 283 | - return _reloadBtn; | |
| 284 | -} | |
| 285 | - | |
| 286 | -- (UILabel *)reloadLab | |
| 287 | -{ | |
| 288 | - if (!_reloadLab) { | |
| 289 | - _reloadLab = [self getReloadLab]; | |
| 290 | - _reloadLab.frame = CGRectMake(0, self.view.height/2+30, self.view.width, 20); | |
| 291 | - } | |
| 292 | - return _reloadLab; | |
| 293 | -} | |
| 294 | - | |
| 295 | -// ------------------------------------------分割线--------------------------------------------------- | |
| 296 | - | |
| 297 | -- (nonnull UIButton *)getReloadBtn | |
| 298 | -{ | |
| 299 | - UIButton *reloadBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 300 | - reloadBtn.frame = CGRectMake(0, 0, 200, 200); | |
| 301 | - [reloadBtn setImage:[UIImage imageNamed:@"load_04"] forState:UIControlStateNormal]; | |
| 302 | - [reloadBtn setImage:[UIImage imageNamed:@"load_04"] forState:UIControlStateHighlighted]; | |
| 303 | - return reloadBtn; | |
| 304 | -} | |
| 305 | - | |
| 306 | -- (nonnull UILabel *)getReloadLab | |
| 307 | -{ | |
| 308 | - UILabel *reloadLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 130, 200, 20)]; | |
| 309 | - reloadLab.textAlignment = NSTextAlignmentCenter; | |
| 310 | - reloadLab.textColor = [UIColor colorWithHexString:@"bdbcbc"]; | |
| 311 | - return reloadLab; | |
| 312 | -} | |
| 313 | - | |
| 314 | -- (void)didReceiveMemoryWarning { | |
| 315 | - [super didReceiveMemoryWarning]; | |
| 316 | - // Dispose of any resources that can be recreated. | |
| 317 | -} | |
| 318 | - | |
| 319 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCMainHeaderCollectionReusableView.h deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCMainHeaderCollectionReusableView.h | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/20. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import <UIKit/UIKit.h> | |
| 10 | - | |
| 11 | -@interface LVCMainHeaderCollectionReusableView : UICollectionReusableView | |
| 12 | - | |
| 13 | -@property (nonatomic, assign) BOOL live; | |
| 14 | -@property (nonatomic, strong) NSArray *banners; | |
| 15 | -@property (nonatomic, strong) NSArray *marquees; | |
| 16 | - | |
| 17 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCMainHeaderCollectionReusableView.m deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCMainHeaderCollectionReusableView.m | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/20. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import "LVCMainHeaderCollectionReusableView.h" | |
| 10 | -#import "JBBannerView.h" | |
| 11 | -#import "JBAutoRollTableView.h" | |
| 12 | - | |
| 13 | -@interface LVCMainHeaderCollectionReusableView() | |
| 14 | - | |
| 15 | -@property (nonatomic, strong) JBBannerView *bannerView; | |
| 16 | -@property (nonatomic, strong) JBAutoRollTableView *rollTableView; | |
| 17 | - | |
| 18 | -@end | |
| 19 | - | |
| 20 | -@implementation LVCMainHeaderCollectionReusableView | |
| 21 | - | |
| 22 | -- (instancetype)initWithFrame:(CGRect)frame | |
| 23 | -{ | |
| 24 | - self = [super initWithFrame:frame]; | |
| 25 | - if (self) { | |
| 26 | - [self addSubview:self.bannerView]; | |
| 27 | - [self addSubview:self.rollTableView]; | |
| 28 | - } | |
| 29 | - return self; | |
| 30 | -} | |
| 31 | - | |
| 32 | -- (void)setBanners:(NSArray *)banners { | |
| 33 | - | |
| 34 | - if (_banners != banners) { | |
| 35 | - _banners = banners; | |
| 36 | - } | |
| 37 | - _bannerView.bannerArray = banners; | |
| 38 | -} | |
| 39 | - | |
| 40 | -#pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 41 | -- (JBBannerView *)bannerView { | |
| 42 | - | |
| 43 | - if (!_bannerView) { | |
| 44 | - _bannerView = [[JBBannerView alloc] initWithFrame:CGRectMake(0, 70, self.bounds.size.width, self.bounds.size.width / 2 + 10)]; | |
| 45 | - _bannerView.backgroundColor = [UIColor purpleColor]; | |
| 46 | - } | |
| 47 | - return _bannerView; | |
| 48 | -} | |
| 49 | - | |
| 50 | -- (JBAutoRollTableView *)rollTableView { | |
| 51 | - | |
| 52 | - if (!_rollTableView) { | |
| 53 | - _rollTableView = [[JBAutoRollTableView alloc] initWithFrame:CGRectMake(39, 250, KScreenWidth-40-25+6, 36) style:UITableViewStylePlain]; | |
| 54 | - | |
| 55 | - NSMutableArray *arrayM = [[NSMutableArray alloc] init]; | |
| 56 | - ProgramModel *model1 = [[ProgramModel alloc] init]; | |
| 57 | - model1.title = @"嘉华大厦十大富豪榜"; | |
| 58 | - [arrayM addObject:model1]; | |
| 59 | - ProgramModel *model2 = [[ProgramModel alloc] init]; | |
| 60 | - model2.title = @"思考很久案发的感受"; | |
| 61 | - [arrayM addObject:model2]; | |
| 62 | - ProgramModel *model3 = [[ProgramModel alloc] init]; | |
| 63 | - model3.title = @"模拟电路罚款金额虽"; | |
| 64 | - [arrayM addObject:model3]; | |
| 65 | - _rollTableView.news = arrayM; | |
| 66 | - } | |
| 67 | - return _rollTableView; | |
| 68 | -} | |
| 69 | - | |
| 70 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCMainHorizontalCollectionViewCell.h deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCMainHorizontalCollectionViewCell.h | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/20. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import <UIKit/UIKit.h> | |
| 10 | - | |
| 11 | -@interface LVCMainHorizontalCollectionViewCell : UICollectionViewCell | |
| 12 | - | |
| 13 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCMainHorizontalCollectionViewCell.m deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCMainHorizontalCollectionViewCell.m | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/20. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import "LVCMainHorizontalCollectionViewCell.h" | |
| 10 | - | |
| 11 | -@implementation LVCMainHorizontalCollectionViewCell | |
| 12 | - | |
| 13 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCSectionHeaderCollectionReusableView.h deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCSectionHeaderCollectionReusableView.h | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/20. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import <UIKit/UIKit.h> | |
| 10 | - | |
| 11 | -@interface LVCSectionHeaderCollectionReusableView : UICollectionReusableView | |
| 12 | - | |
| 13 | -@property (nonatomic, strong)LVCChannelDetailModel *model; | |
| 14 | -@property (nonatomic, assign)BOOL sort; | |
| 15 | -@property (nonatomic, assign)BOOL live; | |
| 16 | -@property (nonatomic, strong)NSString *channelId; | |
| 17 | -@property (nonatomic, strong)NSString *channelName; | |
| 18 | - | |
| 19 | -@end |
LiveVideoCloud/Classes/Sections/HomePageSections/LVCSectionHeaderCollectionReusableView.m deleted
100644 → 0
| 1 | -// | |
| 2 | -// LVCSectionHeaderCollectionReusableView.m | |
| 3 | -// LiveVideoCloud | |
| 4 | -// | |
| 5 | -// Created by cnliveJunBo on 17/6/20. | |
| 6 | -// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import "LVCSectionHeaderCollectionReusableView.h" | |
| 10 | - | |
| 11 | -@interface LVCSectionHeaderCollectionReusableView() | |
| 12 | - | |
| 13 | -@property (nonatomic, strong)UIButton *button; | |
| 14 | -@property (nonatomic, strong)UIImageView *arrow; | |
| 15 | - | |
| 16 | -@end | |
| 17 | - | |
| 18 | -@implementation LVCSectionHeaderCollectionReusableView | |
| 19 | - | |
| 20 | -- (instancetype)initWithFrame:(CGRect)frame | |
| 21 | -{ | |
| 22 | - self = [super initWithFrame:frame]; | |
| 23 | - if (self) { | |
| 24 | - UIView *intervalView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.width, 6)]; | |
| 25 | - intervalView.backgroundColor = [UIColor backgroundColor]; | |
| 26 | - [self addSubview:intervalView]; | |
| 27 | - [self addSubview:self.button]; | |
| 28 | - [self addSubview:self.arrow]; | |
| 29 | - } | |
| 30 | - return self; | |
| 31 | -} | |
| 32 | - | |
| 33 | -- (void)setModel:(LVCChannelDetailModel *)model { | |
| 34 | - if (_model != model) { | |
| 35 | - _model = model; | |
| 36 | - } | |
| 37 | - [self.button setTitle:[NSString stringWithFormat:@" %@", model.title] forState:UIControlStateNormal]; | |
| 38 | -} | |
| 39 | - | |
| 40 | -#pragma mark - ACtion !!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 41 | -- (void)buttonAction { | |
| 42 | - | |
| 43 | - NSLog(@"跳转更多!!!!!!!!!!!!!!"); | |
| 44 | -} | |
| 45 | - | |
| 46 | -#pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!! | |
| 47 | -- (UIButton *)button { | |
| 48 | - | |
| 49 | - if (!_button) { | |
| 50 | - _button = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 51 | - _button.frame = CGRectMake(0, 6, self.frame.size.width, 47); | |
| 52 | - [_button setTitleColor:[UIColor blackColorCNLive] forState:UIControlStateNormal]; | |
| 53 | - _button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft; | |
| 54 | - [_button addTarget:self action:@selector(buttonAction) forControlEvents:UIControlEventTouchUpInside]; | |
| 55 | - _button.titleLabel.font = [UIFont boldSystemFontOfSize:18]; | |
| 56 | - } | |
| 57 | - return _button; | |
| 58 | -} | |
| 59 | - | |
| 60 | -- (UIImageView *)arrow { | |
| 61 | - | |
| 62 | - if (!_arrow) { | |
| 63 | - _arrow = [[UIImageView alloc] initWithFrame:CGRectMake(KScreenWidth-5-15, 19, 15, 21)]; | |
| 64 | - _arrow.image = [UIImage imageNamed:@"gengduo"]; | |
| 65 | - } | |
| 66 | - return _arrow; | |
| 67 | -} | |
| 68 | - | |
| 69 | -@end |
LiveVideoCloud/Classes/Sections/Mine/Controllers/LVCMineViewController.m
LiveVideoCloud/Classes/Sections/Mine/Login/Controller/RegisterCommonController.m
LiveVideoCloud/Classes/Sections/PGCSections/Controller/LVCTelevisioController.m
| ... | ... | @@ -9,6 +9,7 @@ |
| 9 | 9 | #import "LVCTelevisioController.h" |
| 10 | 10 | #import "LVCTelevisionModel.h" |
| 11 | 11 | #import "LVCTelevisionCell.h" |
| 12 | +#import "LVCLivePlayerController.h" | |
| 12 | 13 | |
| 13 | 14 | @interface LVCTelevisioController ()<UITableViewDelegate, UITableViewDataSource> |
| 14 | 15 | { |
| ... | ... | @@ -26,6 +27,7 @@ |
| 26 | 27 | // Do any additional setup after loading the view. |
| 27 | 28 | self.view.backgroundColor = [UIColor whiteColor]; |
| 28 | 29 | self.navigationItem.title = @"直播"; |
| 30 | + | |
| 29 | 31 | _channelsModelArray = [[NSMutableArray alloc] init]; |
| 30 | 32 | |
| 31 | 33 | [self.view addSubview:self.tableView]; |
| ... | ... | @@ -67,6 +69,8 @@ |
| 67 | 69 | if (!cell) { |
| 68 | 70 | cell = [tableView dequeueReusableCellWithIdentifier:cellId]; |
| 69 | 71 | } |
| 72 | + cell.selectionStyle = UITableViewCellSelectionStyleNone; | |
| 73 | + | |
| 70 | 74 | LVCTelevisionModel *model = [_channelsModelArray objectAtIndex:indexPath.row]; |
| 71 | 75 | cell.model = model; |
| 72 | 76 | return cell; |
| ... | ... | @@ -74,7 +78,14 @@ |
| 74 | 78 | } |
| 75 | 79 | |
| 76 | 80 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
| 77 | - | |
| 81 | + | |
| 82 | + LVCTelevisionModel *model = _channelsModelArray[indexPath.row]; | |
| 83 | + self.hidesBottomBarWhenPushed = YES; | |
| 84 | + LVCLivePlayerController *playVC = [[LVCLivePlayerController alloc] init]; | |
| 85 | + playVC.model = model; | |
| 86 | + self.navigationController.navigationBar.hidden = YES; | |
| 87 | + [self.navigationController pushViewController:playVC animated:YES]; | |
| 88 | + self.hidesBottomBarWhenPushed = NO; | |
| 78 | 89 | } |
| 79 | 90 | |
| 80 | 91 | #pragma mark - | ... | ... |
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCPlayer.m
| ... | ... | @@ -13,6 +13,7 @@ |
| 13 | 13 | @interface LVCPlayer ()<UIGestureRecognizerDelegate,LVCPlayerLoadingViewDelegate> |
| 14 | 14 | { |
| 15 | 15 | LVCTelevisionModel *_model; |
| 16 | + BOOL _noInternet; | |
| 16 | 17 | } |
| 17 | 18 | |
| 18 | 19 | @property (nonatomic, strong) CNLiveMoviePlayerController *player; |
| ... | ... | @@ -44,6 +45,7 @@ |
| 44 | 45 | [self initPlayerWithModel:model]; |
| 45 | 46 | |
| 46 | 47 | [self addSubview:self.contentView]; |
| 48 | + [self.contentView addSubview:self.loadingView]; | |
| 47 | 49 | [self.contentView addSubview:self.bottomBgView]; |
| 48 | 50 | [self.contentView addSubview:self.topBgView]; |
| 49 | 51 | [self.bottomBgView addSubview:self.playOrPauseBtn]; |
| ... | ... | @@ -51,7 +53,6 @@ |
| 51 | 53 | [self.topBgView addSubview:self.titleLab]; |
| 52 | 54 | [self.topBgView addSubview:self.barrageSwitch]; |
| 53 | 55 | [self addSubview:self.backBtn]; |
| 54 | - [self.contentView addSubview:self.loadingView]; | |
| 55 | 56 | [self.contentView addSubview:self.editBtn]; |
| 56 | 57 | [self.contentView addGestureRecognizer:self.singleTap]; |
| 57 | 58 | |
| ... | ... | @@ -66,6 +67,8 @@ |
| 66 | 67 | { |
| 67 | 68 | /* |
| 68 | 69 | */ |
| 70 | + [self.loadingView setLVCPlayerStatus:LVCPlayerStatusStartLoading]; | |
| 71 | + | |
| 69 | 72 | NSString *channelId = [NSString stringWithFormat:@"82_%@",model.mediaId]; |
| 70 | 73 | _player = [[CNLiveMoviePlayerController alloc] initLivePlayWithChannelId:channelId anchorStatus:NO authSuccess:^{ |
| 71 | 74 | [self addObservers]; |
| ... | ... | @@ -212,7 +215,7 @@ |
| 212 | 215 | #pragma mark - LVCPlayerLoadingViewDelegate |
| 213 | 216 | - (void)retryBtnClick |
| 214 | 217 | { |
| 215 | - [_loadingView startLoading]; | |
| 218 | + [_loadingView setLVCPlayerStatus:LVCPlayerStatusStartLoading]; | |
| 216 | 219 | [_player reload:nil]; |
| 217 | 220 | } |
| 218 | 221 | |
| ... | ... | @@ -252,6 +255,12 @@ |
| 252 | 255 | name:MPMoviePlayerPlaybackStateDidChangeNotification |
| 253 | 256 | object:nil]; |
| 254 | 257 | |
| 258 | + //网络状态改变 | |
| 259 | + [[NSNotificationCenter defaultCenter] addObserver:self | |
| 260 | + selector:@selector(moviePlayerNetworkStatusChange:) | |
| 261 | + name:MPMoviePlayerNetworkStatusChangeNotification | |
| 262 | + object:nil]; | |
| 263 | + | |
| 255 | 264 | [[NSNotificationCenter defaultCenter] addObserver:self |
| 256 | 265 | selector:@selector(appResignActive:) |
| 257 | 266 | name:UIApplicationWillResignActiveNotification |
| ... | ... | @@ -267,10 +276,13 @@ |
| 267 | 276 | { |
| 268 | 277 | if (_player) { |
| 269 | 278 | MPMovieLoadState loadState = _player.loadState; |
| 270 | - if ((loadState & MPMovieLoadStatePlaythroughOK) != 0) { | |
| 279 | + if ((loadState & MPMovieLoadStatePlaythroughOK) != 0) { //加载完成 | |
| 280 | + [_loadingView setLVCPlayerStatus:LVCPlayerStatusStopLoading]; | |
| 281 | + | |
| 271 | 282 | NSLog(@"loadStateDidChange: MPMovieLoadStatePlaythroughOK: %d\n", (int)loadState); |
| 272 | 283 | |
| 273 | - } else if ((loadState & MPMovieLoadStateStalled) != 0) { | |
| 284 | + } else if ((loadState & MPMovieLoadStateStalled) != 0) { //视频正在加载中 | |
| 285 | + [_loadingView setLVCPlayerStatus:LVCPlayerStatusStartLoading]; | |
| 274 | 286 | NSLog(@"loadStateDidChange: MPMovieLoadStateStalled: %d\n", (int)loadState); |
| 275 | 287 | |
| 276 | 288 | } else { |
| ... | ... | @@ -284,28 +296,13 @@ |
| 284 | 296 | if (_player) { |
| 285 | 297 | int reason = [[[notification userInfo] valueForKey:MPMoviePlayerPlaybackDidFinishReasonUserInfoKey] intValue]; |
| 286 | 298 | if (MPMovieFinishReasonPlaybackError == reason) { |
| 287 | - _loadingView.hidden = NO; | |
| 299 | + if (_noInternet) { | |
| 300 | + [_loadingView setLVCPlayerStatus:LVCPlayerStatusNoNetwork]; | |
| 301 | + } else { | |
| 302 | + [_loadingView setLVCPlayerStatus:LVCPlayerStatusStopError]; | |
| 303 | + } | |
| 288 | 304 | } else { |
| 289 | - _loadingView.hidden = YES; | |
| 290 | - } | |
| 291 | - | |
| 292 | - switch (reason) | |
| 293 | - { | |
| 294 | - case MPMovieFinishReasonPlaybackEnded: | |
| 295 | - NSLog(@"playbackStateDidChange: MPMovieFinishReasonPlaybackEnded: %d\n", reason); | |
| 296 | - break; | |
| 297 | - | |
| 298 | - case MPMovieFinishReasonUserExited: | |
| 299 | - NSLog(@"playbackStateDidChange: MPMovieFinishReasonUserExited: %d\n", reason); | |
| 300 | - break; | |
| 301 | - | |
| 302 | - case MPMovieFinishReasonPlaybackError: | |
| 303 | - NSLog(@"playbackStateDidChange: MPMovieFinishReasonPlaybackError: %d\n", reason); | |
| 304 | - break; | |
| 305 | - | |
| 306 | - default: | |
| 307 | - NSLog(@"playbackPlayBackDidFinish: ???: %d\n", reason); | |
| 308 | - break; | |
| 305 | + [_loadingView setLVCPlayerStatus:LVCPlayerStatusStopLoading]; | |
| 309 | 306 | } |
| 310 | 307 | } |
| 311 | 308 | } |
| ... | ... | @@ -323,68 +320,66 @@ |
| 323 | 320 | |
| 324 | 321 | if (_player.playbackState == MPMoviePlaybackStatePlaying) { |
| 325 | 322 | _playOrPauseBtn.selected = YES; |
| 326 | - _loadingView.hidden = YES; | |
| 323 | + [_loadingView setLVCPlayerStatus:LVCPlayerStatusStopLoading]; | |
| 324 | + } else if (_player.playbackState == MPMoviePlaybackStateSeekingForward || _player.playbackState == MPMoviePlaybackStateSeekingBackward) { | |
| 325 | + [_loadingView setLVCPlayerStatus:LVCPlayerStatusStartLoading]; | |
| 327 | 326 | } else { |
| 328 | 327 | _playOrPauseBtn.selected = NO; |
| 329 | 328 | } |
| 330 | 329 | |
| 331 | 330 | NSLog(@"moviePlayBackStateDidChange : %ld",(long)_player.playbackState); |
| 331 | + | |
| 332 | + } | |
| 333 | +} | |
| 334 | + | |
| 335 | +//网络状态监听 | |
| 336 | +- (void)moviePlayerNetworkStatusChange:(NSNotification *)notify { | |
| 337 | + int currStatus = [[[notify userInfo] valueForKey:MPMoviePlayerCurrNetworkStatusUserInfoKey] intValue]; | |
| 338 | + int lastStatus = [[[notify userInfo] valueForKey:MPMoviePlayerLastNetworkStatusUserInfoKey] intValue]; | |
| 339 | + | |
| 340 | + if (currStatus == CNLiveNotReachable) { | |
| 341 | + _noInternet = YES; | |
| 342 | + } else { | |
| 343 | + _noInternet = NO; | |
| 344 | + } | |
| 345 | + | |
| 346 | + NSLog(@"network reachable change from %@ to %@\n", [self netStatus2Str:lastStatus], [self netStatus2Str:currStatus]); | |
| 347 | +} | |
| 332 | 348 | |
| 333 | - /* | |
| 334 | - switch (_player.playbackState) { | |
| 335 | - case MPMoviePlaybackStateStopped: { | |
| 336 | - | |
| 337 | - [self changePlayBtnStatus:NO]; | |
| 338 | - NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStateStopped"); | |
| 339 | - break; | |
| 340 | - } | |
| 341 | - case MPMoviePlaybackStatePlaying: { | |
| 342 | - [self changePlayBtnStatus:YES]; | |
| 343 | - NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStatePlaying"); | |
| 344 | - break; | |
| 345 | - } | |
| 346 | - case MPMoviePlaybackStatePaused: | |
| 347 | - [self changePlayBtnStatus:NO]; | |
| 348 | - NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStatePaused"); | |
| 349 | - break; | |
| 350 | - case MPMoviePlaybackStateInterrupted: | |
| 351 | - [self changePlayBtnStatus:NO]; | |
| 352 | - NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStateInterrupted"); | |
| 353 | - break; | |
| 354 | - case MPMoviePlaybackStateSeekingForward: | |
| 355 | - [self changePlayBtnStatus:NO]; | |
| 356 | - NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStateSeekingForward"); | |
| 357 | - break; | |
| 358 | - case MPMoviePlaybackStateSeekingBackward: | |
| 359 | - [self changePlayBtnStatus:NO]; | |
| 360 | - NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStateSeekingBackward"); | |
| 361 | - break; | |
| 362 | - default: | |
| 363 | - [self changePlayBtnStatus:NO]; | |
| 364 | - NSLog(@"moviePlayBackStateDidChange : %ld", _player.playbackState); | |
| 365 | - break; | |
| 366 | - } | |
| 367 | - */ | |
| 349 | +- (NSString *) netStatus2Str:(CNLiveNetworkStatus)networkStatus{ | |
| 350 | + NSString *netString = nil; | |
| 351 | + | |
| 352 | + if(networkStatus == CNLiveNotReachable){ | |
| 353 | + netString = @"NO INTERNET"; | |
| 354 | + } else if(networkStatus == CNLiveReachableViaWiFi) { | |
| 355 | + netString = @"WIFI"; | |
| 356 | + } else if(networkStatus == CNLiveReachableViaWWAN) { | |
| 357 | + netString = @"WWAN"; | |
| 358 | + } else { | |
| 359 | + netString = @"Unknown"; | |
| 368 | 360 | } |
| 361 | + return netString; | |
| 369 | 362 | } |
| 370 | 363 | |
| 371 | 364 | - (void)appResignActive:(NSNotification *)noti |
| 372 | 365 | { |
| 373 | - [_player pause]; | |
| 366 | + if (_player.playbackState == MPMoviePlaybackStatePlaying) { | |
| 367 | + [_player pause]; | |
| 368 | + } | |
| 374 | 369 | } |
| 375 | 370 | |
| 376 | 371 | - (void)appBecomeActive:(NSNotification *)noti |
| 377 | 372 | { |
| 378 | - [_player play]; | |
| 373 | + if (_player.playbackState == MPMoviePlaybackStatePaused) { | |
| 374 | + [_player play]; | |
| 375 | + } | |
| 379 | 376 | } |
| 380 | 377 | |
| 381 | 378 | #pragma mark - |
| 382 | 379 | #pragma mark - public |
| 383 | 380 | - (void)stopPlaying |
| 384 | 381 | { |
| 385 | - if (_player.isPlaying) { | |
| 386 | - [_player stop]; | |
| 387 | - } | |
| 382 | + [_player stop]; | |
| 388 | 383 | _player = nil; |
| 389 | 384 | |
| 390 | 385 | if (_timer) { |
| ... | ... | @@ -430,9 +425,7 @@ |
| 430 | 425 | }]; |
| 431 | 426 | |
| 432 | 427 | [self.loadingView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 433 | - make.center.equalTo(self.contentView); | |
| 434 | - make.width.mas_equalTo(100); | |
| 435 | - make.height.mas_equalTo(80); | |
| 428 | + make.top.left.right.bottom.equalTo(self); | |
| 436 | 429 | }]; |
| 437 | 430 | |
| 438 | 431 | [self.backBtn mas_makeConstraints:^(MASConstraintMaker *make) { |
| ... | ... | @@ -617,6 +610,7 @@ |
| 617 | 610 | { |
| 618 | 611 | if (!_loadingView) { |
| 619 | 612 | _loadingView = [[LVCPlayerLoadingView alloc] init]; |
| 613 | + _loadingView.delegate = self; | |
| 620 | 614 | } |
| 621 | 615 | return _loadingView; |
| 622 | 616 | } | ... | ... |
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCPlayerLoadingView.h
| ... | ... | @@ -8,6 +8,13 @@ |
| 8 | 8 | |
| 9 | 9 | #import <UIKit/UIKit.h> |
| 10 | 10 | |
| 11 | +typedef NS_ENUM(NSUInteger, LVCPlayerStatus) { | |
| 12 | + LVCPlayerStatusStartLoading = 0, | |
| 13 | + LVCPlayerStatusStopLoading, | |
| 14 | + LVCPlayerStatusStopError, | |
| 15 | + LVCPlayerStatusNoNetwork | |
| 16 | +}; | |
| 17 | + | |
| 11 | 18 | @protocol LVCPlayerLoadingViewDelegate <NSObject> |
| 12 | 19 | |
| 13 | 20 | - (void)retryBtnClick; //点击重试 |
| ... | ... | @@ -18,6 +25,8 @@ |
| 18 | 25 | |
| 19 | 26 | @property (nonatomic, assign) id<LVCPlayerLoadingViewDelegate> delegate; |
| 20 | 27 | |
| 28 | +- (void)setLVCPlayerStatus:(LVCPlayerStatus)status; | |
| 29 | + | |
| 21 | 30 | - (void)startLoading; //开始加载 |
| 22 | 31 | |
| 23 | 32 | - (void)stopLoading; //停止加载 | ... | ... |
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCPlayerLoadingView.m
| ... | ... | @@ -57,6 +57,41 @@ |
| 57 | 57 | _loadingLab.hidden = YES; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | +- (void)setLVCPlayerStatus:(LVCPlayerStatus)status { | |
| 61 | + | |
| 62 | + switch (status) { | |
| 63 | + case LVCPlayerStatusStartLoading: | |
| 64 | + _loadingLab.text = @"努力加载中..."; | |
| 65 | + [_loadingView startAnimating]; | |
| 66 | + _retryBtn.hidden = YES; | |
| 67 | + _loadingLab.hidden = NO; | |
| 68 | + break; | |
| 69 | + | |
| 70 | + case LVCPlayerStatusStopLoading: | |
| 71 | + _loadingLab.hidden = YES; | |
| 72 | + [_loadingView stopAnimating]; | |
| 73 | + _retryBtn.hidden = YES; | |
| 74 | + break; | |
| 75 | + | |
| 76 | + case LVCPlayerStatusStopError: | |
| 77 | + _loadingLab.text = @"抱歉,播放异常,请重试"; | |
| 78 | + [_loadingView stopAnimating]; | |
| 79 | + _retryBtn.hidden = NO; | |
| 80 | + _loadingLab.hidden = NO; | |
| 81 | + break; | |
| 82 | + | |
| 83 | + case LVCPlayerStatusNoNetwork: | |
| 84 | + _loadingLab.text = @"网络连接中断,请确认网络连接后重试"; | |
| 85 | + [_loadingView stopAnimating]; | |
| 86 | + _retryBtn.hidden = NO; | |
| 87 | + _loadingLab.hidden = NO; | |
| 88 | + break; | |
| 89 | + | |
| 90 | + default: | |
| 91 | + break; | |
| 92 | + } | |
| 93 | +} | |
| 94 | + | |
| 60 | 95 | #pragma mark - |
| 61 | 96 | #pragma mark - action |
| 62 | 97 | - (void)retryBtnAction |
| ... | ... | @@ -73,23 +108,22 @@ |
| 73 | 108 | { |
| 74 | 109 | |
| 75 | 110 | [self.loadingView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 76 | - make.centerX.mas_equalTo(self.width/2); | |
| 77 | - make.top.mas_equalTo(0); | |
| 78 | - }]; | |
| 79 | - | |
| 80 | - [self.loadingLab mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 81 | - make.left.mas_equalTo(0); | |
| 82 | - make.top.mas_equalTo(40); | |
| 83 | - make.width.equalTo(self); | |
| 84 | - make.height.mas_equalTo(40); | |
| 111 | + make.centerY.equalTo(self).offset(-20); | |
| 112 | + make.centerX.equalTo(self); | |
| 85 | 113 | }]; |
| 86 | 114 | |
| 87 | 115 | [self.retryBtn mas_makeConstraints:^(MASConstraintMaker *make) { |
| 88 | 116 | make.width.mas_equalTo(70); |
| 89 | - make.height.mas_equalTo(40); | |
| 90 | - make.center.equalTo(self); | |
| 117 | + make.height.mas_equalTo(35); | |
| 118 | + make.centerY.equalTo(self).offset(-20); | |
| 119 | + make.centerX.equalTo(self); | |
| 91 | 120 | }]; |
| 92 | 121 | |
| 122 | + [self.loadingLab mas_makeConstraints:^(MASConstraintMaker *make) { | |
| 123 | + make.left.right.mas_equalTo(0); | |
| 124 | + make.top.equalTo(self.loadingView.hidden ? self.loadingView.mas_bottom : self.retryBtn.mas_bottom).with.offset(15); | |
| 125 | + make.height.mas_equalTo(30); | |
| 126 | + }]; | |
| 93 | 127 | } |
| 94 | 128 | |
| 95 | 129 | #pragma mark - |
| ... | ... | @@ -119,11 +153,11 @@ |
| 119 | 153 | if (!_retryBtn) { |
| 120 | 154 | _retryBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 121 | 155 | [_retryBtn setTitle:@"重试" forState:UIControlStateNormal]; |
| 122 | - [_retryBtn setTitleColor:[UIColor yellowColor] forState:UIControlStateNormal]; | |
| 156 | + [_retryBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; | |
| 123 | 157 | _retryBtn.hidden = YES; |
| 124 | 158 | _retryBtn.layer.cornerRadius = 10; |
| 125 | 159 | _retryBtn.layer.masksToBounds = YES; |
| 126 | - _retryBtn.layer.borderColor = [UIColor yellowColor].CGColor; | |
| 160 | + _retryBtn.layer.borderColor = [UIColor whiteColor].CGColor; | |
| 127 | 161 | _retryBtn.layer.borderWidth = 1; |
| 128 | 162 | [_retryBtn addTarget:self action:@selector(retryBtnAction) forControlEvents:UIControlEventTouchUpInside]; |
| 129 | 163 | } | ... | ... |
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCTelevisionCell.h
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCTelevisionCell.m
| ... | ... | @@ -35,6 +35,12 @@ |
| 35 | 35 | |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | +- (void)setProgramModel:(ProgramModel *)programModel { | |
| 39 | + | |
| 40 | + [_imgView sd_setImageWithURL:[NSURL URLWithString:programModel.img] placeholderImage:[UIImage imageNamed:@"load_03"]]; | |
| 41 | + _titleLab.text = programModel.title; | |
| 42 | +} | |
| 43 | + | |
| 38 | 44 | #pragma mark - |
| 39 | 45 | #pragma mark - getter |
| 40 | 46 | - (UIImageView *)imgView | ... | ... |
LiveVideoCloud/Classes/Sections/UGCSections/Controller/LVCUGCLiveListView.h renamed to LiveVideoCloud/Classes/Sections/UGCSections/View/LVCUGCLiveListView.h
LiveVideoCloud/Classes/Sections/UGCSections/Controller/LVCUGCLiveListView.m renamed to LiveVideoCloud/Classes/Sections/UGCSections/View/LVCUGCLiveListView.m
LiveVideoCloud/Classes/Sections/HomePageSections/LVCHomePageViewController.h renamed to LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCVodPlayerController.h
| 1 | 1 | // |
| 2 | -// LVCHomePageViewController.h | |
| 2 | +// LVCVodPlayerController.h | |
| 3 | 3 | // LiveVideoCloud |
| 4 | 4 | // |
| 5 | -// Created by cnliveJunBo on 17/6/9. | |
| 5 | +// Created by cnliveJunBo on 17/6/27. | |
| 6 | 6 | // Copyright © 2017年 cnlive. All rights reserved. |
| 7 | 7 | // |
| 8 | 8 | |
| 9 | 9 | #import "BaseViewController.h" |
| 10 | 10 | |
| 11 | -@interface LVCHomePageViewController : BaseViewController | |
| 11 | +@interface LVCVodPlayerController : BaseViewController | |
| 12 | 12 | |
| 13 | 13 | @end | ... | ... |
LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCVodPlayerController.m
0 → 100644
| 1 | +// | |
| 2 | +// LVCVodPlayerController.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/6/27. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "LVCVodPlayerController.h" | |
| 10 | + | |
| 11 | +@interface LVCVodPlayerController () | |
| 12 | + | |
| 13 | +@end | |
| 14 | + | |
| 15 | +@implementation LVCVodPlayerController | |
| 16 | + | |
| 17 | +- (void)viewDidLoad { | |
| 18 | + [super viewDidLoad]; | |
| 19 | + | |
| 20 | + self.view.backgroundColor = [UIColor whiteColor]; | |
| 21 | +} | |
| 22 | + | |
| 23 | +- (void)didReceiveMemoryWarning { | |
| 24 | + [super didReceiveMemoryWarning]; | |
| 25 | + // Dispose of any resources that can be recreated. | |
| 26 | +} | |
| 27 | + | |
| 28 | +@end | ... | ... |
LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCVodPlayerListController.h
LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCVodPlayerListController.m
| ... | ... | @@ -7,16 +7,21 @@ |
| 7 | 7 | // |
| 8 | 8 | |
| 9 | 9 | #import "LVCVodPlayerListController.h" |
| 10 | +#import "LVCTelevisionCell.h" | |
| 11 | +#import "LVCRequestFailedView.h" | |
| 12 | +#import "LVCVodPlayerController.h" | |
| 10 | 13 | |
| 11 | 14 | static NSString *vodCellId = @"vodCellId"; |
| 12 | 15 | |
| 13 | -@interface LVCVodPlayerListController ()<UITableViewDelegate, UITableViewDataSource> { | |
| 16 | +@interface LVCVodPlayerListController ()<UITableViewDelegate, UITableViewDataSource, LVCRequestFailedViewDelegate> { | |
| 14 | 17 | |
| 15 | 18 | AFHTTPRequestOperation *_operation; |
| 16 | 19 | NSMutableArray *_programArrayM; |
| 20 | + long long _timestamp; | |
| 17 | 21 | } |
| 18 | 22 | |
| 19 | 23 | @property (nonatomic, strong)UITableView *tableView; |
| 24 | +@property (nonatomic, strong) LVCRequestFailedView *failedView; //请求失败提示view | |
| 20 | 25 | |
| 21 | 26 | @end |
| 22 | 27 | |
| ... | ... | @@ -28,10 +33,18 @@ static NSString *vodCellId = @"vodCellId"; |
| 28 | 33 | self.navigationItem.title = @"点播"; |
| 29 | 34 | self.view.backgroundColor = [UIColor whiteColor]; |
| 30 | 35 | _programArrayM = [[NSMutableArray alloc] init]; |
| 36 | + | |
| 37 | + [self.tableView addSubview:self.failedView]; | |
| 38 | + [self.view addSubview:self.tableView]; | |
| 39 | + | |
| 40 | + _timestamp = [[self timestamp] longLongValue]; | |
| 41 | + [self.tableView.header beginRefreshing]; | |
| 31 | 42 | } |
| 32 | 43 | |
| 33 | 44 | - (void)requestVodPlayerList { |
| 34 | 45 | |
| 46 | + _failedView.hidden = YES; | |
| 47 | + | |
| 35 | 48 | NSString *uid; |
| 36 | 49 | if ([UserTools isLogin]) { |
| 37 | 50 | uid = [UserInformationModel manager].uid; |
| ... | ... | @@ -64,15 +77,33 @@ static NSString *vodCellId = @"vodCellId"; |
| 64 | 77 | } |
| 65 | 78 | } |
| 66 | 79 | } |
| 80 | + _timestamp = [[self timestamp] longLongValue]; | |
| 81 | + [self.tableView.header endRefreshing]; | |
| 67 | 82 | [self.tableView reloadData]; |
| 68 | 83 | |
| 69 | 84 | } failure:^(AFHTTPRequestOperation *operation, NSError *error) { |
| 70 | 85 | |
| 71 | 86 | NSLog(@"点播列表请求失败!"); |
| 87 | + _timestamp = [[self timestamp] longLongValue]; | |
| 88 | + [self.tableView.header endRefreshing]; | |
| 89 | + if (_programArrayM.count == 0) { | |
| 90 | + _failedView.hidden = NO; | |
| 91 | + } | |
| 72 | 92 | }]; |
| 73 | 93 | } |
| 74 | 94 | |
| 75 | 95 | #pragma mark - UITableViewDelegate !!!!!!!!!!!!!!!!!!!!!!!! |
| 96 | +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 97 | + | |
| 98 | + [tableView deselectRowAtIndexPath:indexPath animated:NO]; | |
| 99 | + | |
| 100 | + LVCVodPlayerController *vc = [[LVCVodPlayerController alloc] init]; | |
| 101 | + [self.navigationController pushViewController:vc animated:YES]; | |
| 102 | +} | |
| 103 | + | |
| 104 | +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 105 | + return SCREEN_WIDTH*9/16+40; | |
| 106 | +} | |
| 76 | 107 | |
| 77 | 108 | #pragma mark - UITableViewDataSource !!!!!!!!!!!!!!!!!!!!!!!! |
| 78 | 109 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { |
| ... | ... | @@ -81,27 +112,82 @@ static NSString *vodCellId = @"vodCellId"; |
| 81 | 112 | |
| 82 | 113 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
| 83 | 114 | |
| 84 | - return nil; | |
| 115 | + LVCTelevisionCell *cell = [tableView dequeueReusableCellWithIdentifier:vodCellId forIndexPath:indexPath]; | |
| 116 | + | |
| 117 | + cell.programModel = _programArrayM[indexPath.row]; | |
| 118 | + return cell; | |
| 119 | +} | |
| 120 | + | |
| 121 | +#pragma mark - LVCRequestFailedViewDelegate | |
| 122 | +- (void)reloadDataWithView:(LVCRequestFailedView *)view | |
| 123 | +{ | |
| 124 | + [self.tableView.header beginRefreshing]; | |
| 125 | + [self requestVodPlayerList]; | |
| 85 | 126 | } |
| 86 | 127 | |
| 87 | 128 | #pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 88 | 129 | - (UITableView *)tableView { |
| 89 | 130 | |
| 90 | 131 | if (!_tableView) { |
| 91 | - _tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain]; | |
| 132 | + _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height - 50) style:UITableViewStylePlain]; | |
| 92 | 133 | _tableView.dataSource = self; |
| 93 | 134 | _tableView.delegate = self; |
| 94 | 135 | _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; |
| 136 | + _tableView.showsHorizontalScrollIndicator = NO; | |
| 137 | + _tableView.scrollsToTop = YES; | |
| 138 | + _tableView.header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(refresh)]; | |
| 95 | 139 | |
| 96 | - UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, -KScreenHeight, KScreenWidth, KScreenHeight)]; | |
| 97 | - view.backgroundColor = [UIColor backgroundColor]; | |
| 98 | - [_tableView addSubview:view]; | |
| 99 | - | |
| 100 | - [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:vodCellId]; | |
| 140 | + [_tableView registerClass:[LVCTelevisionCell class] forCellReuseIdentifier:vodCellId]; | |
| 101 | 141 | } |
| 102 | 142 | return _tableView; |
| 103 | 143 | } |
| 104 | 144 | |
| 145 | +- (LVCRequestFailedView *)failedView | |
| 146 | +{ | |
| 147 | + if (!_failedView) { | |
| 148 | + _failedView = [[LVCRequestFailedView alloc] initWithFrame:CGRectMake(0, 0, 150, 100) words:@"您的网络不太顺畅哦~"]; | |
| 149 | + _failedView.center = self.tableView.center; | |
| 150 | + _failedView.delegate = self; | |
| 151 | + _failedView.hidden = YES; | |
| 152 | + } | |
| 153 | + return _failedView; | |
| 154 | +} | |
| 155 | + | |
| 156 | +#pragma mark - Action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 157 | +- (void)refresh { | |
| 158 | + | |
| 159 | + [self requestVodPlayerList]; | |
| 160 | +} | |
| 161 | + | |
| 162 | +- (NSString *)timestamp { | |
| 163 | + | |
| 164 | + NSString *stamp = @""; | |
| 165 | + | |
| 166 | + stamp = [NSString stringWithFormat:@"%.3f", [[NSDate date] timeIntervalSince1970]]; | |
| 167 | + stamp = [stamp stringByReplacingOccurrencesOfString:@"." withString:@""]; | |
| 168 | + | |
| 169 | + return stamp; | |
| 170 | +} | |
| 171 | + | |
| 172 | +- (void)autoRefresh { | |
| 173 | + | |
| 174 | + [self requestVodPlayerList]; | |
| 175 | +} | |
| 176 | + | |
| 177 | +- (void)isNeedToRefresh { | |
| 178 | + | |
| 179 | + long long timestamp = [[self timestamp] longLongValue]; | |
| 180 | + if (timestamp-_timestamp > 180000) { | |
| 181 | + [self.tableView.header beginRefreshing]; | |
| 182 | + } | |
| 183 | +} | |
| 184 | + | |
| 185 | +- (void)setScrollToTop:(BOOL)scrollToTop { | |
| 186 | + | |
| 187 | + _scrollToTop = scrollToTop; | |
| 188 | + self.tableView.scrollsToTop = scrollToTop; | |
| 189 | +} | |
| 190 | + | |
| 105 | 191 | #pragma mark ------------------------------ 分割线 ---------------------------------------------- |
| 106 | 192 | - (NSDictionary *)addParameters:(NSDictionary *)dict { |
| 107 | 193 | ... | ... |
LiveVideoCloud/PrefixHeader.pch
| ... | ... | @@ -29,47 +29,32 @@ |
| 29 | 29 | #import <CNLivePlayerSDK/CNLiveWebcastManager.h> |
| 30 | 30 | #import <CNLiveMsgTools/CNLiveMsgManager.h> |
| 31 | 31 | #import <CNLiveChatManager/CNLiveChatManager.h> |
| 32 | - #import "V8HorizontalPickerView.h" | |
| 33 | - #import "MHPagingScrollView.h" | |
| 34 | - #import "LVCHomePageListModel.h" | |
| 35 | - #import "LVCBannerAndMarqueeModel.h" | |
| 36 | -#include "LVCChannelDetailModel.h" | |
| 37 | -#import "LVCBqWqXgModel.h" | |
| 38 | -#import "LVCCommentModel.h" | |
| 39 | - | |
| 40 | -#import <CNLiveUserSystemSDK/CNLiveUserSystemCenter.h> | |
| 41 | - | |
| 42 | -#import "Common.h" | |
| 43 | -#import "MJExtension.h"// | |
| 44 | -#import "CNLiveMacro.h"// | |
| 45 | -#import "NSNumber+ScaleHeight.h"//高度适配 | |
| 46 | -#import "AFNetworking.h" | |
| 47 | -#import "UIImageView+WebCache.h" | |
| 48 | -//#import "NSDictionary+Safety.h" | |
| 49 | -#import "Tools.h" | |
| 50 | -#import "MJRefresh.h" | |
| 51 | -#import <ImageIO/ImageIO.h>// | |
| 52 | -#import "UIImage+ScaleImageSize.h"// | |
| 53 | -//#import "CNRefreshHeader.h"// | |
| 54 | -#import "UIView+ViewController.h" | |
| 55 | -//#import "MBProgressHUD.h" | |
| 56 | -#import "SevenSwitch.h" | |
| 57 | -#import "DESUtility.h" | |
| 58 | -//#import "CNLiveXMPPMessage.h" | |
| 59 | -#import "UserInformationModel.h" | |
| 60 | -//#import "EncryptAndDecrypt.h" | |
| 61 | -//#import "Utility.h" | |
| 62 | -//#import "CNLiveShare.h" | |
| 63 | -//#import "ShareObject.h" | |
| 64 | -#import "NSString+UrlEncode.h" | |
| 65 | -#import "NSDictionary+Safety.h" | |
| 66 | -#import "UserTools.h" | |
| 67 | -#import "UIImage+GIF.h" | |
| 68 | -#import "ZXUIKit.h"// | |
| 69 | -#import "UIButton+createButton.h"// | |
| 70 | -#import "ProgramModel.h" | |
| 71 | -#import "WXApi.h" | |
| 72 | -#import "WeiboSDK.h" | |
| 32 | + #import "LVCCommentModel.h" | |
| 33 | + #import <CNLiveUserSystemSDK/CNLiveUserSystemCenter.h> | |
| 34 | + | |
| 35 | + #import "Common.h" | |
| 36 | + #import "MJExtension.h" | |
| 37 | + #import "CNLiveMacro.h" | |
| 38 | + #import "NSNumber+ScaleHeight.h" | |
| 39 | + #import "AFNetworking.h" | |
| 40 | + #import "UIImageView+WebCache.h" | |
| 41 | + #import "Tools.h" | |
| 42 | + #import "MJRefresh.h" | |
| 43 | + #import <ImageIO/ImageIO.h> | |
| 44 | + #import "UIImage+ScaleImageSize.h" | |
| 45 | + #import "UIView+ViewController.h" | |
| 46 | + #import "SevenSwitch.h" | |
| 47 | + #import "DESUtility.h" | |
| 48 | + #import "UserInformationModel.h" | |
| 49 | + #import "NSString+UrlEncode.h" | |
| 50 | + #import "NSDictionary+Safety.h" | |
| 51 | + #import "UserTools.h" | |
| 52 | + #import "UIImage+GIF.h" | |
| 53 | + #import "ZXUIKit.h" | |
| 54 | + #import "UIButton+createButton.h" | |
| 55 | + #import "ProgramModel.h" | |
| 56 | + #import "WXApi.h" | |
| 57 | + #import "WeiboSDK.h" | |
| 73 | 58 | |
| 74 | 59 | |
| 75 | 60 | #if TARGET_OS_IPHONE | ... | ... |
LiveVideoCloud/Resource/JsonFile.json deleted
100644 → 0
| 1 | -{"banner":[{"mediaId":"88da3d45ad2f2745c586ea51b32b2121a6","subTitle":"大型现代原创木偶剧《飞吧 丹顶鹤》","title":"原创木偶剧飞吧丹顶鹤","picType":"small","img":"http://y1.cnliveimg.com:8080/image/itv/2016/0601/da3d45ad2f2745c586ea51b32b2121a6_100.jpg","docID":"618405","vipFlag":"0","type":"program","url":"http://www.cnlive.com/liveshow/v_gyytqnbqgu.html"},{"mediaId":"liveshow","subTitle":"最打动人心的主题音乐故事访谈","title":"liveshow直播:我的音乐故事","picType":"small","img":"http://yweb3.cnliveimg.com/img/cnlive/160129105318359_583.jpg","docID":"408481","vipFlag":"0","type":"live","url":"http://live.cnlive.com/liveshow.html"},{"mediaId":"vhd","subTitle":"热点大事件,萌宠陪你开心唠!体验不一样的资讯直播,戳这里!","title":"侃侃总动员","picType":"small","img":"http://yweb1.cnliveimg.com/img/cnlive/160323165036485_383.jpg","docID":"411530","vipFlag":"0","type":"live","url":"http://live.cnlive.com/vhd.html"}],"marquee":[{"mediaId":"dongnanweishi","subTitle":"海峡西岸经济区主流媒体","title":"东南卫视","picType":"small","img":"http://y1.cnliveimg.com:8080/img/cnlive/public/141110143521312_163.jpg","docID":"410681","vipFlag":"0","type":"live","url":"http://live.cnlive.com/dongnanweishi.html"}],"channels":[{"cid":"live_/tctv/","title":"自主特色直播","channelType":"H","programs":[{"mediaId":"61ca3833365f4fe2975c7db183b61892","subTitle":"互动直播测试","title":"侃侃总动员","desc":"主持人与虚拟萌物合作直播","picType":"small","currentPlay":"神秘原始部落制木乃伊","img":"http://yweb1.cnliveimg.com/img/cnlive/160118114000423_284.jpg","docID":"573134","vipFlag":"0","type":"album","itemId":"581018","url":"http://www.cnlive.com/news/v_gu3tgmjtgq.html","nextPlay":"地球上最热的地狱盐矿"},{"mediaId":"xbxjy","subTitle":"小笨熊教育","title":"小笨熊教育","desc":"为3至12岁儿童精心打造优质的教育频道,包含经典古诗学习,国学教育智力培养,行为教育,文化教育,行为规范、安全教育等内容,其中也不少的精彩的童话故事和家长和儿童之间可以互动的亲子互动内容。节目高清流畅,内容全部正向有趣,是目前最好的儿童教育频道。","picType":"small","currentPlay":"不小心割破手指该怎么办","img":"http://yweb2.cnliveimg.com/cnlive/public/160530111952623_945.jpg","docID":"617301","vipFlag":"0","type":"live","itemId":"595600","url":"http://live.cnlive.com/xbxjy.html","nextPlay":"上下楼梯要注意什么"},{"mediaId":"liveshow","subTitle":"最打动人心的主题音乐故事访谈","title":"LiveShow","desc":"最震撼的演唱会直播、最打动人心的主题音乐故事访谈、最搞笑的剧场话剧直播!","picType":"small","currentPlay":"20151020我的音乐故事音乐小神兽汪苏泷","img":"http://yweb0.cnliveimg.com/cnlive/public/150417133551285_693.png","docID":"408481","vipFlag":"0","type":"live","itemId":"581019","url":"http://live.cnlive.com/liveshow.html","nextPlay":"20151113摇滚男孩王晓天做客音乐故事!"},{"mediaId":"news","subTitle":"","title":"快新闻","desc":"时政、社会、财经、文体、奇趣等快新闻,最热门、最新鲜、最快捷,互动直达!","picType":"small","currentPlay":"南非已开始退出国际刑事法院","img":"http://yweb1.cnliveimg.com/img/cnlive/160121113653827_867.png","docID":"285697","vipFlag":"0","type":"live","itemId":"581021","url":"http://live.cnlive.com/news.html","nextPlay":"少年宿舍坠楼而亡疑在校受辱"},{"mediaId":"eyule","subTitle":"","title":"e娱乐","desc":"热辣娱文、新鲜速递、聊电影、说大片,特色直播精彩呈现!","picType":"small","currentPlay":"网络博主斥港媒为谢霆锋洗白","img":"http://yweb2.cnliveimg.com/img/cnlive/160121113659992_585.png","docID":"408480","vipFlag":"0","type":"live","itemId":"581022","url":"http://live.cnlive.com/eyule.html","nextPlay":"袁姗姗陈晓面对潜规则超淡定"},{"mediaId":"chaotiyu","subTitle":"","title":"潮体育","desc":"赛事直播、最新体坛资讯,全方位扫描热点体坛人物、绝色花边!","picType":"small","currentPlay":"情暖你我2017爱在马城","img":"http://yweb3.cnliveimg.com/img/cnlive/160121113706887_696.png","docID":"285698","vipFlag":"0","type":"live","itemId":"581023","url":"http://live.cnlive.com/chaotiyu.html","nextPlay":"策马扬鞭!欢聚“乐在马城”"},{"mediaId":"xuanhanyu","subTitle":"韩剧韩片韩综 有你想看的!","title":"炫韩娱","desc":"韩国动态、思密达帮帮团、搞笑综艺等,第一知晓韩国娱乐动态,尽在炫韩娱直播频道!","picType":"small","currentPlay":"尹施允被鬼吓金赛纶霸气镇场","img":"http://yweb0.cnliveimg.com/cnlive/public/150417133341123_878.png","docID":"408487","vipFlag":"0","type":"live","itemId":"581024","url":"http://live.cnlive.com/xuanhanyu.html","nextPlay":"Eric徐贤真约会玩绑架被抓!"},{"mediaId":"inyuetai","subTitle":"音乐爱好者的完美聚集地","title":"in乐台","desc":"新歌抢线、MV鉴赏、明星访谈,明星亲临现场诉说音乐故事。大咖们邀你一起感受听觉上的饕餮盛宴。","picType":"small","currentPlay":"新单《WeDontTalkAnymore》","img":"http://yweb1.cnliveimg.com/cnlive/public/150417144750615_185.png","docID":"285696","vipFlag":"0","type":"live","itemId":"581025","url":"http://live.cnlive.com/inyuetai.html","nextPlay":"酷玩《AHeadFullOfDreams》"}]},{"cid":"live_/CIBN/","title":"CIBN","channelType":"H","programs":[{"mediaId":"cibn_lvyou","subTitle":"荟聚全球当红明星,最新的音乐资讯","title":"CIBN嗨播","desc":"荟聚全球当红明星,最新的音乐资讯,劲爆的演唱会现场,包罗万象的热门音乐排行榜,足不出户悦享饕餮音乐盛宴。","picType":"small","currentPlay":"夏季音乐季《梦幻与激情》","img":"http://yweb0.cnliveimg.com/cnlive/public/170428170445759_292.jpg","docID":"427049","vipFlag":"0","type":"live","itemId":"689292","url":"http://live.cnlive.com/cibn_lvyou.html","nextPlay":"SNH48 GROUP 2017年度大型青春励志纪录片《我心翱翔》"},{"mediaId":"cibn_dianying","subTitle":"CIBN电影频道","title":"CIBN电影频道","desc":"","picType":"small","currentPlay":"电话谋杀案","img":"http://yweb2.cnliveimg.com/img/cnlive/160120143835091_965.jpg","docID":"427031","vipFlag":"0","type":"live","itemId":"421082","url":"http://live.cnlive.com/cibn_dianying.html","nextPlay":"内心引力 预告片"},{"mediaId":"cibn_weidianying","subTitle":"CIBN微电影","title":"CIBN微电影","desc":"","picType":"small","currentPlay":"二次元 10 探店 拉面 上","img":"http://yweb3.cnliveimg.com/img/cnlive/160120143842769_360.jpg","docID":"427050","vipFlag":"0","type":"live","itemId":"421083","url":"http://live.cnlive.com/cibn_weidianying.html","nextPlay":"脂肪君-02-人鱼线"},{"mediaId":"cibn_rebo","subTitle":"CIBN热播剧场","title":"CIBN热播剧场","desc":"","picType":"small","currentPlay":"一粒红尘10","img":"http://yweb1.cnliveimg.com/img/cnlive/160120143857458_721.jpg","docID":"427032","vipFlag":"0","type":"live","itemId":"421085","url":"http://live.cnlive.com/cibn_rebo.html","nextPlay":"碧生源常箐茶"},{"mediaId":"cibn_jilu","subTitle":"CIBN纪录","title":"CIBN纪录","desc":"","picType":"small","currentPlay":"赞比西河 生命之源","img":"http://yweb2.cnliveimg.com/img/cnlive/160120143906855_603.jpg","docID":"427048","vipFlag":"0","type":"live","itemId":"421086","url":"http://live.cnlive.com/cibn_jilu.html","nextPlay":"CAN TV 广告片"},{"mediaId":"cibn_zongyi","subTitle":"CIBN综艺","title":"CIBN综艺","desc":"","picType":"small","currentPlay":"金古珍藏 频道宣传片","img":"http://yweb3.cnliveimg.com/img/cnlive/160120143913782_912.jpg","docID":"427046","vipFlag":"0","type":"live","itemId":"421087","url":"http://live.cnlive.com/cibn_zongyi.html","nextPlay":"匠作之传播善与美的白瓷菩萨造像"}]}],"errorMessage":"数据加载成功","errorCode":"0"} | |
| 2 | 0 | \ No newline at end of file |