Commit 7815e12752453ef828127ade13ee97d6793390f5
1 parent
94437476
改的
Showing
6 changed files
with
36 additions
and
17 deletions
LiveVideoCloud.xcodeproj/project.pbxproj
| ... | ... | @@ -259,7 +259,6 @@ |
| 259 | 259 | D2EBC8711F02108000F198FB /* LiveListService.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8661F02108000F198FB /* LiveListService.m */; }; |
| 260 | 260 | D2EBC8721F02108000F198FB /* LVCLiveActivityInfoService.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8681F02108000F198FB /* LVCLiveActivityInfoService.m */; }; |
| 261 | 261 | D2EBC8741F02108000F198FB /* LVCUGCLiveListController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC86C1F02108000F198FB /* LVCUGCLiveListController.m */; }; |
| 262 | - D2EBC8751F02108000F198FB /* LVCUGCLiveListView.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC86E1F02108000F198FB /* LVCUGCLiveListView.m */; }; | |
| 263 | 262 | D2EBC8761F02108000F198FB /* LVCUGCLivePlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8701F02108000F198FB /* LVCUGCLivePlayerController.m */; }; |
| 264 | 263 | D2EBC87B1F02108F00F198FB /* LVCUGCLiveListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8781F02108F00F198FB /* LVCUGCLiveListModel.m */; }; |
| 265 | 264 | D2EBC87C1F02108F00F198FB /* LVCUGCLivePlayerModel.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC87A1F02108F00F198FB /* LVCUGCLivePlayerModel.m */; }; |
| ... | ... | @@ -267,6 +266,7 @@ |
| 267 | 266 | D2EBC8841F02109C00F198FB /* LVCUGCLivePlayerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8801F02109C00F198FB /* LVCUGCLivePlayerCell.m */; }; |
| 268 | 267 | D2EBC8851F02109C00F198FB /* LVCUGCPlayerLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8821F02109C00F198FB /* LVCUGCPlayerLoadingView.m */; }; |
| 269 | 268 | D2EBC8881F0225D900F198FB /* LVCVodPlayerListController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC8871F0225D900F198FB /* LVCVodPlayerListController.m */; }; |
| 269 | + D2EBC88B1F02361600F198FB /* LVCUGCLiveListView.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC88A1F02361600F198FB /* LVCUGCLiveListView.m */; }; | |
| 270 | 270 | /* End PBXBuildFile section */ |
| 271 | 271 | |
| 272 | 272 | /* Begin PBXContainerItemProxy section */ |
| ... | ... | @@ -812,8 +812,6 @@ |
| 812 | 812 | D2EBC8681F02108000F198FB /* LVCLiveActivityInfoService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCLiveActivityInfoService.m; sourceTree = "<group>"; }; |
| 813 | 813 | D2EBC86B1F02108000F198FB /* LVCUGCLiveListController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLiveListController.h; sourceTree = "<group>"; }; |
| 814 | 814 | D2EBC86C1F02108000F198FB /* LVCUGCLiveListController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLiveListController.m; sourceTree = "<group>"; }; |
| 815 | - D2EBC86D1F02108000F198FB /* LVCUGCLiveListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLiveListView.h; sourceTree = "<group>"; }; | |
| 816 | - D2EBC86E1F02108000F198FB /* LVCUGCLiveListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLiveListView.m; sourceTree = "<group>"; }; | |
| 817 | 815 | D2EBC86F1F02108000F198FB /* LVCUGCLivePlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLivePlayerController.h; sourceTree = "<group>"; }; |
| 818 | 816 | D2EBC8701F02108000F198FB /* LVCUGCLivePlayerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLivePlayerController.m; sourceTree = "<group>"; }; |
| 819 | 817 | D2EBC8771F02108F00F198FB /* LVCUGCLiveListModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLiveListModel.h; sourceTree = "<group>"; }; |
| ... | ... | @@ -828,6 +826,8 @@ |
| 828 | 826 | D2EBC8821F02109C00F198FB /* LVCUGCPlayerLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCPlayerLoadingView.m; sourceTree = "<group>"; }; |
| 829 | 827 | D2EBC8861F0225D900F198FB /* LVCVodPlayerListController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCVodPlayerListController.h; sourceTree = "<group>"; }; |
| 830 | 828 | D2EBC8871F0225D900F198FB /* LVCVodPlayerListController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCVodPlayerListController.m; sourceTree = "<group>"; }; |
| 829 | + D2EBC8891F02361600F198FB /* LVCUGCLiveListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLiveListView.h; sourceTree = "<group>"; }; | |
| 830 | + D2EBC88A1F02361600F198FB /* LVCUGCLiveListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLiveListView.m; sourceTree = "<group>"; }; | |
| 831 | 831 | /* End PBXFileReference section */ |
| 832 | 832 | |
| 833 | 833 | /* Begin PBXFrameworksBuildPhase section */ |
| ... | ... | @@ -2173,16 +2173,14 @@ |
| 2173 | 2173 | D2EBC85F1F020F3C00F198FB /* Controller */ = { |
| 2174 | 2174 | isa = PBXGroup; |
| 2175 | 2175 | children = ( |
| 2176 | - D2EBC8651F02108000F198FB /* LiveListService.h */, | |
| 2177 | - D2EBC8661F02108000F198FB /* LiveListService.m */, | |
| 2178 | - D2EBC8671F02108000F198FB /* LVCLiveActivityInfoService.h */, | |
| 2179 | - D2EBC8681F02108000F198FB /* LVCLiveActivityInfoService.m */, | |
| 2180 | 2176 | D2EBC86B1F02108000F198FB /* LVCUGCLiveListController.h */, |
| 2181 | 2177 | D2EBC86C1F02108000F198FB /* LVCUGCLiveListController.m */, |
| 2182 | - D2EBC86D1F02108000F198FB /* LVCUGCLiveListView.h */, | |
| 2183 | - D2EBC86E1F02108000F198FB /* LVCUGCLiveListView.m */, | |
| 2184 | 2178 | D2EBC86F1F02108000F198FB /* LVCUGCLivePlayerController.h */, |
| 2185 | 2179 | D2EBC8701F02108000F198FB /* LVCUGCLivePlayerController.m */, |
| 2180 | + D2EBC8651F02108000F198FB /* LiveListService.h */, | |
| 2181 | + D2EBC8661F02108000F198FB /* LiveListService.m */, | |
| 2182 | + D2EBC8671F02108000F198FB /* LVCLiveActivityInfoService.h */, | |
| 2183 | + D2EBC8681F02108000F198FB /* LVCLiveActivityInfoService.m */, | |
| 2186 | 2184 | ); |
| 2187 | 2185 | path = Controller; |
| 2188 | 2186 | sourceTree = "<group>"; |
| ... | ... | @@ -2201,6 +2199,8 @@ |
| 2201 | 2199 | D2EBC8611F020F3C00F198FB /* View */ = { |
| 2202 | 2200 | isa = PBXGroup; |
| 2203 | 2201 | children = ( |
| 2202 | + D2EBC8891F02361600F198FB /* LVCUGCLiveListView.h */, | |
| 2203 | + D2EBC88A1F02361600F198FB /* LVCUGCLiveListView.m */, | |
| 2204 | 2204 | D2EBC87D1F02109C00F198FB /* LVCUGCBackgroundView.h */, |
| 2205 | 2205 | D2EBC87E1F02109C00F198FB /* LVCUGCBackgroundView.m */, |
| 2206 | 2206 | D2EBC87F1F02109C00F198FB /* LVCUGCLivePlayerCell.h */, |
| ... | ... | @@ -2451,6 +2451,7 @@ |
| 2451 | 2451 | D2575C4A1E7685DE00E3A8FC /* UIView+Bubbling.m in Sources */, |
| 2452 | 2452 | D2EBC8571F01FF9200F198FB /* LVCCommentModel.m in Sources */, |
| 2453 | 2453 | D23BBDB81EF8D15D002FE0B8 /* LVCMainHeaderCollectionReusableView.m in Sources */, |
| 2454 | + D2EBC88B1F02361600F198FB /* LVCUGCLiveListView.m in Sources */, | |
| 2454 | 2455 | D2029CA61E6EADE10027CD92 /* MJRefreshHeader.m in Sources */, |
| 2455 | 2456 | D2029CC41E6EADE10027CD92 /* UIImageView+WebCache.m in Sources */, |
| 2456 | 2457 | 4B45CE801EB86A590079AFB7 /* idAndPwdView.m in Sources */, |
| ... | ... | @@ -2571,7 +2572,6 @@ |
| 2571 | 2572 | D24CFC201EFA092300AA6ADB /* JBBannerView.m in Sources */, |
| 2572 | 2573 | D2029CBD1E6EADE10027CD92 /* SDWebImageManager.m in Sources */, |
| 2573 | 2574 | D2029CB41E6EADE10027CD92 /* UIView+MJExtension.m in Sources */, |
| 2574 | - D2EBC8751F02108000F198FB /* LVCUGCLiveListView.m in Sources */, | |
| 2575 | 2575 | 81FB5B3C1E7A6FFC00F98E1D /* SevenSwitch.m in Sources */, |
| 2576 | 2576 | D2EBC8761F02108000F198FB /* LVCUGCLivePlayerController.m in Sources */, |
| 2577 | 2577 | D2029CA91E6EADE10027CD92 /* MJRefreshAutoStateFooter.m in Sources */, | ... | ... |
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCTelevisionCell.h
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCTelevisionCell.m
| ... | ... | @@ -35,6 +35,12 @@ |
| 35 | 35 | |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | +- (void)setProgramModel:(ProgramModel *)programModel { | |
| 39 | + | |
| 40 | + [_imgView sd_setImageWithURL:[NSURL URLWithString:programModel.img] placeholderImage:[UIImage imageNamed:@"load_03"]]; | |
| 41 | + _titleLab.text = programModel.title; | |
| 42 | +} | |
| 43 | + | |
| 38 | 44 | #pragma mark - |
| 39 | 45 | #pragma mark - getter |
| 40 | 46 | - (UIImageView *)imgView | ... | ... |
LiveVideoCloud/Classes/Sections/UGCSections/Controller/LVCUGCLiveListView.h renamed to LiveVideoCloud/Classes/Sections/UGCSections/View/LVCUGCLiveListView.h
LiveVideoCloud/Classes/Sections/UGCSections/Controller/LVCUGCLiveListView.m renamed to LiveVideoCloud/Classes/Sections/UGCSections/View/LVCUGCLiveListView.m
LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCVodPlayerListController.m
| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | // |
| 8 | 8 | |
| 9 | 9 | #import "LVCVodPlayerListController.h" |
| 10 | +#import "LVCTelevisionCell.h" | |
| 10 | 11 | |
| 11 | 12 | static NSString *vodCellId = @"vodCellId"; |
| 12 | 13 | |
| ... | ... | @@ -28,6 +29,8 @@ static NSString *vodCellId = @"vodCellId"; |
| 28 | 29 | self.navigationItem.title = @"点播"; |
| 29 | 30 | self.view.backgroundColor = [UIColor whiteColor]; |
| 30 | 31 | _programArrayM = [[NSMutableArray alloc] init]; |
| 32 | + [self requestVodPlayerList]; | |
| 33 | + [self.view addSubview:self.tableView]; | |
| 31 | 34 | } |
| 32 | 35 | |
| 33 | 36 | - (void)requestVodPlayerList { |
| ... | ... | @@ -73,6 +76,16 @@ static NSString *vodCellId = @"vodCellId"; |
| 73 | 76 | } |
| 74 | 77 | |
| 75 | 78 | #pragma mark - UITableViewDelegate !!!!!!!!!!!!!!!!!!!!!!!! |
| 79 | +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 80 | + | |
| 81 | + [tableView deselectRowAtIndexPath:indexPath animated:NO]; | |
| 82 | + | |
| 83 | + | |
| 84 | +} | |
| 85 | + | |
| 86 | +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | |
| 87 | + return SCREEN_WIDTH*9/16+40; | |
| 88 | +} | |
| 76 | 89 | |
| 77 | 90 | #pragma mark - UITableViewDataSource !!!!!!!!!!!!!!!!!!!!!!!! |
| 78 | 91 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { |
| ... | ... | @@ -81,23 +94,22 @@ static NSString *vodCellId = @"vodCellId"; |
| 81 | 94 | |
| 82 | 95 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
| 83 | 96 | |
| 84 | - return nil; | |
| 97 | + LVCTelevisionCell *cell = [tableView dequeueReusableCellWithIdentifier:vodCellId forIndexPath:indexPath]; | |
| 98 | + | |
| 99 | + cell.programModel = _programArrayM[indexPath.row]; | |
| 100 | + return cell; | |
| 85 | 101 | } |
| 86 | 102 | |
| 87 | 103 | #pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 88 | 104 | - (UITableView *)tableView { |
| 89 | 105 | |
| 90 | 106 | if (!_tableView) { |
| 91 | - _tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain]; | |
| 107 | + _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height - 50) style:UITableViewStylePlain]; | |
| 92 | 108 | _tableView.dataSource = self; |
| 93 | 109 | _tableView.delegate = self; |
| 94 | 110 | _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; |
| 95 | 111 | |
| 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]; | |
| 112 | + [_tableView registerClass:[LVCTelevisionCell class] forCellReuseIdentifier:vodCellId]; | |
| 101 | 113 | } |
| 102 | 114 | return _tableView; |
| 103 | 115 | } | ... | ... |