Commit 9f6a653370212fb528336805257722f96719bd6d
1 parent
09c25294
将UGC直播添加到首页
Showing
1 changed file
with
9 additions
and
1 deletions
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/HomeViewController.m
| ... | ... | @@ -14,6 +14,7 @@ |
| 14 | 14 | #import "V8HorizontalPickerView.h" |
| 15 | 15 | #import "MHPagingScrollView.h" |
| 16 | 16 | #import "LVCTelevisionView.h" |
| 17 | +#import "LVCUGCLiveListView.h" | |
| 17 | 18 | |
| 18 | 19 | @interface HomeViewController ()<V8HorizontalPickerViewDataSource, V8HorizontalPickerViewDelegate,MHPagingScrollViewDelegate,UIScrollViewDelegate> |
| 19 | 20 | { |
| ... | ... | @@ -53,7 +54,7 @@ |
| 53 | 54 | [UGCLiveListBtn addTarget:self action:@selector(UGCLiveListAction) forControlEvents:UIControlEventTouchUpInside]; |
| 54 | 55 | [self.view addSubview:UGCLiveListBtn]; |
| 55 | 56 | |
| 56 | - _titleArr = @[@"推荐",@"频道"]; | |
| 57 | + _titleArr = @[@"直播",@"推荐",@"频道"]; | |
| 57 | 58 | CGFloat width = 0; |
| 58 | 59 | for (NSString *title in _titleArr) { |
| 59 | 60 | CGSize size = [title sizeWithAttributes:@{NSFontAttributeName:self.titleView.elementFont}]; |
| ... | ... | @@ -165,6 +166,13 @@ |
| 165 | 166 | tvView = [[LVCTelevisionView alloc] init]; |
| 166 | 167 | } |
| 167 | 168 | return tvView; |
| 169 | + }else if ([_titleArr[index] isEqualToString:@"直播"]) { | |
| 170 | + | |
| 171 | + LVCUGCLiveListView *liveListView = (LVCUGCLiveListView *)[pagingScrollView pageViewByIndex:index]; | |
| 172 | + if (!liveListView) { | |
| 173 | + liveListView = [[LVCUGCLiveListView alloc] initWithFrame:self.view.bounds]; | |
| 174 | + } | |
| 175 | + return liveListView; | |
| 168 | 176 | } |
| 169 | 177 | return nil; |
| 170 | 178 | } | ... | ... |