Commit c6a46445a0d244be0e2a5b968531a54122ff2d83

Authored by 张旭
2 parents 7f744f64 94437476

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

# Conflicts:
#	LiveVideoCloud/AppCustoms/Main/ZXTabBarController.m
Showing 37 changed files with 566 additions and 1543 deletions
LiveVideoCloud.xcodeproj/project.pbxproj
... ... @@ -82,26 +82,20 @@
82 82 8178D4191F01FA3600AA78A4 /* CNLivePlayerSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8178D4161F01FA2900AA78A4 /* CNLivePlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
83 83 8178D4241F02043500AA78A4 /* LVCFullScreenPlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D41F1F02043500AA78A4 /* LVCFullScreenPlayerController.m */; };
84 84 8178D4251F02043500AA78A4 /* LVCLivePlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4211F02043500AA78A4 /* LVCLivePlayerController.m */; };
85   - 8178D42F1F02044300AA78A4 /* LVCChannelDetailsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4281F02044300AA78A4 /* LVCChannelDetailsModel.m */; };
86   - 8178D4301F02044300AA78A4 /* LVCChannelsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D42A1F02044300AA78A4 /* LVCChannelsModel.m */; };
87 85 8178D4311F02044300AA78A4 /* LVCChatRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D42C1F02044300AA78A4 /* LVCChatRoomModel.m */; };
88   - 8178D4321F02044300AA78A4 /* LVCProgramModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D42E1F02044300AA78A4 /* LVCProgramModel.m */; };
89 86 8178D44A1F02045500AA78A4 /* CNBarrageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4351F02045500AA78A4 /* CNBarrageManager.m */; };
90 87 8178D44B1F02045500AA78A4 /* CNBarrageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4371F02045500AA78A4 /* CNBarrageView.m */; };
91   - 8178D44C1F02045500AA78A4 /* LVCFirstHeaderReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4391F02045500AA78A4 /* LVCFirstHeaderReusableView.m */; };
92   - 8178D44D1F02045500AA78A4 /* LVCHeaderRollCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D43B1F02045500AA78A4 /* LVCHeaderRollCollectionViewCell.m */; };
93   - 8178D44E1F02045500AA78A4 /* LVCLiveListCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D43D1F02045500AA78A4 /* LVCLiveListCollectionViewCell.m */; };
94   - 8178D44F1F02045500AA78A4 /* LVCMoreSortTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D43F1F02045500AA78A4 /* LVCMoreSortTableViewCell.m */; };
95   - 8178D4501F02045500AA78A4 /* LVCOtherHeaderReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4411F02045500AA78A4 /* LVCOtherHeaderReusableView.m */; };
96 88 8178D4511F02045500AA78A4 /* LVCPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4431F02045500AA78A4 /* LVCPlayer.m */; };
97 89 8178D4521F02045500AA78A4 /* LVCPlayerLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4451F02045500AA78A4 /* LVCPlayerLoadingView.m */; };
98 90 8178D4531F02045500AA78A4 /* LVCRequestFailedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4471F02045500AA78A4 /* LVCRequestFailedView.m */; };
99   - 8178D4541F02045500AA78A4 /* LVCTelevisionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4491F02045500AA78A4 /* LVCTelevisionView.m */; };
100 91 8178D4571F0204D600AA78A4 /* LVCTelevisioController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4561F0204D600AA78A4 /* LVCTelevisioController.m */; };
101 92 8178D4611F02060B00AA78A4 /* LVCChatView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D45A1F02060B00AA78A4 /* LVCChatView.m */; };
102 93 8178D4621F02060B00AA78A4 /* LVCChatViewTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D45C1F02060B00AA78A4 /* LVCChatViewTableViewCell.m */; };
103 94 8178D4631F02060B00AA78A4 /* LVCInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D45E1F02060B00AA78A4 /* LVCInputView.m */; };
104 95 8178D4641F02060B00AA78A4 /* LVCMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4601F02060B00AA78A4 /* LVCMessage.m */; };
  96 + 8178D4681F021C4500AA78A4 /* TelevisionData.json in Resources */ = {isa = PBXBuildFile; fileRef = 8178D4671F021C4500AA78A4 /* TelevisionData.json */; };
  97 + 8178D46B1F021ED800AA78A4 /* LVCTelevisionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D46A1F021ED800AA78A4 /* LVCTelevisionModel.m */; };
  98 + 8178D46E1F0225E500AA78A4 /* LVCTelevisionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D46D1F0225E500AA78A4 /* LVCTelevisionCell.m */; };
105 99 81A483081E88B6140097A80A /* UIView+ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81A483071E88B6140097A80A /* UIView+ViewController.m */; };
106 100 81DFC4261F0113B40029BCB3 /* JsonFile.json in Resources */ = {isa = PBXBuildFile; fileRef = 81DFC4251F0113B40029BCB3 /* JsonFile.json */; };
107 101 81F1C8381E8BBDDA0085C2B8 /* MHPagingScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 81F1C8371E8BBDDA0085C2B8 /* MHPagingScrollView.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
... ... @@ -200,7 +194,6 @@
200 194 D217A24B1E7B76C7003B44CB /* PresentViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D217A2491E7B76C7003B44CB /* PresentViewCell.m */; };
201 195 D217A24E1E7B77C7003B44CB /* ComboCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D217A24D1E7B77C7003B44CB /* ComboCell.m */; };
202 196 D219E86B1EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D219E86A1EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.m */; };
203   - D219E86E1F01002400650F38 /* LVCVodPlayerListView.m in Sources */ = {isa = PBXBuildFile; fileRef = D219E86D1F01002400650F38 /* LVCVodPlayerListView.m */; };
204 197 D224B1971E826ED800CC61D0 /* ChatBarrageAnimAction.m in Sources */ = {isa = PBXBuildFile; fileRef = D224B1961E826ED800CC61D0 /* ChatBarrageAnimAction.m */; };
205 198 D22830F11E778C0F00627701 /* LiveBaseView.m in Sources */ = {isa = PBXBuildFile; fileRef = D22830F01E778C0F00627701 /* LiveBaseView.m */; };
206 199 D22830FC1E77C2D900627701 /* BottomToolView.m in Sources */ = {isa = PBXBuildFile; fileRef = D22830FB1E77C2D900627701 /* BottomToolView.m */; };
... ... @@ -262,11 +255,9 @@
262 255 D2CBC13B1ECC157A00E00279 /* LVCVerifyLiveAuthService.m in Sources */ = {isa = PBXBuildFile; fileRef = D2CBC13A1ECC157A00E00279 /* LVCVerifyLiveAuthService.m */; };
263 256 D2D7D18D1E8A581000217771 /* timg.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = D2D7D18C1E8A581000217771 /* timg.jpeg */; };
264 257 D2EBC8571F01FF9200F198FB /* LVCCommentModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8561F01FF9200F198FB /* LVCCommentModel.m */; };
265   - D2EBC85A1F02011400F198FB /* LVCVodPlayerTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8591F02011400F198FB /* LVCVodPlayerTableViewCell.m */; };
266 258 D2EBC8641F02105C00F198FB /* LVCHomePageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8631F02105C00F198FB /* LVCHomePageViewController.m */; };
267 259 D2EBC8711F02108000F198FB /* LiveListService.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8661F02108000F198FB /* LiveListService.m */; };
268 260 D2EBC8721F02108000F198FB /* LVCLiveActivityInfoService.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8681F02108000F198FB /* LVCLiveActivityInfoService.m */; };
269   - D2EBC8731F02108000F198FB /* LVCTVLiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC86A1F02108000F198FB /* LVCTVLiveViewController.m */; };
270 261 D2EBC8741F02108000F198FB /* LVCUGCLiveListController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC86C1F02108000F198FB /* LVCUGCLiveListController.m */; };
271 262 D2EBC8751F02108000F198FB /* LVCUGCLiveListView.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC86E1F02108000F198FB /* LVCUGCLiveListView.m */; };
272 263 D2EBC8761F02108000F198FB /* LVCUGCLivePlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8701F02108000F198FB /* LVCUGCLivePlayerController.m */; };
... ... @@ -467,36 +458,18 @@
467 458 8178D41F1F02043500AA78A4 /* LVCFullScreenPlayerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCFullScreenPlayerController.m; sourceTree = "<group>"; };
468 459 8178D4201F02043500AA78A4 /* LVCLivePlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCLivePlayerController.h; sourceTree = "<group>"; };
469 460 8178D4211F02043500AA78A4 /* LVCLivePlayerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCLivePlayerController.m; sourceTree = "<group>"; };
470   - 8178D4271F02044300AA78A4 /* LVCChannelDetailsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCChannelDetailsModel.h; sourceTree = "<group>"; };
471   - 8178D4281F02044300AA78A4 /* LVCChannelDetailsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCChannelDetailsModel.m; sourceTree = "<group>"; };
472   - 8178D4291F02044300AA78A4 /* LVCChannelsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCChannelsModel.h; sourceTree = "<group>"; };
473   - 8178D42A1F02044300AA78A4 /* LVCChannelsModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCChannelsModel.m; sourceTree = "<group>"; };
474 461 8178D42B1F02044300AA78A4 /* LVCChatRoomModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCChatRoomModel.h; sourceTree = "<group>"; };
475 462 8178D42C1F02044300AA78A4 /* LVCChatRoomModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCChatRoomModel.m; sourceTree = "<group>"; };
476   - 8178D42D1F02044300AA78A4 /* LVCProgramModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCProgramModel.h; sourceTree = "<group>"; };
477   - 8178D42E1F02044300AA78A4 /* LVCProgramModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCProgramModel.m; sourceTree = "<group>"; };
478 463 8178D4341F02045500AA78A4 /* CNBarrageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNBarrageManager.h; sourceTree = "<group>"; };
479 464 8178D4351F02045500AA78A4 /* CNBarrageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNBarrageManager.m; sourceTree = "<group>"; };
480 465 8178D4361F02045500AA78A4 /* CNBarrageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNBarrageView.h; sourceTree = "<group>"; };
481 466 8178D4371F02045500AA78A4 /* CNBarrageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNBarrageView.m; sourceTree = "<group>"; };
482   - 8178D4381F02045500AA78A4 /* LVCFirstHeaderReusableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCFirstHeaderReusableView.h; sourceTree = "<group>"; };
483   - 8178D4391F02045500AA78A4 /* LVCFirstHeaderReusableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCFirstHeaderReusableView.m; sourceTree = "<group>"; };
484   - 8178D43A1F02045500AA78A4 /* LVCHeaderRollCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCHeaderRollCollectionViewCell.h; sourceTree = "<group>"; };
485   - 8178D43B1F02045500AA78A4 /* LVCHeaderRollCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCHeaderRollCollectionViewCell.m; sourceTree = "<group>"; };
486   - 8178D43C1F02045500AA78A4 /* LVCLiveListCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCLiveListCollectionViewCell.h; sourceTree = "<group>"; };
487   - 8178D43D1F02045500AA78A4 /* LVCLiveListCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCLiveListCollectionViewCell.m; sourceTree = "<group>"; };
488   - 8178D43E1F02045500AA78A4 /* LVCMoreSortTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCMoreSortTableViewCell.h; sourceTree = "<group>"; };
489   - 8178D43F1F02045500AA78A4 /* LVCMoreSortTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCMoreSortTableViewCell.m; sourceTree = "<group>"; };
490   - 8178D4401F02045500AA78A4 /* LVCOtherHeaderReusableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCOtherHeaderReusableView.h; sourceTree = "<group>"; };
491   - 8178D4411F02045500AA78A4 /* LVCOtherHeaderReusableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCOtherHeaderReusableView.m; sourceTree = "<group>"; };
492 467 8178D4421F02045500AA78A4 /* LVCPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCPlayer.h; sourceTree = "<group>"; };
493 468 8178D4431F02045500AA78A4 /* LVCPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCPlayer.m; sourceTree = "<group>"; };
494 469 8178D4441F02045500AA78A4 /* LVCPlayerLoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCPlayerLoadingView.h; sourceTree = "<group>"; };
495 470 8178D4451F02045500AA78A4 /* LVCPlayerLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCPlayerLoadingView.m; sourceTree = "<group>"; };
496 471 8178D4461F02045500AA78A4 /* LVCRequestFailedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCRequestFailedView.h; sourceTree = "<group>"; };
497 472 8178D4471F02045500AA78A4 /* LVCRequestFailedView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCRequestFailedView.m; sourceTree = "<group>"; };
498   - 8178D4481F02045500AA78A4 /* LVCTelevisionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCTelevisionView.h; sourceTree = "<group>"; };
499   - 8178D4491F02045500AA78A4 /* LVCTelevisionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCTelevisionView.m; sourceTree = "<group>"; };
500 473 8178D4551F0204D600AA78A4 /* LVCTelevisioController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCTelevisioController.h; sourceTree = "<group>"; };
501 474 8178D4561F0204D600AA78A4 /* LVCTelevisioController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCTelevisioController.m; sourceTree = "<group>"; };
502 475 8178D4591F02060B00AA78A4 /* LVCChatView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCChatView.h; sourceTree = "<group>"; };
... ... @@ -507,6 +480,11 @@
507 480 8178D45E1F02060B00AA78A4 /* LVCInputView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCInputView.m; sourceTree = "<group>"; };
508 481 8178D45F1F02060B00AA78A4 /* LVCMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCMessage.h; sourceTree = "<group>"; };
509 482 8178D4601F02060B00AA78A4 /* LVCMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCMessage.m; sourceTree = "<group>"; };
  483 + 8178D4671F021C4500AA78A4 /* TelevisionData.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = TelevisionData.json; sourceTree = "<group>"; };
  484 + 8178D4691F021ED800AA78A4 /* LVCTelevisionModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCTelevisionModel.h; sourceTree = "<group>"; };
  485 + 8178D46A1F021ED800AA78A4 /* LVCTelevisionModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCTelevisionModel.m; sourceTree = "<group>"; };
  486 + 8178D46C1F0225E500AA78A4 /* LVCTelevisionCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCTelevisionCell.h; sourceTree = "<group>"; };
  487 + 8178D46D1F0225E500AA78A4 /* LVCTelevisionCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCTelevisionCell.m; sourceTree = "<group>"; };
510 488 81A483061E88B6140097A80A /* UIView+ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+ViewController.h"; sourceTree = "<group>"; };
511 489 81A483071E88B6140097A80A /* UIView+ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+ViewController.m"; sourceTree = "<group>"; };
512 490 81DFC4251F0113B40029BCB3 /* JsonFile.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = JsonFile.json; sourceTree = "<group>"; };
... ... @@ -716,8 +694,6 @@
716 694 D217A24D1E7B77C7003B44CB /* ComboCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ComboCell.m; path = Present/ComboCell.m; sourceTree = "<group>"; };
717 695 D219E8691EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCBigHorizontalCollectionViewCell.h; sourceTree = "<group>"; };
718 696 D219E86A1EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCBigHorizontalCollectionViewCell.m; sourceTree = "<group>"; };
719   - D219E86C1F01002400650F38 /* LVCVodPlayerListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCVodPlayerListView.h; sourceTree = "<group>"; };
720   - D219E86D1F01002400650F38 /* LVCVodPlayerListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCVodPlayerListView.m; sourceTree = "<group>"; };
721 697 D224B1951E826ED800CC61D0 /* ChatBarrageAnimAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatBarrageAnimAction.h; sourceTree = "<group>"; };
722 698 D224B1961E826ED800CC61D0 /* ChatBarrageAnimAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatBarrageAnimAction.m; sourceTree = "<group>"; };
723 699 D22830EF1E778C0F00627701 /* LiveBaseView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveBaseView.h; sourceTree = "<group>"; };
... ... @@ -828,16 +804,12 @@
828 804 D2D7D18C1E8A581000217771 /* timg.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = timg.jpeg; sourceTree = "<group>"; };
829 805 D2EBC8551F01FF9200F198FB /* LVCCommentModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCCommentModel.h; sourceTree = "<group>"; };
830 806 D2EBC8561F01FF9200F198FB /* LVCCommentModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCCommentModel.m; sourceTree = "<group>"; };
831   - D2EBC8581F02011400F198FB /* LVCVodPlayerTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCVodPlayerTableViewCell.h; sourceTree = "<group>"; };
832   - D2EBC8591F02011400F198FB /* LVCVodPlayerTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCVodPlayerTableViewCell.m; sourceTree = "<group>"; };
833 807 D2EBC8621F02105C00F198FB /* LVCHomePageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCHomePageViewController.h; sourceTree = "<group>"; };
834 808 D2EBC8631F02105C00F198FB /* LVCHomePageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCHomePageViewController.m; sourceTree = "<group>"; };
835 809 D2EBC8651F02108000F198FB /* LiveListService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveListService.h; sourceTree = "<group>"; };
836 810 D2EBC8661F02108000F198FB /* LiveListService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LiveListService.m; sourceTree = "<group>"; };
837 811 D2EBC8671F02108000F198FB /* LVCLiveActivityInfoService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCLiveActivityInfoService.h; sourceTree = "<group>"; };
838 812 D2EBC8681F02108000F198FB /* LVCLiveActivityInfoService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCLiveActivityInfoService.m; sourceTree = "<group>"; };
839   - D2EBC8691F02108000F198FB /* LVCTVLiveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCTVLiveViewController.h; sourceTree = "<group>"; };
840   - D2EBC86A1F02108000F198FB /* LVCTVLiveViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCTVLiveViewController.m; sourceTree = "<group>"; };
841 813 D2EBC86B1F02108000F198FB /* LVCUGCLiveListController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLiveListController.h; sourceTree = "<group>"; };
842 814 D2EBC86C1F02108000F198FB /* LVCUGCLiveListController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLiveListController.m; sourceTree = "<group>"; };
843 815 D2EBC86D1F02108000F198FB /* LVCUGCLiveListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLiveListView.h; sourceTree = "<group>"; };
... ... @@ -1164,14 +1136,10 @@
1164 1136 8178D41C1F02036200AA78A4 /* Model */ = {
1165 1137 isa = PBXGroup;
1166 1138 children = (
1167   - 8178D4271F02044300AA78A4 /* LVCChannelDetailsModel.h */,
1168   - 8178D4281F02044300AA78A4 /* LVCChannelDetailsModel.m */,
1169   - 8178D4291F02044300AA78A4 /* LVCChannelsModel.h */,
1170   - 8178D42A1F02044300AA78A4 /* LVCChannelsModel.m */,
1171 1139 8178D42B1F02044300AA78A4 /* LVCChatRoomModel.h */,
1172 1140 8178D42C1F02044300AA78A4 /* LVCChatRoomModel.m */,
1173   - 8178D42D1F02044300AA78A4 /* LVCProgramModel.h */,
1174   - 8178D42E1F02044300AA78A4 /* LVCProgramModel.m */,
  1141 + 8178D4691F021ED800AA78A4 /* LVCTelevisionModel.h */,
  1142 + 8178D46A1F021ED800AA78A4 /* LVCTelevisionModel.m */,
1175 1143 );
1176 1144 path = Model;
1177 1145 sourceTree = "<group>";
... ... @@ -1183,22 +1151,12 @@
1183 1151 8178D4331F02045500AA78A4 /* Barrage */,
1184 1152 8178D4421F02045500AA78A4 /* LVCPlayer.h */,
1185 1153 8178D4431F02045500AA78A4 /* LVCPlayer.m */,
1186   - 8178D4381F02045500AA78A4 /* LVCFirstHeaderReusableView.h */,
1187   - 8178D4391F02045500AA78A4 /* LVCFirstHeaderReusableView.m */,
1188   - 8178D43A1F02045500AA78A4 /* LVCHeaderRollCollectionViewCell.h */,
1189   - 8178D43B1F02045500AA78A4 /* LVCHeaderRollCollectionViewCell.m */,
1190   - 8178D43C1F02045500AA78A4 /* LVCLiveListCollectionViewCell.h */,
1191   - 8178D43D1F02045500AA78A4 /* LVCLiveListCollectionViewCell.m */,
1192   - 8178D43E1F02045500AA78A4 /* LVCMoreSortTableViewCell.h */,
1193   - 8178D43F1F02045500AA78A4 /* LVCMoreSortTableViewCell.m */,
1194   - 8178D4401F02045500AA78A4 /* LVCOtherHeaderReusableView.h */,
1195   - 8178D4411F02045500AA78A4 /* LVCOtherHeaderReusableView.m */,
  1154 + 8178D46C1F0225E500AA78A4 /* LVCTelevisionCell.h */,
  1155 + 8178D46D1F0225E500AA78A4 /* LVCTelevisionCell.m */,
1196 1156 8178D4441F02045500AA78A4 /* LVCPlayerLoadingView.h */,
1197 1157 8178D4451F02045500AA78A4 /* LVCPlayerLoadingView.m */,
1198 1158 8178D4461F02045500AA78A4 /* LVCRequestFailedView.h */,
1199 1159 8178D4471F02045500AA78A4 /* LVCRequestFailedView.m */,
1200   - 8178D4481F02045500AA78A4 /* LVCTelevisionView.h */,
1201   - 8178D4491F02045500AA78A4 /* LVCTelevisionView.m */,
1202 1160 );
1203 1161 path = View;
1204 1162 sourceTree = "<group>";
... ... @@ -2079,6 +2037,7 @@
2079 2037 D25BF88A1E7F7F77007FB138 /* Resource */ = {
2080 2038 isa = PBXGroup;
2081 2039 children = (
  2040 + 8178D4671F021C4500AA78A4 /* TelevisionData.json */,
2082 2041 81DFC4251F0113B40029BCB3 /* JsonFile.json */,
2083 2042 D25BF88C1E7F7F77007FB138 /* Images */,
2084 2043 D25BF88B1E7F7F77007FB138 /* Fonts */,
... ... @@ -2182,10 +2141,6 @@
2182 2141 D2888DAA1E6EC014003A77C8 /* View */ = {
2183 2142 isa = PBXGroup;
2184 2143 children = (
2185   - D219E86C1F01002400650F38 /* LVCVodPlayerListView.h */,
2186   - D219E86D1F01002400650F38 /* LVCVodPlayerListView.m */,
2187   - D2EBC8581F02011400F198FB /* LVCVodPlayerTableViewCell.h */,
2188   - D2EBC8591F02011400F198FB /* LVCVodPlayerTableViewCell.m */,
2189 2144 );
2190 2145 path = View;
2191 2146 sourceTree = "<group>";
... ... @@ -2222,8 +2177,6 @@
2222 2177 D2EBC8661F02108000F198FB /* LiveListService.m */,
2223 2178 D2EBC8671F02108000F198FB /* LVCLiveActivityInfoService.h */,
2224 2179 D2EBC8681F02108000F198FB /* LVCLiveActivityInfoService.m */,
2225   - D2EBC8691F02108000F198FB /* LVCTVLiveViewController.h */,
2226   - D2EBC86A1F02108000F198FB /* LVCTVLiveViewController.m */,
2227 2180 D2EBC86B1F02108000F198FB /* LVCUGCLiveListController.h */,
2228 2181 D2EBC86C1F02108000F198FB /* LVCUGCLiveListController.m */,
2229 2182 D2EBC86D1F02108000F198FB /* LVCUGCLiveListView.h */,
... ... @@ -2375,6 +2328,7 @@
2375 2328 D25BF8A51E80EC76007FB138 /* 头像.jpg in Resources */,
2376 2329 D2029CC91E6EADE10027CD92 /* SVProgressHUD.bundle in Resources */,
2377 2330 D2575C801E76A4F300E3A8FC /* resource.bundle in Resources */,
  2331 + 8178D4681F021C4500AA78A4 /* TelevisionData.json in Resources */,
2378 2332 D2029B941E6EAAA50027CD92 /* LaunchScreen.storyboard in Resources */,
2379 2333 D2029B911E6EAAA50027CD92 /* animation.xcassets in Resources */,
2380 2334 D2D7D18D1E8A581000217771 /* timg.jpeg in Resources */,
... ... @@ -2421,7 +2375,6 @@
2421 2375 8178D4241F02043500AA78A4 /* LVCFullScreenPlayerController.m in Sources */,
2422 2376 D2029C861E6EADE10027CD92 /* Tools.m in Sources */,
2423 2377 4B42A6C41EC00CC800DA09D7 /* UIAlertView+Blocks.m in Sources */,
2424   - 8178D44E1F02045500AA78A4 /* LVCLiveListCollectionViewCell.m in Sources */,
2425 2378 D214CB521EF7CB310014EEBA /* LVCChannelPagingView.m in Sources */,
2426 2379 4B45CE861EB86A590079AFB7 /* LVCLoginShowView.m in Sources */,
2427 2380 D2029CA01E6EADE10027CD92 /* NSObject+MJProperty.m in Sources */,
... ... @@ -2430,13 +2383,11 @@
2430 2383 4B45CE981EB86A760079AFB7 /* UILabel+createLabel.m in Sources */,
2431 2384 D2029C9C1E6EADE10027CD92 /* MJPropertyType.m in Sources */,
2432 2385 D22831091E77D8D500627701 /* GiftModel.m in Sources */,
2433   - D2EBC85A1F02011400F198FB /* LVCVodPlayerTableViewCell.m in Sources */,
2434 2386 D23BBDBE1EF8ED4A002FE0B8 /* LVCChannelDetailModel.m in Sources */,
2435 2387 D2029CCD1E6EADE10027CD92 /* SearchModel.m in Sources */,
2436 2388 4BD8560F1EBACEF80082061D /* CNLiveWebView.m in Sources */,
2437 2389 810B65051E779B1F00133E15 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */,
2438 2390 D2029CCB1E6EADE10027CD92 /* SVRadialGradientLayer.m in Sources */,
2439   - 8178D4541F02045500AA78A4 /* LVCTelevisionView.m in Sources */,
2440 2391 D23696841E7FC6A900E4BF71 /* chatListCell.m in Sources */,
2441 2392 4B45CE7B1EB86A590079AFB7 /* MinePersonalDataController.m in Sources */,
2442 2393 D2029CAF1E6EADE10027CD92 /* MJRefreshStateHeader.m in Sources */,
... ... @@ -2446,7 +2397,6 @@
2446 2397 4B45CE7D1EB86A590079AFB7 /* ModifyInfomationController.m in Sources */,
2447 2398 D23BBDBB1EF8E8B2002FE0B8 /* LVCBannerAndMarqueeModel.m in Sources */,
2448 2399 D2029CA41E6EADE10027CD92 /* MJRefreshComponent.m in Sources */,
2449   - 8178D42F1F02044300AA78A4 /* LVCChannelDetailsModel.m in Sources */,
2450 2400 D2575C7A1E76A4F300E3A8FC /* NHCarViews.m in Sources */,
2451 2401 8178D44A1F02045500AA78A4 /* CNBarrageManager.m in Sources */,
2452 2402 D209AD711EC583D100D82E3B /* MineAccountController.m in Sources */,
... ... @@ -2499,7 +2449,6 @@
2499 2449 4BD856181EBAD35C0082061D /* NSDictionary+Safety.m in Sources */,
2500 2450 4BD856011EBACD530082061D /* AFURLResponseSerialization.m in Sources */,
2501 2451 D2575C4A1E7685DE00E3A8FC /* UIView+Bubbling.m in Sources */,
2502   - 8178D4301F02044300AA78A4 /* LVCChannelsModel.m in Sources */,
2503 2452 D2EBC8571F01FF9200F198FB /* LVCCommentModel.m in Sources */,
2504 2453 D23BBDB81EF8D15D002FE0B8 /* LVCMainHeaderCollectionReusableView.m in Sources */,
2505 2454 D2029CA61E6EADE10027CD92 /* MJRefreshHeader.m in Sources */,
... ... @@ -2523,7 +2472,6 @@
2523 2472 810B65071E779B1F00133E15 /* ViewController+MASAdditions.m in Sources */,
2524 2473 D2029C9A1E6EADE10027CD92 /* MJProperty.m in Sources */,
2525 2474 4BD856031EBACD530082061D /* AFNetworkActivityIndicatorManager.m in Sources */,
2526   - 8178D44D1F02045500AA78A4 /* LVCHeaderRollCollectionViewCell.m in Sources */,
2527 2475 4BD855CD1EBAC4B70082061D /* CNLiveKeychainWrapper.m in Sources */,
2528 2476 D2029CB91E6EADE10027CD92 /* SDWebImageCompat.m in Sources */,
2529 2477 D2029CB61E6EADE10027CD92 /* MKAnnotationView+WebCache.m in Sources */,
... ... @@ -2548,7 +2496,6 @@
2548 2496 8178D4641F02060B00AA78A4 /* LVCMessage.m in Sources */,
2549 2497 4B45CE8B1EB86A590079AFB7 /* LVCTextField.m in Sources */,
2550 2498 D2575C461E76857100E3A8FC /* LVCAnimationManager.m in Sources */,
2551   - 8178D4321F02044300AA78A4 /* LVCProgramModel.m in Sources */,
2552 2499 D2CBC13B1ECC157A00E00279 /* LVCVerifyLiveAuthService.m in Sources */,
2553 2500 D2029D041E6EAE2E0027CD92 /* UILabel+ContentSize.m in Sources */,
2554 2501 4B45CE7C1EB86A590079AFB7 /* MineSettingViewController.m in Sources */,
... ... @@ -2560,9 +2507,9 @@
2560 2507 D2029C9F1E6EADE10027CD92 /* NSObject+MJKeyValue.m in Sources */,
2561 2508 D209AD6E1EC583B700D82E3B /* MineMessageController.m in Sources */,
2562 2509 D25BF8A01E80C4BD007FB138 /* UIImage+LVCVagueImage.m in Sources */,
2563   - 8178D44C1F02045500AA78A4 /* LVCFirstHeaderReusableView.m in Sources */,
2564 2510 D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */,
2565 2511 810B65021E779B1F00133E15 /* MASViewAttribute.m in Sources */,
  2512 + 8178D46B1F021ED800AA78A4 /* LVCTelevisionModel.m in Sources */,
2566 2513 D2B7B2511E8247D400ED084E /* ChatBarrageManager.m in Sources */,
2567 2514 D2029CAC1E6EADE10027CD92 /* MJRefreshBackStateFooter.m in Sources */,
2568 2515 D2029CB11E6EADE10027CD92 /* MJRefreshConst.m in Sources */,
... ... @@ -2581,11 +2528,9 @@
2581 2528 D2029BCA1E6EADD70027CD92 /* BaseModel.m in Sources */,
2582 2529 D25BF87B1E7B8A82007FB138 /* SliderView.m in Sources */,
2583 2530 810B65041E779B1F00133E15 /* NSArray+MASAdditions.m in Sources */,
2584   - 8178D4501F02045500AA78A4 /* LVCOtherHeaderReusableView.m in Sources */,
2585 2531 D2029D031E6EAE2E0027CD92 /* UIImage+ZXExtension.m in Sources */,
2586 2532 4BD855FC1EBACD530082061D /* AFHTTPSessionManager.m in Sources */,
2587 2533 4B45CE841EB86A590079AFB7 /* ModifyCommonView.m in Sources */,
2588   - D219E86E1F01002400650F38 /* LVCVodPlayerListView.m in Sources */,
2589 2534 4BD856081EBACD530082061D /* UIProgressView+AFNetworking.m in Sources */,
2590 2535 D24571581E8393EB00AA85D6 /* UIImageView+ZXExtension.m in Sources */,
2591 2536 D2029D0A1E6EAE2E0027CD92 /* ZXServerUrl.m in Sources */,
... ... @@ -2624,11 +2569,9 @@
2624 2569 4B42A6C71EC0171800DA09D7 /* PlayRecordCell.m in Sources */,
2625 2570 D217A24E1E7B77C7003B44CB /* ComboCell.m in Sources */,
2626 2571 D24CFC201EFA092300AA6ADB /* JBBannerView.m in Sources */,
2627   - 8178D44F1F02045500AA78A4 /* LVCMoreSortTableViewCell.m in Sources */,
2628 2572 D2029CBD1E6EADE10027CD92 /* SDWebImageManager.m in Sources */,
2629 2573 D2029CB41E6EADE10027CD92 /* UIView+MJExtension.m in Sources */,
2630 2574 D2EBC8751F02108000F198FB /* LVCUGCLiveListView.m in Sources */,
2631   - D2EBC8731F02108000F198FB /* LVCTVLiveViewController.m in Sources */,
2632 2575 81FB5B3C1E7A6FFC00F98E1D /* SevenSwitch.m in Sources */,
2633 2576 D2EBC8761F02108000F198FB /* LVCUGCLivePlayerController.m in Sources */,
2634 2577 D2029CA91E6EADE10027CD92 /* MJRefreshAutoStateFooter.m in Sources */,
... ... @@ -2645,6 +2588,7 @@
2645 2588 D2888D941E6EB8B4003A77C8 /* LVCTabBar.m in Sources */,
2646 2589 4B45CE771EB86A590079AFB7 /* IDViewController.m in Sources */,
2647 2590 4BD855FF1EBACD530082061D /* AFURLConnectionOperation.m in Sources */,
  2591 + 8178D46E1F0225E500AA78A4 /* LVCTelevisionCell.m in Sources */,
2648 2592 D2B7B2541E824B2D00ED084E /* ChatBarrageView.m in Sources */,
2649 2593 D25530061E7911A800DF38A5 /* GiftAnimationAction.m in Sources */,
2650 2594 4B45CE881EB86A590079AFB7 /* LVCMineShowCell.m in Sources */,
... ...
LiveVideoCloud.xcodeproj/xcuserdata/iOS.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Bucket
  3 + type = "1"
  4 + version = "2.0">
  5 + <Breakpoints>
  6 + <BreakpointProxy
  7 + BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
  8 + <BreakpointContent
  9 + shouldBeEnabled = "Yes"
  10 + ignoreCount = "0"
  11 + continueAfterRunningActions = "No"
  12 + scope = "0"
  13 + stopOnStyle = "0">
  14 + </BreakpointContent>
  15 + </BreakpointProxy>
  16 + </Breakpoints>
  17 +</Bucket>
... ...
LiveVideoCloud/AppCustoms/Main/ZXTabBarController.m
... ... @@ -13,6 +13,7 @@
13 13 #import "LVCTabBar.h"
14 14 #import "LoginViewController.h"
15 15 #import "LVCUGCLiveListController.h"
  16 +#import "LVCTelevisioController.h"
16 17 #import "LVCVodPlayerListController.h"
17 18  
18 19 @interface ZXTabBarController ()<LVCTabBarDelegate>
... ...
LiveVideoCloud/Classes/Sections/PGCSections/Controller/LVCLivePlayerController.h
... ... @@ -7,10 +7,10 @@
7 7 //
8 8  
9 9 #import "BaseViewController.h"
10   -#import "LVCChannelDetailsModel.h"
  10 +#import "LVCTelevisionModel.h"
11 11  
12 12 @interface LVCLivePlayerController : BaseViewController
13 13  
14   -@property (nonatomic, strong) LVCChannelDetailsModel *model;
  14 +@property (nonatomic, strong) LVCTelevisionModel *model;
15 15  
16 16 @end
... ...
LiveVideoCloud/Classes/Sections/PGCSections/Controller/LVCTelevisioController.m
... ... @@ -7,23 +7,15 @@
7 7 //
8 8  
9 9 #import "LVCTelevisioController.h"
10   -#import "LVCLiveListCollectionViewCell.h"
11   -#import "LVCFirstHeaderReusableView.h"
12   -#import "LVCOtherHeaderReusableView.h"
13   -#import "LVCChannelDetailsModel.h"
14   -#import "LVCChannelsModel.h"
15   -#import "LVCLivePlayerController.h"
  10 +#import "LVCTelevisionModel.h"
  11 +#import "LVCTelevisionCell.h"
16 12  
17   -static NSString *cellId = @"LVCLiveListCollectionViewCell";
18   -static NSString *firstHeaderId = @"LVCFirstHeaderReusableView";
19   -static NSString *otherHeaderId = @"LVCOtherHeaderReusableView";
20   -
21   -@interface LVCTelevisioController ()
  13 +@interface LVCTelevisioController ()<UITableViewDelegate, UITableViewDataSource>
  14 +{
  15 + NSMutableArray *_channelsModelArray;
  16 +}
22 17  
23   -@property (nonatomic, strong) UICollectionView *collectionView;
24   -@property (nonatomic, strong) NSArray *bannerModelArray; //banner数据源
25   -@property (nonatomic, strong) NSArray *marqueeModelArray;
26   -@property (nonatomic, strong) NSArray *channelsModelArray;
  18 +@property (nonatomic, strong) UITableView *tableView;
27 19  
28 20 @end
29 21  
... ... @@ -33,166 +25,70 @@ static NSString *otherHeaderId = @&quot;LVCOtherHeaderReusableView&quot;;
33 25 [super viewDidLoad];
34 26 // Do any additional setup after loading the view.
35 27 self.view.backgroundColor = [UIColor whiteColor];
  28 + self.navigationItem.title = @"直播";
  29 + _channelsModelArray = [[NSMutableArray alloc] init];
36 30  
37   - [self.view addSubview:self.collectionView];
  31 + [self.view addSubview:self.tableView];
38 32 [self loadData];
39 33  
40 34 }
41 35  
42   -#pragma mark -
43   -#pragma mark - UICollectionViewDataSource
44   -- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
45   - if (self.channelsModelArray.count > 0) {
46   - return self.channelsModelArray.count + 1;
47   - }
48   - return self.channelsModelArray.count;
49   -}
  36 +- (void)loadData {
50 37  
51   -- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
  38 + NSString *path = [[NSBundle mainBundle] pathForResource:@"TelevisionData" ofType:@"json"];
  39 + NSData *data=[NSData dataWithContentsOfFile:path];
  40 + NSError *error;
  41 + id responseObject=[NSJSONSerialization JSONObjectWithData:data
  42 + options:NSJSONReadingAllowFragments
  43 + error:&error];
52 44  
53   - if (section == 0) {
54   - return 0;
  45 + for (NSDictionary *dataDic in responseObject) {
  46 + LVCTelevisionModel *model = [LVCTelevisionModel mj_objectWithKeyValues:dataDic];
  47 + [_channelsModelArray addObject:model];
55 48 }
56   - LVCChannelsModel *model = self.channelsModelArray[section - 1];
57   -
58   - NSArray *array = model.programs;
59   -
60   - return array.count;
61   -}
62 49  
63   -- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
64   -
65   - LVCLiveListCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellId forIndexPath:indexPath];
66   - LVCChannelsModel *model = _channelsModelArray[indexPath.section - 1];
67   -
68   - LVCChannelDetailsModel *details = model.programs[indexPath.item];
69   -
70   - cell.details = details;
71   -
72   - return cell;
  50 + [_tableView reloadData];
73 51 }
74 52  
75   -- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath {
76   -
77   - if (kind == UICollectionElementKindSectionHeader) {
78   -
79   - if (indexPath.section == 0) {
80   -
81   - LVCFirstHeaderReusableView *firstHeaderView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:firstHeaderId forIndexPath:indexPath];
82   -
83   - firstHeaderView.imageUrls = [self bannerImage];
84   - firstHeaderView.modelArray = self.bannerModelArray;
85   -
86   - return firstHeaderView;
87   - } else {
88   -
89   - LVCOtherHeaderReusableView *otherHeaderView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:otherHeaderId forIndexPath:indexPath];
90   -
91   - LVCChannelsModel *model = _channelsModelArray[indexPath.section - 1];
92   -
93   - otherHeaderView.model = model;
94   -
95   - return otherHeaderView;
96   - }
97   - }
98   - return nil;
  53 +#pragma mark -
  54 +#pragma mark - UITableviewDelegate
  55 +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  56 + return _channelsModelArray.count;
99 57 }
100 58  
101   -- (NSArray <NSURL *>*)bannerImage {
102   -
103   - NSMutableArray *arrayM = [NSMutableArray array];
104   - for (LVCChannelDetailsModel *model in _bannerModelArray) {
105   - NSString *imgStr = model.img;
106   - NSURL *url = [NSURL URLWithString:imgStr];
107   - [arrayM addObject:url];
108   - }
109   - return arrayM.copy;
  59 +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  60 + return SCREEN_WIDTH*9/16+40;
110 61 }
111 62  
112   -- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section {
  63 +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
113 64  
114   - if (section == 0) {
115   - return CGSizeMake(SCREEN_WIDTH, SCREEN_WIDTH * 0.5);
116   - }else {
117   - return CGSizeMake(SCREEN_WIDTH, 47);
  65 + static NSString *cellId = @"LVCTelevisionCell";
  66 + LVCTelevisionCell *cell = [[LVCTelevisionCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId];
  67 + if (!cell) {
  68 + cell = [tableView dequeueReusableCellWithIdentifier:cellId];
118 69 }
119   -}
120   -
121   -#pragma mark -
122   -#pragma mark - UICollectionViewDelegate
123   -- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
124   -
125   - LVCChannelsModel *model = _channelsModelArray[indexPath.section - 1];
126   - LVCChannelDetailsModel *details = model.programs[indexPath.item];
  70 + LVCTelevisionModel *model = [_channelsModelArray objectAtIndex:indexPath.row];
  71 + cell.model = model;
  72 + return cell;
127 73  
128   - LVCLivePlayerController *playVC = [[LVCLivePlayerController alloc] init];
129   - playVC.model = details;
130   - self.navigationController.navigationBar.hidden = YES;
131   - [self.navigationController pushViewController:playVC animated:YES];
132   - self.hidesBottomBarWhenPushed = NO;
133 74 }
134 75  
135   -#pragma mark -
136   -#pragma mark - 加载数据
137   -- (void)loadData {
138   -
139   - NSString *path = [[NSBundle mainBundle] pathForResource:@"JsonFile" ofType:@"json"];
140   - NSData *data=[NSData dataWithContentsOfFile:path];
141   - NSError *error;
142   - id responseObject=[NSJSONSerialization JSONObjectWithData:data
143   - options:NSJSONReadingAllowFragments
144   - error:&error];
145   - // NSLog(@"%@",responseObject);
146   -
147   - if (responseObject[@"channels"] && [responseObject[@"channels"] isKindOfClass:[NSArray class]]) {
148   -
149   - NSMutableArray *arrayM = [[NSMutableArray alloc]init];
150   - for (NSDictionary *dict in responseObject[@"channels"]) {
151   - LVCChannelsModel *model = [LVCChannelsModel mj_objectWithKeyValues:dict];
152   - [arrayM addObject:model];
153   - }
154   - self.channelsModelArray = arrayM;
155   - }
156   - if (responseObject[@"banner"] && [responseObject[@"banner"] isKindOfClass:[NSArray class]]) {
157   -
158   - NSMutableArray *arrayM = [NSMutableArray array];
159   - for (NSDictionary *dict in responseObject[@"banner"]) {
160   - LVCChannelDetailsModel *rollModel = [LVCChannelDetailsModel mj_objectWithKeyValues:dict];
161   - [arrayM addObject:rollModel];
162   - }
163   - self.bannerModelArray = arrayM;
164   - }
165   - [self.collectionView reloadData];
  76 +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
166 77  
167 78 }
168 79  
169 80 #pragma mark -
170 81 #pragma mark - getter
171   -- (UICollectionView *)collectionView {
172   -
173   - if (!_collectionView) {
174   -
175   - UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc]init];
176   - layout.itemSize = CGSizeMake((SCREEN_WIDTH-30)/2, (SCREEN_WIDTH-30)/2*9/16+65);
177   - layout.minimumLineSpacing = 0;
178   - layout.minimumInteritemSpacing = 0;
179   - layout.sectionInset = UIEdgeInsetsMake(6, 10, 0, 10);
180   - _collectionView.showsHorizontalScrollIndicator = NO;
181   -
182   - _collectionView = [[UICollectionView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-64-49) collectionViewLayout:layout];
183   - _collectionView.backgroundColor = [UIColor whiteColor];
184   -
185   - [_collectionView registerClass:[LVCLiveListCollectionViewCell class] forCellWithReuseIdentifier:cellId];
186   - [_collectionView registerClass:[LVCFirstHeaderReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:firstHeaderId];
187   - [_collectionView registerClass:[LVCOtherHeaderReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:otherHeaderId];
188   - _collectionView.scrollsToTop = NO;
189   - _collectionView.dataSource = self;
190   - _collectionView.delegate = self;
  82 +- (UITableView *)tableView
  83 +{
  84 + if (!_tableView) {
  85 + _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-49) style:UITableViewStylePlain];
  86 + _tableView.delegate = self;
  87 + _tableView.dataSource = self;
191 88 }
192   - return _collectionView;
  89 + return _tableView;
193 90 }
194 91  
195   -
196 92 - (void)didReceiveMemoryWarning {
197 93 [super didReceiveMemoryWarning];
198 94 // Dispose of any resources that can be recreated.
... ...
LiveVideoCloud/Classes/Sections/PGCSections/Model/LVCChannelDetailsModel.h deleted 100644 → 0
1   -//
2   -// LVCChannelDetailsModel.h
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import <Foundation/Foundation.h>
10   -
11   -@interface LVCChannelDetailsModel : NSObject
12   -
13   -
14   -// 直播播放 channelId
15   -@property (nonatomic, copy) NSString *mediaId;
16   -// 播放类型 live直播
17   -@property (nonatomic, copy) NSString *type;
18   -// 节目名称
19   -@property (nonatomic, copy) NSString *title;
20   -// 节目详情
21   -@property (nonatomic, copy) NSString *subTitle;
22   -// 节目图片
23   -@property (nonatomic, copy) NSString *img;
24   -// 正在直播
25   -@property (nonatomic, copy) NSString *currentPlay;
26   -// 即将直播
27   -@property (nonatomic, copy) NSString *nextPlay;
28   -// 活动id (???)
29   -@property (nonatomic, copy) NSString *activityId;
30   -@property (nonatomic, copy) NSString *docID;
31   -@property (nonatomic, copy) NSString *desc;
32   -
33   -@end
LiveVideoCloud/Classes/Sections/PGCSections/Model/LVCChannelDetailsModel.m deleted 100644 → 0
1   -//
2   -// LVCChannelDetailsModel.m
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "LVCChannelDetailsModel.h"
10   -
11   -@implementation LVCChannelDetailsModel
12   -
13   -- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
14   -
15   -}
16   -
17   -- (NSString *)description {
18   -
19   - return [NSString stringWithFormat:@"mediaId:%@, type:%@, title:%@, img:%@",_mediaId,_type,_title,_img];
20   -}
21   -
22   -@end
LiveVideoCloud/Classes/Sections/PGCSections/Model/LVCChannelsModel.h deleted 100644 → 0
1   -//
2   -// LVCChannelsModel.h
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import <Foundation/Foundation.h>
10   -#import "LVCChannelDetailsModel.h"
11   -
12   -@interface LVCChannelsModel : NSObject
13   -
14   -@property (nonatomic, copy) NSString *title;
15   -// 列表详情模型数组
16   -@property (nonatomic, strong) NSArray <LVCChannelDetailsModel *> *programs;
17   -@property (nonatomic, copy) NSString *cid;
18   -@end
LiveVideoCloud/Classes/Sections/PGCSections/Model/LVCChannelsModel.m deleted 100644 → 0
1   -//
2   -// LVCChannelsModel.m
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "LVCChannelsModel.h"
10   -
11   -@implementation LVCChannelsModel
12   -
13   -- (void)setValue:(id)value forKey:(NSString *)key {
14   -
15   - if ([key isEqualToString:@"programs"]) {
16   -
17   - NSArray *array = value;
18   -
19   - NSMutableArray *arrayM = [NSMutableArray array];
20   -
21   - for (NSDictionary *dict in array) {
22   -
23   - LVCChannelDetailsModel *model = [[LVCChannelDetailsModel alloc] init];
24   -
25   - [model setValuesForKeysWithDictionary:dict];
26   -
27   - [arrayM addObject:model];
28   - }
29   -
30   - _programs = arrayM.copy;
31   -
32   - return;
33   - }
34   -
35   - [super setValue:value forKey:key];
36   -}
37   -
38   -- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
39   -
40   -}
41   -
42   -- (NSString *)description {
43   - return [NSString stringWithFormat:@"title:%@, programs:%@",_title,_programs];
44   -}
45   -
46   -@end
LiveVideoCloud/Classes/Sections/PGCSections/Model/LVCProgramModel.h deleted 100644 → 0
1   -//
2   -// LVCProgramModel.h
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import <Foundation/Foundation.h>
10   -
11   -@interface LVCProgramModel : NSObject
12   -
13   -@property (nonatomic, strong)NSString *currentPlay;
14   -@property (nonatomic, strong)NSString *desc;
15   -@property (nonatomic, strong)NSString *docID;
16   -@property (nonatomic, strong)NSString *img;
17   -@property (nonatomic, strong)NSString *mediaId;
18   -@property (nonatomic, strong)NSString *nextPlay;
19   -@property (nonatomic, strong)NSString *subTitle;
20   -@property (nonatomic, strong)NSString *title;
21   -@property (nonatomic, strong)NSString *type;
22   -@property (nonatomic, strong)NSString *vipFlag;
23   -
24   -@end
LiveVideoCloud/Classes/Sections/PGCSections/Model/LVCTelevisionModel.h 0 → 100644
  1 +//
  2 +// LVCTelevisionModel.h
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by iOS on 2017/6/27.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface LVCTelevisionModel : NSObject
  12 +
  13 +@property (nonatomic, strong) NSString *docID;
  14 +@property (nonatomic, strong) NSString *title;
  15 +@property (nonatomic, strong) NSString *img;
  16 +@property (nonatomic, strong) NSString *type;
  17 +@property (nonatomic, strong) NSString *mediaId;
  18 +
  19 +@end
... ...
LiveVideoCloud/Classes/Sections/PGCSections/Model/LVCProgramModel.m renamed to LiveVideoCloud/Classes/Sections/PGCSections/Model/LVCTelevisionModel.m
1 1 //
2   -// LVCProgramModel.m
  2 +// LVCTelevisionModel.m
3 3 // LiveVideoCloud
4 4 //
5   -// Created by iOS on 17/3/27.
  5 +// Created by iOS on 2017/6/27.
6 6 // Copyright © 2017年 cnlive. All rights reserved.
7 7 //
8 8  
9   -#import "LVCProgramModel.h"
  9 +#import "LVCTelevisionModel.h"
10 10  
11   -@implementation LVCProgramModel
  11 +@implementation LVCTelevisionModel
12 12  
13 13 @end
... ...
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCFirstHeaderReusableView.h deleted 100644 → 0
1   -//
2   -// LVCFirstHeaderReusableView.h
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import <UIKit/UIKit.h>
10   -#import "LVCChannelDetailsModel.h"
11   -
12   -@interface LVCFirstHeaderReusableView : UICollectionReusableView
13   -
14   -@property (nonatomic, strong) NSArray <NSURL *> *imageUrls;
15   -@property (nonatomic, strong) NSArray <LVCChannelDetailsModel *> *modelArray;
16   -
17   -@end
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCFirstHeaderReusableView.m deleted 100644 → 0
1   -//
2   -// LVCFirstHeaderReusableView.m
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "LVCFirstHeaderReusableView.h"
10   -#import "LVCHeaderRollCollectionViewCell.h"
11   -#import "LVCLivePlayerController.h"
12   -
13   -#define kDataScaleSeed 100
14   -static NSString *cellId = @"cellId";
15   -
16   -@interface CZSlideLayout: UICollectionViewFlowLayout
17   -
18   -@end
19   -@implementation CZSlideLayout
20   -
21   -- (void)prepareLayout {
22   - [super prepareLayout];
23   - self.itemSize = self.collectionView.bounds.size;
24   - self.minimumLineSpacing = 0;
25   - self.minimumInteritemSpacing = 0;
26   - self.scrollDirection = UICollectionViewScrollDirectionHorizontal;
27   -}
28   -@end
29   -
30   -@interface LVCFirstHeaderReusableView ()<UICollectionViewDelegate,UICollectionViewDataSource>
31   -{
32   - // 定时器
33   - NSTimer *_timer;
34   - // 定时器触发时间
35   - NSTimeInterval _timerDuration;
36   -}
37   -
38   -@property (nonatomic, weak) UICollectionView *collectionView;
39   -@property (nonatomic, weak) UIPageControl *pageControl;
40   -@property (nonatomic, strong)UIButton *button;
41   -@property (nonatomic, strong)UILabel *cycleViewTitle; //轮播下方标题
42   -
43   -@end
44   -
45   -@implementation LVCFirstHeaderReusableView
46   -
47   -#pragma mark - 构造函数
48   -- (instancetype)initWithFrame:(CGRect)frame
49   -{
50   - self = [super initWithFrame:frame];
51   - if (self) {
52   - [self setupUI];
53   - }
54   - return self;
55   -}
56   -
57   -#pragma mark - 设置数据
58   -- (void)setImageUrls:(NSArray<NSURL *> *)imageUrls {
59   - _imageUrls = imageUrls;
60   -
61   - if (_timer != nil) {
62   - [_timer invalidate];
63   - }
64   - [_collectionView reloadData];
65   - [self addSubview:self.cycleViewTitle];
66   -
67   - NSIndexPath *indexPath = [NSIndexPath indexPathForItem:_imageUrls.count * kDataScaleSeed inSection:0];
68   -
69   - [_collectionView scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionLeft animated:NO];
70   -
71   - // _pageControl.currentPage = 0;
72   - // _pageControl.numberOfPages = _imageUrls.count;
73   -
74   - _timerDuration = 4.0;
75   - _timer = [NSTimer timerWithTimeInterval:_timerDuration target:self selector:@selector(updateTimer) userInfo:nil repeats:YES];
76   -
77   - [[NSRunLoop currentRunLoop] addTimer:_timer forMode:NSRunLoopCommonModes];
78   -}
79   -
80   -- (void)setModelArray:(NSArray<LVCChannelDetailsModel *> *)modelArray {
81   - _modelArray = modelArray;
82   - self.cycleViewTitle.text = [NSString stringWithFormat:@" %@",_modelArray[0].title];
83   -}
84   -
85   -#pragma mark - 子视图
86   -- (UILabel *)cycleViewTitle
87   -{
88   - if (!_cycleViewTitle) {
89   -
90   - _cycleViewTitle = [[UILabel alloc] initWithFrame:CGRectMake(10, self.collectionView.bottom-35, self.collectionView.width, 35)];
91   - _cycleViewTitle.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
92   - _cycleViewTitle.textColor = [UIColor whiteColor];
93   - _cycleViewTitle.font = [UIFont systemFontOfSize:19];
94   - }
95   - return _cycleViewTitle;
96   -}
97   -
98   -#pragma mark - 时钟方法
99   -- (void)updateTimer {
100   -
101   - NSIndexPath *indexPath = [_collectionView indexPathsForVisibleItems].lastObject;
102   - NSIndexPath *newIndexPath = [NSIndexPath indexPathForItem:indexPath.item + 1 inSection:indexPath.section];
103   -
104   - [_collectionView scrollToItemAtIndexPath:newIndexPath atScrollPosition:UICollectionViewScrollPositionLeft animated:YES];
105   -}
106   -
107   -#pragma mark - UICollectionViewDataSource 数据源协议方法!
108   -- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
109   -
110   - return _imageUrls.count * kDataScaleSeed * 2;
111   -}
112   -
113   -- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
114   -
115   - LVCHeaderRollCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellId forIndexPath:indexPath];
116   - NSInteger index = indexPath.item % _imageUrls.count;
117   - cell.imageUrl = _imageUrls[index];
118   - return cell;
119   -}
120   -
121   -#pragma mark - UICollectionViewDelegate
122   -- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
123   -
124   - if (_imageUrls.count == 0) {
125   - return;
126   - }
127   -
128   - CGFloat offsetX = scrollView.contentOffset.x / scrollView.bounds.size.width;
129   -
130   - // 2. 根据 offsetX 四舍五入计算页数
131   - NSInteger page = (NSInteger)(offsetX + 0.5);
132   -
133   - // 3. 根据数组数量,取余数
134   - page = page % _imageUrls.count;
135   -
136   - // NSLog(@"%zd!!!", page);
137   -
138   - _pageControl.currentPage = page;
139   -
140   - self.cycleViewTitle.text = [NSString stringWithFormat:@" %@",_modelArray[page].title];
141   -}
142   -
143   -/**
144   - * 通过设置 contentOffset 动画滚动完成之后调用
145   - */
146   -- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView {
147   - // 主动调用动画停止代理方法
148   - [self scrollViewDidEndDecelerating:scrollView];
149   -}
150   -
151   -/**
152   - * 滚动视图停止滚动会调用
153   - */
154   -- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
155   -
156   - // 根据 contentOffset.x 判断页数
157   - NSInteger page = scrollView.contentOffset.x / scrollView.bounds.size.width;
158   -
159   - // lastItem = _imageUrl.count * 2
160   - NSInteger lastItem = [_collectionView numberOfItemsInSection:0];
161   -
162   - // NSLog(@"第 %zd 页 - lastItem %zd", page, lastItem);
163   - // 只处理第 0 页,和最后一页
164   - if (page == 0 || page == (lastItem - 1)) {
165   - // 如果是 0 页,跳转到 _imageUrl.count
166   - // 如果是最后一页,跳转到 _imageUrl.count - 1
167   - NSInteger offset = _imageUrls.count * kDataScaleSeed;
168   -
169   - // 判断最后一页
170   - if (page == (lastItem - 1)) {
171   - offset = offset - 1; // (5 - 1) * 10 = 40 // 5 * 10 - 1
172   - }
173   -
174   - // 设置 contentOffset
175   - // NSLog(@"我要跳转到 %zd", offset);
176   -
177   - CGFloat width = scrollView.bounds.size.width;
178   -
179   - scrollView.contentOffset = CGPointMake(offset * width, 0);
180   - }
181   -}
182   -
183   -// 开始拖,暂停时钟!
184   -- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
185   -
186   - _timer.fireDate = [NSDate distantFuture];
187   -}
188   -
189   -// 结束拖,继续时钟!
190   -- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
191   -
192   - _timer.fireDate = [NSDate dateWithTimeIntervalSinceNow:_timerDuration];
193   -}
194   -
195   -// 选择
196   -- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
197   -{
198   -
199   - LVCChannelDetailsModel *details = [_modelArray safetyObjectAtIndex:indexPath.row % 5];
200   - self.viewController.tabBarController.tabBar.hidden = YES;
201   - LVCLivePlayerController *playVC = [[LVCLivePlayerController alloc] init];
202   - playVC.model = details;
203   - self.viewController.navigationController.navigationBar.hidden = YES;
204   - self.viewController.hidesBottomBarWhenPushed = YES;
205   - [self.viewController.navigationController pushViewController:playVC animated:YES];
206   - self.viewController.hidesBottomBarWhenPushed = NO;
207   -}
208   -
209   -#pragma mark - 第一个组头设置界面
210   -- (void)setupUI {
211   -
212   - CZSlideLayout *layout = [[CZSlideLayout alloc] init];
213   - UICollectionView *cv = [[UICollectionView alloc] initWithFrame:CGRectMake(10, 7, SCREEN_WIDTH-20, (SCREEN_WIDTH-20)/2) collectionViewLayout:layout];
214   - cv.backgroundColor = [UIColor whiteColor];
215   -
216   - [self addSubview:cv];
217   -
218   - [cv registerClass:[LVCHeaderRollCollectionViewCell class] forCellWithReuseIdentifier:cellId];
219   -
220   - cv.dataSource = self;
221   - cv.delegate = self;
222   -
223   - cv.pagingEnabled = YES;
224   - cv.showsVerticalScrollIndicator = NO;
225   - cv.showsHorizontalScrollIndicator = NO;
226   - cv.bounces = NO;
227   -
228   - UIPageControl *pager = [[UIPageControl alloc] init];
229   - pager.numberOfPages = 0;
230   - pager.currentPage = 0;
231   - pager.currentPageIndicatorTintColor = [UIColor yellowColor];
232   - pager.pageIndicatorTintColor = [UIColor redColor];
233   - pager.userInteractionEnabled = NO;
234   -
235   - _collectionView = cv;
236   - _pageControl = pager;
237   -}
238   -
239   -- (void)removeFromSuperview {
240   - [super removeFromSuperview];
241   -
242   - [_timer invalidate];
243   -}
244   -
245   -// 添加了时钟 & 运行循环,dealloc 方法不会被调用!
246   -- (void)dealloc {
247   -
248   -}
249   -
250   -@end
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCHeaderRollCollectionViewCell.h deleted 100644 → 0
1   -//
2   -// LVCHeaderRollCollectionViewCell.h
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import <UIKit/UIKit.h>
10   -
11   -@interface LVCHeaderRollCollectionViewCell : UICollectionViewCell
12   -
13   -@property (nonatomic, strong) NSURL *imageUrl;
14   -
15   -@end
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCHeaderRollCollectionViewCell.m deleted 100644 → 0
1   -//
2   -// LVCHeaderRollCollectionViewCell.m
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "LVCHeaderRollCollectionViewCell.h"
10   -
11   -@interface LVCHeaderRollCollectionViewCell ()
12   -
13   -@property (nonatomic, strong) UIImageView *imageView;
14   -
15   -@end
16   -
17   -@implementation LVCHeaderRollCollectionViewCell
18   -
19   -- (instancetype)initWithFrame:(CGRect)frame
20   -{
21   - self = [super initWithFrame:frame];
22   - if (self) {
23   -
24   - [self.contentView addSubview:self.imageView];
25   -
26   - }
27   - return self;
28   -}
29   -
30   -#pragma mark -
31   -#pragma mark - setter
32   -- (void)setImageUrl:(NSURL *)imageUrl {
33   - _imageUrl = imageUrl;
34   - [_imageView sd_setImageWithURL:imageUrl placeholderImage:[UIImage imageNamed:@"load_03"]];
35   -}
36   -
37   -#pragma mark -
38   -#pragma mark - gstter
39   -- (UIImageView *)imageView
40   -{
41   - if (!_imageView) {
42   - _imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-20, (SCREEN_WIDTH-20)/2)];
43   - _imageView.backgroundColor = [UIColor whiteColor];
44   - _imageView.contentMode = UIViewContentModeScaleToFill;
45   - }
46   - return _imageView;
47   -}
48   -
49   -@end
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCLiveListCollectionViewCell.h deleted 100644 → 0
1   -//
2   -// LVCLiveListCollectionViewCell.h
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import <UIKit/UIKit.h>
10   -#import "LVCChannelDetailsModel.h"
11   -
12   -@interface LVCLiveListCollectionViewCell : UICollectionViewCell
13   -
14   -@property (nonatomic, strong) LVCChannelDetailsModel *details;
15   -
16   -@end
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCLiveListCollectionViewCell.m deleted 100644 → 0
1   -//
2   -// LVCLiveListCollectionViewCell.m
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "LVCLiveListCollectionViewCell.h"
10   -
11   -// 首页横版cell比例
12   -#define H_Cell_Ratio (196.0/300)
13   -
14   -@interface LVCLiveListCollectionViewCell ()
15   -
16   -@property (nonatomic, strong)UIImageView *image;
17   -@property (nonatomic, strong)UILabel *title;
18   -@property (nonatomic, strong)UILabel *detail;
19   -
20   -@end
21   -
22   -@implementation LVCLiveListCollectionViewCell
23   -
24   -- (instancetype)initWithFrame:(CGRect)frame
25   -{
26   - self = [super initWithFrame:frame];
27   - if (self) {
28   -
29   - self.contentView.backgroundColor = [UIColor whiteColor];
30   - [self.contentView addSubview:self.image];
31   - [self.contentView addSubview:self.title];
32   - [self.contentView addSubview:self.detail];
33   -
34   - }
35   - return self;
36   -}
37   -
38   -- (void)setDetails:(LVCChannelDetailsModel *)details {
39   -
40   - self.title.font = [UIFont systemFontOfSize:13];
41   - self.detail.font = [UIFont systemFontOfSize:12];
42   - self.title.text = [NSString stringWithFormat:@"正在直播:%@", details.currentPlay];
43   - self.detail.text = [NSString stringWithFormat:@"即将直播:%@", details.nextPlay];
44   - [self.image sd_setImageWithURL:[NSURL URLWithString:details.img] placeholderImage:[UIImage imageNamed:@"load_03"]];
45   -
46   -}
47   -
48   -#pragma mark -
49   -#pragma mark - getter
50   -- (UIImageView *)image
51   -{
52   - if (!_image) {
53   - _image = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.contentView.width, (self.contentView.width)*H_Cell_Ratio)];
54   - _image.backgroundColor = [UIColor grayColor];
55   - _image.contentMode = UIViewContentModeScaleAspectFill;
56   - _image.clipsToBounds = YES;
57   - }
58   - return _image;
59   -}
60   -
61   -- (UILabel *)title
62   -{
63   - if (!_title) {
64   - _title = [[UILabel alloc] initWithFrame:CGRectMake(0, self.image.bottom+7, self.contentView.width, 12)];
65   - _title.font = [UIFont systemFontOfSize:14];
66   - _title.textColor = [UIColor blackColorZX];
67   - }
68   - return _title;
69   -}
70   -
71   -- (UILabel *)detail
72   -{
73   - if (!_detail) {
74   - _detail = [[UILabel alloc] initWithFrame:CGRectMake(0, self.title.bottom+7, self.contentView.width, 11)];
75   - _detail.font = [UIFont systemFontOfSize:12];
76   - _detail.textColor = [UIColor grayColorZX];
77   - }
78   - return _detail;
79   -}
80   -
81   -@end
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCMoreSortTableViewCell.h deleted 100644 → 0
1   -//
2   -// LVCMoreSortTableViewCell.h
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import <UIKit/UIKit.h>
10   -#import "LVCProgramModel.h"
11   -
12   -@interface LVCMoreSortTableViewCell : UITableViewCell
13   -
14   -@property (nonatomic, strong) LVCProgramModel *model;
15   -
16   -@end
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCMoreSortTableViewCell.m deleted 100644 → 0
1   -//
2   -// LVCMoreSortTableViewCell.m
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "LVCMoreSortTableViewCell.h"
10   -
11   -@interface LVCMoreSortTableViewCell ()
12   -
13   -@property(nonatomic,strong)UIImageView *imgView;
14   -@property(nonatomic,strong)UILabel *titleLab;
15   -@property(nonatomic,strong)UILabel *desLab;
16   -
17   -@end
18   -
19   -@implementation LVCMoreSortTableViewCell
20   -
21   -#pragma mark - Calculate Size Specs
22   -
23   -- (CGFloat)imageWidth {
24   -
25   - if (SCREEN_WIDTH == 320.0) {
26   - return 96.0;
27   - } else if (SCREEN_WIDTH == 375.0) {
28   - return 112.0;
29   - } else if (SCREEN_WIDTH == 414.0) {
30   - return 124.0;
31   - }
32   -
33   - return SCREEN_WIDTH*0.3;
34   -}
35   -
36   -- (CGFloat)imageHeight {
37   - if (SCREEN_WIDTH == 320.0) {
38   - return 62.5;
39   - } else if (SCREEN_WIDTH == 375.0) {
40   - return 73.0;
41   - } else if (SCREEN_WIDTH == 414.0) {
42   - return 81.0;
43   - }
44   -
45   - return SCREEN_WIDTH*0.3*146/224;
46   -}
47   -
48   -- (CGFloat)imageMargin {
49   - if (SCREEN_WIDTH == 320.0) {
50   - return 8.0;
51   - } else if (SCREEN_WIDTH == 375.0) {
52   - return 10.0;
53   - } else if (SCREEN_WIDTH == 414.0) {
54   - return 11.0;
55   - }
56   -
57   - return 10.0;
58   -}
59   -
60   -- (CGFloat)titleMargin {
61   - if (SCREEN_WIDTH == 320.0) {
62   - return 24.0;
63   - } else if (SCREEN_WIDTH == 375.0) {
64   - return 28.0;
65   - } else if (SCREEN_WIDTH == 414.0) {
66   - return 31.0;
67   - }
68   -
69   - return 28.0;
70   -}
71   -
72   -- (CGFloat)subtitleMargin
73   -{
74   - if (SCREEN_WIDTH == 320.0) {
75   - return 48.0;
76   - } else if (SCREEN_WIDTH == 375.0) {
77   - return 55.0;
78   - } else if (SCREEN_WIDTH == 414.0) {
79   - return 60.0;
80   - }
81   -
82   - return 53.0;
83   -}
84   -
85   -- (CGFloat)titleFontSize
86   -{
87   - if (SCREEN_WIDTH == 320.0) {
88   - return 14.0;
89   - } else if (SCREEN_WIDTH == 375.0) {
90   - return 17.0;
91   - } else if (SCREEN_WIDTH == 414.0) {
92   - return 19.0;
93   - }
94   -
95   - return 17.0;
96   -}
97   -
98   -- (CGFloat)subtitleFontSize
99   -{
100   - if (SCREEN_WIDTH == 320.0) {
101   - return 12.0;
102   - } else if (SCREEN_WIDTH == 375.0) {
103   - return 14.0;
104   - } else if (SCREEN_WIDTH == 414.0) {
105   - return 15.0;
106   - }
107   -
108   - return 14.0;
109   -}
110   -
111   -- (CGFloat)cellHeight
112   -{
113   - if (SCREEN_WIDTH == 320.0) {
114   - return 80.0;
115   - } else if (SCREEN_WIDTH == 375.0) {
116   - return 93.0;
117   - } else if (SCREEN_WIDTH == 414.0) {
118   - return 103.0;
119   - }
120   - return 93.0;
121   -}
122   -
123   -#pragma mark
124   -- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
125   -{
126   - self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
127   - if (self) {
128   - self.selectionStyle = UITableViewCellSelectionStyleNone;
129   - [self.contentView addSubview:self.imgView];
130   - [self.contentView addSubview:self.titleLab];
131   - [self.contentView addSubview:self.desLab];
132   - }
133   - return self;
134   -}
135   -
136   --(UIImageView*)imgView
137   -{
138   - if (!_imgView) {
139   -
140   - _imgView=[[UIImageView alloc] initWithFrame:CGRectMake(10, [self imageMargin], [self imageWidth], [self imageHeight])];
141   - }
142   - return _imgView;
143   -}
144   -
145   --(UILabel*)titleLab
146   -{
147   - if (!_titleLab) {
148   - _titleLab=[[UILabel alloc] initWithFrame:CGRectMake([self imageWidth]+20.0, [self titleMargin], SCREEN_WIDTH-[self imageWidth]-30, [self titleFontSize])];
149   - _titleLab.textColor=[UIColor blackColorZX];
150   - _titleLab.font=[UIFont systemFontOfSize:[self titleFontSize]];
151   - }
152   - return _titleLab;
153   -}
154   -
155   --(UILabel*)desLab
156   -{
157   - if (!_desLab) {
158   - _desLab=[[UILabel alloc] initWithFrame:CGRectMake([self imageWidth]+20.0, [self subtitleMargin], SCREEN_WIDTH-[self imageWidth]-30, [self subtitleFontSize])];
159   - _desLab.textColor=[UIColor colorWithHexString:@"#969797"];
160   - _desLab.font=[UIFont systemFontOfSize:[self subtitleFontSize]];
161   - _desLab.numberOfLines=0;
162   - }
163   - return _desLab;
164   -}
165   -
166   -- (void)setModel:(LVCProgramModel *)model
167   -{
168   - self.titleLab.text=model.title;
169   - self.desLab.text=model.subTitle;
170   - if (model.img) {
171   -
172   - [self.imgView sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"load_03"]];
173   - }
174   -}
175   -
176   -- (void)awakeFromNib {
177   - [super awakeFromNib];
178   - // Initialization code
179   -}
180   -
181   -- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
182   - [super setSelected:selected animated:animated];
183   -
184   - // Configure the view for the selected state
185   -}
186   -
187   -@end
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCOtherHeaderReusableView.h deleted 100644 → 0
1   -//
2   -// LVCOtherHeaderCollectionReusableView.h
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import <UIKit/UIKit.h>
10   -#import "LVCChannelDetailsModel.h"
11   -#import "LVCChannelsModel.h"
12   -
13   -@interface LVCOtherHeaderReusableView : UICollectionReusableView
14   -
15   -@property (nonatomic, strong) LVCChannelsModel *model;
16   -
17   -@end
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCOtherHeaderReusableView.m deleted 100644 → 0
1   -//
2   -// LVCOtherHeaderCollectionReusableView.m
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "LVCOtherHeaderReusableView.h"
10   -
11   -@interface LVCOtherHeaderReusableView ()
12   -
13   -@property (nonatomic, strong)UIButton *button;
14   -@property (nonatomic, strong)UIView *intervalView;
15   -
16   -@end
17   -
18   -@implementation LVCOtherHeaderReusableView
19   -
20   -- (instancetype)initWithFrame:(CGRect)frame
21   -{
22   - self = [super initWithFrame:frame];
23   - if (self) {
24   -
25   - self.backgroundColor = [UIColor whiteColor];
26   -
27   - UIView *intervalView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.width, 6)];
28   - intervalView.backgroundColor = [UIColor backgroundColorZX];
29   - [self addSubview:intervalView];
30   - [self addSubview:self.button];
31   -
32   - }
33   - return self;
34   -}
35   -
36   -#pragma mark -
37   -#pragma mark - setter
38   -- (void)setModel:(LVCChannelsModel *)model {
39   -
40   - _model = model;
41   - [self.button setTitle:[NSString stringWithFormat:@" %@", model.title] forState:UIControlStateNormal];
42   -}
43   -
44   -#pragma mark -
45   -#pragma mark - gatter
46   -- (UIButton *)button
47   -{
48   - if (!_button) {
49   - _button = [UIButton buttonWithType:UIButtonTypeCustom];
50   - _button.frame = CGRectMake(0, 6, self.frame.size.width, 47);
51   - [_button setTitleColor:[UIColor blackColorZX] forState:UIControlStateNormal];
52   - _button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
53   - _button.titleLabel.font = [UIFont boldSystemFontOfSize:18];
54   - }
55   - return _button;
56   -}
57   -
58   -@end
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCPlayer.h
... ... @@ -7,7 +7,7 @@
7 7 //
8 8  
9 9 #import <UIKit/UIKit.h>
10   -#import "LVCChannelDetailsModel.h"
  10 +#import "LVCTelevisionModel.h"
11 11  
12 12 @class LVCPlayer;
13 13  
... ... @@ -29,13 +29,13 @@ typedef void(^HideInputViewBlock)(BOOL hide);
29 29 @property (nonatomic, strong) UIImageView *topBgView; //顶部蒙版
30 30 @property (nonatomic, strong) UIImageView *bottomBgView; //底部蒙版
31 31 @property (nonatomic, strong) UIImageView *contentView; //所有空间统一管理在这个view中
32   -@property (nonatomic, strong) LVCChannelDetailsModel *model; //所有空间统一管理在这个view中
  32 +@property (nonatomic, strong) LVCTelevisionModel *model; //所有空间统一管理在这个view中
33 33 @property (nonatomic, readwrite, assign) BOOL isFullScreen; //是否是全屏
34 34 @property (nonatomic, copy) HideInputViewBlock hideBlock; //全屏模式下是否隐藏输入框
35 35 @property (nonatomic, assign, readonly) BOOL displayBarrage; //是否显示弹幕
36 36 @property (nonatomic, assign) id<LVCPlayerDelegate> delegate;
37 37  
38   -- (instancetype)initWithFrame:(CGRect)frame playerModel:(LVCChannelDetailsModel *)model;
  38 +- (instancetype)initWithFrame:(CGRect)frame playerModel:(LVCTelevisionModel *)model;
39 39  
40 40 - (void)autoHideControlView; //自动隐藏上下功能条
41 41  
... ...
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCPlayer.m
... ... @@ -12,7 +12,7 @@
12 12  
13 13 @interface LVCPlayer ()<UIGestureRecognizerDelegate,LVCPlayerLoadingViewDelegate>
14 14 {
15   - LVCChannelDetailsModel *_model;
  15 + LVCTelevisionModel *_model;
16 16 }
17 17  
18 18 @property (nonatomic, strong) CNLiveMoviePlayerController *player;
... ... @@ -35,7 +35,7 @@
35 35 NSLog(@"LVCPlayer dealloc");
36 36 }
37 37  
38   -- (instancetype)initWithFrame:(CGRect)frame playerModel:(LVCChannelDetailsModel *)model
  38 +- (instancetype)initWithFrame:(CGRect)frame playerModel:(LVCTelevisionModel *)model
39 39 {
40 40 self = [super initWithFrame:frame];
41 41 if (self) {
... ... @@ -62,7 +62,7 @@
62 62 }
63 63 #pragma mark -
64 64 #pragma mark - initPlayer
65   -- (void)initPlayerWithModel:(LVCChannelDetailsModel *)model
  65 +- (void)initPlayerWithModel:(LVCTelevisionModel *)model
66 66 {
67 67 /*
68 68 */
... ...
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCTelevisionView.h renamed to LiveVideoCloud/Classes/Sections/PGCSections/View/LVCTelevisionCell.h
1 1 //
2   -// LVCTelevisionView.h
  2 +// LVCTelevisionCell.h
3 3 // LiveVideoCloud
4 4 //
5   -// Created by iOS on 17/3/27.
  5 +// Created by iOS on 2017/6/27.
6 6 // Copyright © 2017年 cnlive. All rights reserved.
7 7 //
8 8  
9 9 #import <UIKit/UIKit.h>
  10 +#import "LVCTelevisionModel.h"
10 11  
11   -@interface LVCTelevisionView : UIView
  12 +@interface LVCTelevisionCell : UITableViewCell
  13 +
  14 +@property (nonatomic, strong) LVCTelevisionModel *model;
12 15  
13 16 @end
... ...
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCTelevisionCell.m 0 → 100644
  1 +//
  2 +// LVCTelevisionCell.m
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by iOS on 2017/6/27.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "LVCTelevisionCell.h"
  10 +
  11 +@interface LVCTelevisionCell ()
  12 +
  13 +@property (nonatomic, strong) UIImageView *imgView;
  14 +@property (nonatomic, strong) UILabel *titleLab;
  15 +
  16 +@end
  17 +
  18 +@implementation LVCTelevisionCell
  19 +
  20 +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  21 +{
  22 + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  23 + if (self) {
  24 + self.contentView.backgroundColor = [UIColor whiteColor];
  25 +
  26 + [self.contentView addSubview:self.imgView];
  27 + [self.contentView addSubview:self.titleLab];
  28 + }
  29 + return self;
  30 +}
  31 +
  32 +- (void)setModel:(LVCTelevisionModel *)model {
  33 + [_imgView sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"load_03"]];
  34 + _titleLab.text = model.title;
  35 +
  36 +}
  37 +
  38 +#pragma mark -
  39 +#pragma mark - getter
  40 +- (UIImageView *)imgView
  41 +{
  42 + if (!_imgView) {
  43 + _imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_WIDTH*9/16)];
  44 + }
  45 + return _imgView;
  46 +}
  47 +
  48 +- (UILabel *)titleLab
  49 +{
  50 + if (!_titleLab) {
  51 + _titleLab = [[UILabel alloc] initWithFrame:CGRectMake(10, SCREEN_WIDTH*9/16, SCREEN_WIDTH-20, 40)];
  52 + }
  53 + return _titleLab;
  54 +}
  55 +
  56 +- (void)awakeFromNib {
  57 + [super awakeFromNib];
  58 + // Initialization code
  59 +}
  60 +
  61 +- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  62 + [super setSelected:selected animated:animated];
  63 +
  64 + // Configure the view for the selected state
  65 +}
  66 +
  67 +@end
... ...
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCTelevisionView.m deleted 100644 → 0
1   -//
2   -// LVCTelevisionView.m
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "LVCTelevisionView.h"
10   -#import "LVCLiveListCollectionViewCell.h"
11   -#import "LVCFirstHeaderReusableView.h"
12   -#import "LVCOtherHeaderReusableView.h"
13   -#import "LVCChannelDetailsModel.h"
14   -#import "LVCChannelsModel.h"
15   -#import "LVCLivePlayerController.h"
16   -
17   -static NSString *cellId = @"LVCLiveListCollectionViewCell";
18   -static NSString *firstHeaderId = @"LVCFirstHeaderReusableView";
19   -static NSString *otherHeaderId = @"LVCOtherHeaderReusableView";
20   -
21   -@interface LVCTelevisionView ()<UICollectionViewDelegate,UICollectionViewDataSource>
22   -
23   -@property (nonatomic, strong) UICollectionView *collectionView;
24   -@property (nonatomic, strong) NSArray *bannerModelArray; //banner数据源
25   -@property (nonatomic, strong) NSArray *marqueeModelArray;
26   -@property (nonatomic, strong) NSArray *channelsModelArray;
27   -
28   -@end
29   -
30   -@implementation LVCTelevisionView
31   -
32   -- (instancetype)initWithFrame:(CGRect)frame
33   -{
34   - self = [super initWithFrame:frame];
35   - if (self) {
36   -
37   - self.backgroundColor = [UIColor whiteColor];
38   -
39   - [self addSubview:self.collectionView];
40   - [self loadData];
41   -
42   - }
43   - return self;
44   -}
45   -
46   -#pragma mark -
47   -#pragma mark - UICollectionViewDataSource
48   -- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
49   - if (self.channelsModelArray.count > 0) {
50   - return self.channelsModelArray.count + 1;
51   - }
52   - return self.channelsModelArray.count;
53   -}
54   -
55   -- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
56   -
57   - if (section == 0) {
58   - return 0;
59   - }
60   - LVCChannelsModel *model = self.channelsModelArray[section - 1];
61   -
62   - NSArray *array = model.programs;
63   -
64   - return array.count;
65   -}
66   -
67   -- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
68   -
69   - LVCLiveListCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellId forIndexPath:indexPath];
70   - LVCChannelsModel *model = _channelsModelArray[indexPath.section - 1];
71   -
72   - LVCChannelDetailsModel *details = model.programs[indexPath.item];
73   -
74   - cell.details = details;
75   -
76   - return cell;
77   -}
78   -
79   -- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath {
80   -
81   - if (kind == UICollectionElementKindSectionHeader) {
82   -
83   - if (indexPath.section == 0) {
84   -
85   - LVCFirstHeaderReusableView *firstHeaderView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:firstHeaderId forIndexPath:indexPath];
86   -
87   - firstHeaderView.imageUrls = [self bannerImage];
88   - firstHeaderView.modelArray = self.bannerModelArray;
89   -
90   - return firstHeaderView;
91   - } else {
92   -
93   - LVCOtherHeaderReusableView *otherHeaderView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:otherHeaderId forIndexPath:indexPath];
94   -
95   - LVCChannelsModel *model = _channelsModelArray[indexPath.section - 1];
96   -
97   - otherHeaderView.model = model;
98   -
99   - return otherHeaderView;
100   - }
101   - }
102   - return nil;
103   -}
104   -
105   -- (NSArray <NSURL *>*)bannerImage {
106   -
107   - NSMutableArray *arrayM = [NSMutableArray array];
108   - for (LVCChannelDetailsModel *model in _bannerModelArray) {
109   - NSString *imgStr = model.img;
110   - NSURL *url = [NSURL URLWithString:imgStr];
111   - [arrayM addObject:url];
112   - }
113   - return arrayM.copy;
114   -}
115   -
116   -- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section {
117   -
118   - if (section == 0) {
119   - return CGSizeMake(SCREEN_WIDTH, SCREEN_WIDTH * 0.5);
120   - }else {
121   - return CGSizeMake(SCREEN_WIDTH, 47);
122   - }
123   -}
124   -
125   -#pragma mark -
126   -#pragma mark - UICollectionViewDelegate
127   -- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
128   -
129   - LVCChannelsModel *model = _channelsModelArray[indexPath.section - 1];
130   - LVCChannelDetailsModel *details = model.programs[indexPath.item];
131   - self.viewController.hidesBottomBarWhenPushed = YES;
132   - LVCLivePlayerController *playVC = [[LVCLivePlayerController alloc] init];
133   - playVC.model = details;
134   - self.viewController.navigationController.navigationBar.hidden = YES;
135   - [self.viewController.navigationController pushViewController:playVC animated:YES];
136   - self.viewController.hidesBottomBarWhenPushed = NO;
137   -}
138   -
139   -#pragma mark -
140   -#pragma mark - 加载数据
141   -- (void)loadData {
142   -
143   - NSString *path = [[NSBundle mainBundle] pathForResource:@"JsonFile" ofType:@"json"];
144   - NSData *data=[NSData dataWithContentsOfFile:path];
145   - NSError *error;
146   - id responseObject=[NSJSONSerialization JSONObjectWithData:data
147   - options:NSJSONReadingAllowFragments
148   - error:&error];
149   -// NSLog(@"%@",responseObject);
150   -
151   - if (responseObject[@"channels"] && [responseObject[@"channels"] isKindOfClass:[NSArray class]]) {
152   -
153   - NSMutableArray *arrayM = [[NSMutableArray alloc]init];
154   - for (NSDictionary *dict in responseObject[@"channels"]) {
155   - LVCChannelsModel *model = [LVCChannelsModel mj_objectWithKeyValues:dict];
156   - [arrayM addObject:model];
157   - }
158   - self.channelsModelArray = arrayM;
159   - }
160   - if (responseObject[@"banner"] && [responseObject[@"banner"] isKindOfClass:[NSArray class]]) {
161   -
162   - NSMutableArray *arrayM = [NSMutableArray array];
163   - for (NSDictionary *dict in responseObject[@"banner"]) {
164   - LVCChannelDetailsModel *rollModel = [LVCChannelDetailsModel mj_objectWithKeyValues:dict];
165   - [arrayM addObject:rollModel];
166   - }
167   - self.bannerModelArray = arrayM;
168   - }
169   - [self.collectionView reloadData];
170   -
171   -}
172   -
173   -#pragma mark -
174   -#pragma mark - getter
175   -- (UICollectionView *)collectionView {
176   -
177   - if (!_collectionView) {
178   -
179   - UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc]init];
180   - layout.itemSize = CGSizeMake((SCREEN_WIDTH-30)/2, (SCREEN_WIDTH-30)/2*9/16+65);
181   - layout.minimumLineSpacing = 0;
182   - layout.minimumInteritemSpacing = 0;
183   - layout.sectionInset = UIEdgeInsetsMake(6, 10, 0, 10);
184   - _collectionView.showsHorizontalScrollIndicator = NO;
185   -
186   - _collectionView = [[UICollectionView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-64-49) collectionViewLayout:layout];
187   - _collectionView.backgroundColor = [UIColor whiteColor];
188   -
189   - [_collectionView registerClass:[LVCLiveListCollectionViewCell class] forCellWithReuseIdentifier:cellId];
190   - [_collectionView registerClass:[LVCFirstHeaderReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:firstHeaderId];
191   - [_collectionView registerClass:[LVCOtherHeaderReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:otherHeaderId];
192   - _collectionView.scrollsToTop = NO;
193   - _collectionView.dataSource = self;
194   - _collectionView.delegate = self;
195   - }
196   - return _collectionView;
197   -}
198   -
199   -/*
200   -// Only override drawRect: if you perform custom drawing.
201   -// An empty implementation adversely affects performance during animation.
202   -- (void)drawRect:(CGRect)rect {
203   - // Drawing code
204   -}
205   -*/
206   -
207   -@end
LiveVideoCloud/Classes/Sections/UGCSections/Controller/LVCTVLiveViewController.h deleted 100644 → 0
1   -//
2   -// LVCLiveViewController.h
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "BaseViewController.h"
10   -
11   -@interface LVCTVLiveViewController : UIViewController
12   -
13   -@end
LiveVideoCloud/Classes/Sections/UGCSections/Controller/LVCTVLiveViewController.m deleted 100644 → 0
1   -//
2   -// LVCLiveViewController.m
3   -// LiveVideoCloud
4   -//
5   -// Created by iOS on 17/3/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "LVCTVLiveViewController.h"
10   -#import "LVCTelevisionView.h"
11   -
12   -@interface LVCTVLiveViewController ()
13   -
14   -@property (nonatomic, strong) LVCTelevisionView *tvView;
15   -
16   -@end
17   -
18   -@implementation LVCTVLiveViewController
19   -
20   -- (void)viewDidLoad {
21   - [super viewDidLoad];
22   -
23   - self.view.backgroundColor = [UIColor whiteColor];
24   -
25   - [self.view addSubview:self.tvView];
26   -}
27   -
28   -- (LVCTelevisionView *)tvView
29   -{
30   - if (!_tvView) {
31   - _tvView = [[LVCTelevisionView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
32   - }
33   - return _tvView;
34   -}
35   -
36   -- (void)didReceiveMemoryWarning {
37   - [super didReceiveMemoryWarning];
38   - // Dispose of any resources that can be recreated.
39   -}
40   -
41   -/*
42   -#pragma mark - Navigation
43   -
44   -// In a storyboard-based application, you will often want to do a little preparation before navigation
45   -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
46   - // Get the new view controller using [segue destinationViewController].
47   - // Pass the selected object to the new view controller.
48   -}
49   -*/
50   -
51   -@end
LiveVideoCloud/Classes/Sections/UGCSections/Controller/LVCUGCLivePlayerController.m
... ... @@ -13,8 +13,7 @@
13 13 #import "UIImage+LVCVagueImage.h"
14 14 #import "LiveBaseView.h"
15 15 #import "MineLiveController.h"
16   -#import "HomeViewController.h"
17   -
  16 +#import "LVCUGCLiveListController.h"
18 17  
19 18 @interface LVCUGCLivePlayerController () {
20 19  
... ... @@ -119,8 +118,9 @@
119 118 if ([controller isKindOfClass:[MineLiveController class]]) {
120 119 MineLiveController *revise =(MineLiveController *)controller;
121 120 [self.navigationController popToViewController:revise animated:YES];
122   - } else if ([controller isKindOfClass:[HomeViewController class]]) {
123   - HomeViewController *revise =(HomeViewController *)controller;
  121 + }
  122 + else if ([controller isKindOfClass:[LVCUGCLiveListController class]]) {
  123 + LVCUGCLiveListController *revise =(LVCUGCLiveListController *)controller;
124 124 [self.navigationController popToViewController:revise animated:YES];
125 125 }
126 126 }
... ...
LiveVideoCloud/Classes/Sections/homeSections/Controller/HomeViewController.m 0 → 100644
  1 +//
  2 +// HomeViewController.m
  3 +// ZXBaseProject
  4 +//
  5 +// Created by 张旭 on 2017/1/10.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "HomeViewController.h"
  10 +#import "LVCLivePlayerController.h"
  11 +#import "LVCLivePlayerController.h"
  12 +#import "LVCUGCLivePlayerController.h"
  13 +#import "LVCUGCLiveListView.h"
  14 +#import "LVCVodPlayerListView.h"
  15 +
  16 +@interface HomeViewController ()<V8HorizontalPickerViewDataSource, V8HorizontalPickerViewDelegate,MHPagingScrollViewDelegate,UIScrollViewDelegate>
  17 +{
  18 + NSArray *_titleArr;
  19 + CGFloat _titleSpace;
  20 +
  21 +}
  22 +
  23 +@property (nonatomic, strong)V8HorizontalPickerView *titleView;
  24 +@property (nonatomic, strong)MHPagingScrollView *pageView;
  25 +
  26 +@end
  27 +
  28 +@implementation HomeViewController
  29 +
  30 +- (void)viewDidLoad {
  31 + [super viewDidLoad];
  32 + self.view.backgroundColor = [UIColor whiteColor];
  33 +
  34 + _titleArr = @[@"电视台"];
  35 +// CGFloat width = 0;
  36 +// for (NSString *title in _titleArr) {
  37 +// CGSize size = [title sizeWithAttributes:@{NSFontAttributeName:self.titleView.elementFont}];
  38 +// width += size.width+5;
  39 +// }
  40 +// if (width < self.titleView.width) {
  41 +// _titleSpace = (self.titleView.width-width)/_titleArr.count;
  42 +// } else {
  43 +// _titleSpace = 0;
  44 +// }
  45 +//
  46 +// self.navigationItem.titleView = self.titleView;
  47 +//
  48 +// [_pageView reloadPages];
  49 +// [_titleView reloadData];
  50 +// [self.view addSubview:self.pageView];
  51 +////
  52 +// NSArray *arr = @[ @{
  53 +// @"mediaId": @"liveshow",
  54 +// @"title": @"LiveShow",
  55 +// @"img": @"http://yweb0.cnliveimg.com/cnlive/public/150417133551285_693.png",
  56 +// @"docID": @"408481",
  57 +// @"type": @"live"},
  58 +//
  59 +// @{
  60 +// @"mediaId": @"news",
  61 +// @"title": @"快新闻",
  62 +// @"img": @"http://yweb1.cnliveimg.com/img/cnlive/160121113653827_867.png",
  63 +// @"docID": @"285697",
  64 +// @"type": @"live"},
  65 +//
  66 +//
  67 +// @{
  68 +// @"mediaId": @"eyule",
  69 +// @"title": @"e娱乐",
  70 +// @"img": @"http://yweb2.cnliveimg.com/img/cnlive/160121113659992_585.png",
  71 +// @"docID": @"408480",
  72 +// @"type": @"live"},
  73 +//
  74 +// @{
  75 +// @"mediaId": @"chaotiyu",
  76 +// @"title": @"潮体育",
  77 +// @"img": @"http://yweb3.cnliveimg.com/img/cnlive/160121113706887_696.png",
  78 +// @"docID": @"285698",
  79 +// @"type": @"live"},
  80 +//
  81 +// @{
  82 +// @"mediaId": @"xuanhanyu",
  83 +// @"title": @"炫韩娱",
  84 +// @"img": @"http://yweb0.cnliveimg.com/cnlive/public/150417133341123_878.png",
  85 +// @"docID": @"408487",
  86 +// @"type": @"live"},
  87 +// @{
  88 +// @"mediaId": @"inyuetai",
  89 +// @"title": @"in乐台",
  90 +// @"img": @"http://yweb1.cnliveimg.com/cnlive/public/150417144750615_185.png",
  91 +// @"docID": @"285696",
  92 +// @"type": @"live"},
  93 +//
  94 +// ];
  95 +//
  96 +// NSData *data=[NSJSONSerialization dataWithJSONObject:arr options:NSJSONWritingPrettyPrinted error:nil];
  97 +// NSString *jsonStr=[[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
  98 +// NSLog(@"%@", jsonStr);
  99 +//
  100 +// NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  101 +// NSString *path=[paths objectAtIndex:0];
  102 +// NSString *Json_path=[path stringByAppendingPathComponent:@"TelevisionData.json"];
  103 +// //==写入文件
  104 +// NSLog(@"%@",[data writeToFile:Json_path atomically:YES] ? @"Succeed":@"Failed");
  105 +
  106 +}
  107 +
  108 +#pragma mark - V8HorizontalPickerViewDataSource
  109 +
  110 +- (NSInteger)numberOfElementsInHorizontalPickerView:(V8HorizontalPickerView *)picker
  111 +{
  112 + return _titleArr.count;
  113 +}
  114 +
  115 +#pragma mark - V8HorizontalPickerViewDelegate
  116 +
  117 +- (NSString *)horizontalPickerView:(V8HorizontalPickerView *)picker titleForElementAtIndex:(NSInteger)index
  118 +{
  119 + return _titleArr[index];
  120 +}
  121 +
  122 +- (NSInteger)horizontalPickerView:(V8HorizontalPickerView *)picker widthForElementAtIndex:(NSInteger)index
  123 +{
  124 +
  125 + if (_titleSpace != 0) {
  126 +
  127 + CGSize size = [_titleArr[index] sizeWithAttributes:@{NSFontAttributeName:self.titleView.elementFont}];
  128 + return size.width +_titleSpace;
  129 + } else {
  130 +
  131 + CGSize size = [_titleArr[index] sizeWithAttributes:@{NSFontAttributeName:self.titleView.elementFont}];
  132 + return size.width + 15;
  133 + }
  134 +}
  135 +
  136 +- (void)horizontalPickerView:(V8HorizontalPickerView *)picker didSelectElementAtIndex:(NSInteger)index
  137 +{
  138 + if (self.pageView.indexOfSelectedPage != index) {
  139 + [self.pageView selectPageAtIndex:index animated:YES];
  140 + }
  141 +}
  142 +
  143 +#pragma mark - UIScrollViewDelegate
  144 +
  145 +- (void)scrollViewDidScroll:(UIScrollView *)scrollView
  146 +{
  147 +
  148 + if (self.titleView.currentSelectedIndex != self.pageView.indexOfSelectedPage) {
  149 +
  150 + [self.titleView scrollToElement:self.pageView.indexOfSelectedPage animated:YES];
  151 +
  152 + }
  153 + [self.pageView scrollViewDidScroll];
  154 +
  155 +}
  156 +
  157 +#pragma mark - MHPagingScrollViewDelegate
  158 +
  159 +- (NSUInteger)numberOfPagesInPagingScrollView:(MHPagingScrollView *)pagingScrollView
  160 +{
  161 + return _titleArr.count;
  162 +}
  163 +
  164 +- (UIView *)pagingScrollView:(MHPagingScrollView *)pagingScrollView pageForIndex:(NSUInteger)index
  165 +{
  166 +// if ([_titleArr[index] isEqualToString:@"电视台"]) {
  167 +//
  168 +// LVCTelevisionView *tvView = (LVCTelevisionView *)[pagingScrollView pageViewByIndex:index];
  169 +// if (!tvView) {
  170 +// tvView = [[LVCTelevisionView alloc] init];
  171 +// }
  172 +// return tvView;
  173 +// }
  174 +// else if ([_titleArr[index] isEqualToString:@"直播"]) {
  175 +//
  176 +// LVCUGCLiveListView *liveListView = (LVCUGCLiveListView *)[pagingScrollView pageViewByIndex:index];
  177 +// if (!liveListView) {
  178 +// liveListView = [[LVCUGCLiveListView alloc] initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT - 114)];
  179 +// } else {
  180 +// [liveListView isNeedToRefresh];
  181 +// }
  182 +// liveListView.scrollToTop = YES;
  183 +// return liveListView;
  184 +// }else if ([_titleArr[index] isEqualToString:@"点播"]) {
  185 +//
  186 +// LVCVodPlayerListView *vodListView = (LVCVodPlayerListView *)[pagingScrollView pageViewByIndex:index];
  187 +// if (!vodListView) {
  188 +// vodListView = [[LVCVodPlayerListView alloc] initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT - 114)];
  189 +// } else {
  190 +//// [vodListView isNeedToRefresh];
  191 +// }
  192 +//// vodListView.scrollToTop = YES;
  193 +// return vodListView;
  194 +// }
  195 + return nil;
  196 +}
  197 +
  198 +- (V8HorizontalPickerView *)titleView
  199 +{
  200 + if (!_titleView) {
  201 +
  202 + _titleView = [[V8HorizontalPickerView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-120, 44) home:YES];
  203 + _titleView.textColor = [UIColor colorWithHexString:@"#7e7e7d"];
  204 + _titleView.selectedTextColor = [UIColor blackColorZX];
  205 + _titleView.delegate = self;
  206 + _titleView.dataSource = self;
  207 + _titleView.elementFont = [UIFont boldSystemFontOfSize:18];
  208 + _titleView.scrollView.scrollsToTop = NO;
  209 +
  210 + }
  211 + return _titleView;
  212 +}
  213 +
  214 +- (MHPagingScrollView *)pageView
  215 +{
  216 + if (!_pageView) {
  217 + _pageView = [[MHPagingScrollView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-49)];
  218 + _pageView.pagingDelegate = self;
  219 + _pageView.delegate = self;
  220 + _pageView.scrollsToTop = NO;
  221 + }
  222 + return _pageView;
  223 +}
  224 +
  225 +- (void)didReceiveMemoryWarning {
  226 + [super didReceiveMemoryWarning];
  227 + // Dispose of any resources that can be recreated.
  228 +}
  229 +
  230 +/*
  231 +#pragma mark - Navigation
  232 +
  233 +// In a storyboard-based application, you will often want to do a little preparation before navigation
  234 +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  235 + // Get the new view controller using [segue destinationViewController].
  236 + // Pass the selected object to the new view controller.
  237 +}
  238 +*/
  239 +
  240 +@end
... ...
LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCVodPlayerListController.m
... ... @@ -8,7 +8,15 @@
8 8  
9 9 #import "LVCVodPlayerListController.h"
10 10  
11   -@interface LVCVodPlayerListController ()
  11 +static NSString *vodCellId = @"vodCellId";
  12 +
  13 +@interface LVCVodPlayerListController ()<UITableViewDelegate, UITableViewDataSource> {
  14 +
  15 + AFHTTPRequestOperation *_operation;
  16 + NSMutableArray *_programArrayM;
  17 +}
  18 +
  19 +@property (nonatomic, strong)UITableView *tableView;
12 20  
13 21 @end
14 22  
... ... @@ -19,21 +27,99 @@
19 27  
20 28 self.navigationItem.title = @"点播";
21 29 self.view.backgroundColor = [UIColor whiteColor];
  30 + _programArrayM = [[NSMutableArray alloc] init];
22 31 }
23 32  
24   -- (void)didReceiveMemoryWarning {
25   - [super didReceiveMemoryWarning];
26   - // Dispose of any resources that can be recreated.
  33 +- (void)requestVodPlayerList {
  34 +
  35 + NSString *uid;
  36 + if ([UserTools isLogin]) {
  37 + uid = [UserInformationModel manager].uid;
  38 + } else {
  39 + uid = [NSString stringWithFormat:@"%u", arc4random()%3];
  40 + }
  41 + NSString *tm = [NSString stringWithFormat:@"%u_%@", arc4random()%10, uid];
  42 +
  43 + NSDictionary *parameter = @{@"cid": @"82_news/",
  44 + @"page": [NSString stringWithFormat:@"%d", 1],
  45 + @"pagesize": @"15",
  46 + @"tm": tm};
  47 +
  48 + [[AFHTTPRequestOperationManager manager] GET:Newslist parameters:[self addParameters:parameter] success:^(AFHTTPRequestOperation *operation, id responseObject) {
  49 +
  50 + responseObject = [responseObject validatedDictionary];
  51 +
  52 + if (responseObject[@"programs"] && [responseObject[@"programs"] isKindOfClass:[NSArray class]]) {
  53 +
  54 + for (NSDictionary *dic in responseObject[@"programs"]) {
  55 + ProgramModel *programModel = [ProgramModel modelWithDic:dic];
  56 + [_programArrayM addObject:programModel];
  57 + if (dic[@"comments"] && [dic[@"comments"] isKindOfClass:[NSArray class]] && [dic[@"comments"] count] > 0) {
  58 + NSMutableArray *comments = [[NSMutableArray alloc] init];
  59 + for (NSDictionary *commentDic in dic[@"comments"]) {
  60 + LVCCommentModel *commentModel = [LVCCommentModel modelWithDic:commentDic];
  61 + [comments addObject:commentModel];
  62 + }
  63 + [_programArrayM addObject:comments];
  64 + }
  65 + }
  66 + }
  67 + [self.tableView reloadData];
  68 +
  69 + } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
  70 +
  71 + NSLog(@"点播列表请求失败!");
  72 + }];
  73 +}
  74 +
  75 +#pragma mark - UITableViewDelegate !!!!!!!!!!!!!!!!!!!!!!!!
  76 +
  77 +#pragma mark - UITableViewDataSource !!!!!!!!!!!!!!!!!!!!!!!!
  78 +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  79 + return _programArrayM.count;
  80 +}
  81 +
  82 +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  83 +
  84 + return nil;
  85 +}
  86 +
  87 +#pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!
  88 +- (UITableView *)tableView {
  89 +
  90 + if (!_tableView) {
  91 + _tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
  92 + _tableView.dataSource = self;
  93 + _tableView.delegate = self;
  94 + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  95 +
  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];
  101 + }
  102 + return _tableView;
27 103 }
28 104  
29   -/*
30   -#pragma mark - Navigation
  105 +#pragma mark ------------------------------ 分割线 ----------------------------------------------
  106 +- (NSDictionary *)addParameters:(NSDictionary *)dict {
  107 +
  108 + if (![dict isKindOfClass:[NSDictionary class]]) {
  109 + return dict;
  110 + }
  111 + if (!dict) {
  112 + return @{@"appid": JBAppId, @"plat": @"i", @"version": JBAppVersion};
  113 + } else {
  114 + NSMutableDictionary *dic = [[NSMutableDictionary alloc] initWithDictionary:dict];
  115 + [dic addEntriesFromDictionary:@{@"appid": JBAppId, @"plat": @"i", @"version": JBAppVersion}];
  116 + return [[NSDictionary alloc] initWithDictionary:dic];
  117 + }
  118 +}
31 119  
32   -// In a storyboard-based application, you will often want to do a little preparation before navigation
33   -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
34   - // Get the new view controller using [segue destinationViewController].
35   - // Pass the selected object to the new view controller.
  120 +- (void)didReceiveMemoryWarning {
  121 + [super didReceiveMemoryWarning];
  122 + // Dispose of any resources that can be recreated.
36 123 }
37   -*/
38 124  
39 125 @end
... ...
LiveVideoCloud/Classes/Sections/homeSections/View/LVCVodPlayerListView.h deleted 100644 → 0
1   -//
2   -// LVCVodPlayerListView.h
3   -// LiveVideoCloud
4   -//
5   -// Created by cnliveJunBo on 17/6/26.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import <UIKit/UIKit.h>
10   -
11   -@interface LVCVodPlayerListView : UIView
12   -
13   -@end
LiveVideoCloud/Classes/Sections/homeSections/View/LVCVodPlayerListView.m deleted 100644 → 0
1   -//
2   -// LVCVodPlayerListView.m
3   -// LiveVideoCloud
4   -//
5   -// Created by cnliveJunBo on 17/6/26.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "LVCVodPlayerListView.h"
10   -#import "LVCVodPlayerTableViewCell.h"
11   -
12   -static NSString *vodCellId = @"vodCellId";
13   -
14   -@interface LVCVodPlayerListView()<UITableViewDelegate, UITableViewDataSource> {
15   -
16   - AFHTTPRequestOperation *_operation;
17   - NSMutableArray *_programArrayM;
18   -}
19   -
20   -@property (nonatomic, strong)UITableView *tableView;
21   -
22   -@end
23   -
24   -@implementation LVCVodPlayerListView
25   -
26   -- (instancetype)initWithFrame:(CGRect)frame
27   -{
28   - self = [super initWithFrame:frame];
29   - if (self) {
30   - self.backgroundColor = [UIColor whiteColor];
31   - _programArrayM = [[NSMutableArray alloc] init];
32   - [self requestVodPlayerList];
33   - }
34   - return self;
35   -}
36   -
37   -- (void)requestVodPlayerList {
38   -
39   - NSString *uid;
40   - if ([UserTools isLogin]) {
41   - uid = [UserInformationModel manager].uid;
42   - } else {
43   - uid = [NSString stringWithFormat:@"%u", arc4random()%3];
44   - }
45   - NSString *tm = [NSString stringWithFormat:@"%u_%@", arc4random()%10, uid];
46   -
47   - NSDictionary *parameter = @{@"cid": @"82_news/",
48   - @"page": [NSString stringWithFormat:@"%d", 1],
49   - @"pagesize": @"15",
50   - @"tm": tm};
51   -
52   - [[AFHTTPRequestOperationManager manager] GET:Newslist parameters:[self addParameters:parameter] success:^(AFHTTPRequestOperation *operation, id responseObject) {
53   -
54   - responseObject = [responseObject validatedDictionary];
55   -
56   - if (responseObject[@"programs"] && [responseObject[@"programs"] isKindOfClass:[NSArray class]]) {
57   -
58   - for (NSDictionary *dic in responseObject[@"programs"]) {
59   - ProgramModel *programModel = [ProgramModel modelWithDic:dic];
60   - [_programArrayM addObject:programModel];
61   - if (dic[@"comments"] && [dic[@"comments"] isKindOfClass:[NSArray class]] && [dic[@"comments"] count] > 0) {
62   - NSMutableArray *comments = [[NSMutableArray alloc] init];
63   - for (NSDictionary *commentDic in dic[@"comments"]) {
64   - LVCCommentModel *commentModel = [LVCCommentModel modelWithDic:commentDic];
65   - [comments addObject:commentModel];
66   - }
67   - [_programArrayM addObject:comments];
68   - }
69   - }
70   - }
71   - [self.tableView reloadData];
72   -
73   - } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
74   -
75   - NSLog(@"点播列表请求失败!");
76   - }];
77   -}
78   -
79   -#pragma mark - UITableViewDelegate !!!!!!!!!!!!!!!!!!!!!!!!
80   -
81   -#pragma mark - UITableViewDataSource !!!!!!!!!!!!!!!!!!!!!!!!
82   -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
83   - return _programArrayM.count;
84   -}
85   -
86   -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
87   -
88   - return nil;
89   -}
90   -
91   -#pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!
92   -- (UITableView *)tableView {
93   -
94   - if (!_tableView) {
95   - _tableView = [[UITableView alloc] initWithFrame:self.bounds style:UITableViewStylePlain];
96   - _tableView.dataSource = self;
97   - _tableView.delegate = self;
98   - _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
99   -
100   - UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, -KScreenHeight, KScreenWidth, KScreenHeight)];
101   - view.backgroundColor = [UIColor backgroundColor];
102   - [_tableView addSubview:view];
103   -
104   - [_tableView registerClass:[LVCVodPlayerTableViewCell class] forCellReuseIdentifier:vodCellId];
105   - }
106   - return _tableView;
107   -}
108   -
109   -#pragma mark ------------------------------ 分割线 ----------------------------------------------
110   -- (NSDictionary *)addParameters:(NSDictionary *)dict {
111   -
112   - if (![dict isKindOfClass:[NSDictionary class]]) {
113   - return dict;
114   - }
115   - if (!dict) {
116   - return @{@"appid": JBAppId, @"plat": @"i", @"version": JBAppVersion};
117   - } else {
118   - NSMutableDictionary *dic = [[NSMutableDictionary alloc] initWithDictionary:dict];
119   - [dic addEntriesFromDictionary:@{@"appid": JBAppId, @"plat": @"i", @"version": JBAppVersion}];
120   - return [[NSDictionary alloc] initWithDictionary:dic];
121   - }
122   -}
123   -
124   -@end
LiveVideoCloud/Classes/Sections/homeSections/View/LVCVodPlayerTableViewCell.h deleted 100644 → 0
1   -//
2   -// LVCVodPlayerTableViewCell.h
3   -// LiveVideoCloud
4   -//
5   -// Created by cnliveJunBo on 17/6/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import <UIKit/UIKit.h>
10   -
11   -@interface LVCVodPlayerTableViewCell : UITableViewCell
12   -
13   -@end
LiveVideoCloud/Classes/Sections/homeSections/View/LVCVodPlayerTableViewCell.m deleted 100644 → 0
1   -//
2   -// LVCVodPlayerTableViewCell.m
3   -// LiveVideoCloud
4   -//
5   -// Created by cnliveJunBo on 17/6/27.
6   -// Copyright © 2017年 cnlive. All rights reserved.
7   -//
8   -
9   -#import "LVCVodPlayerTableViewCell.h"
10   -
11   -@implementation LVCVodPlayerTableViewCell
12   -
13   -- (void)awakeFromNib {
14   - [super awakeFromNib];
15   - // Initialization code
16   -}
17   -
18   -- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
19   - [super setSelected:selected animated:animated];
20   -
21   - // Configure the view for the selected state
22   -}
23   -
24   -@end
LiveVideoCloud/Resource/TelevisionData.json 0 → 100644
  1 +[
  2 + {
  3 + "docID" : "408481",
  4 + "title" : "LiveShow",
  5 + "img" : "http:\/\/yweb0.cnliveimg.com\/cnlive\/public\/150417133551285_693.png",
  6 + "type" : "live",
  7 + "mediaId" : "liveshow"
  8 + },
  9 + {
  10 + "docID" : "285697",
  11 + "title" : "快新闻",
  12 + "img" : "http:\/\/yweb1.cnliveimg.com\/img\/cnlive\/160121113653827_867.png",
  13 + "type" : "live",
  14 + "mediaId" : "news"
  15 + },
  16 + {
  17 + "docID" : "408480",
  18 + "title" : "e娱乐",
  19 + "img" : "http:\/\/yweb2.cnliveimg.com\/img\/cnlive\/160121113659992_585.png",
  20 + "type" : "live",
  21 + "mediaId" : "eyule"
  22 + },
  23 + {
  24 + "docID" : "285698",
  25 + "title" : "潮体育",
  26 + "img" : "http:\/\/yweb3.cnliveimg.com\/img\/cnlive\/160121113706887_696.png",
  27 + "type" : "live",
  28 + "mediaId" : "chaotiyu"
  29 + },
  30 + {
  31 + "docID" : "408487",
  32 + "title" : "炫韩娱",
  33 + "img" : "http:\/\/yweb0.cnliveimg.com\/cnlive\/public\/150417133341123_878.png",
  34 + "type" : "live",
  35 + "mediaId" : "xuanhanyu"
  36 + },
  37 + {
  38 + "docID" : "285696",
  39 + "title" : "in乐台",
  40 + "img" : "http:\/\/yweb1.cnliveimg.com\/cnlive\/public\/150417144750615_185.png",
  41 + "type" : "live",
  42 + "mediaId" : "inyuetai"
  43 + }
  44 +]
0 45 \ No newline at end of file
... ...