| | |
| | | #import "RecommendChangeFooterView.h" |
| | | |
| | | #import "UICollectionViewLeftAlignedLayout.h" |
| | | #import "RecommendVideoCardView.h" |
| | | //内容联盟 |
| | | #import <LCDSDK/LCDSDK.h> |
| | | |
| | | @interface RecommendController () <UICollectionViewDelegate, UICollectionViewDataSource, RecommendDelegate> |
| | | @interface RecommendController () <UICollectionViewDelegate, UICollectionViewDataSource, RecommendDelegate,LCDVideoCardProviderDelegate> |
| | | |
| | | @property (nonatomic, nullable, strong) UICollectionView *collectionView; |
| | | |
| | | @property (nonatomic, nullable, strong) RecommendHeaderViewCell *cellRecommendHeader; |
| | | |
| | | @property (nonatomic, nullable, strong) RecommendVideoCardView *cellRecommendVideoCard; |
| | | |
| | | @property (nonatomic, assign) NSUInteger page; |
| | | |
| | | @property (nonatomic, assign) NSUInteger position; |
| | | |
| | | @property (nonatomic, nullable, strong) NSDictionary *dictionaryBanaer; |
| | | @property (nonatomic, nullable, strong) NSArray *arrayTemp; |
| | | |
| | | @property (nonatomic, nullable, strong) NSMutableArray *arrayContent; |
| | | @property (nonatomic, assign) NSUInteger count; |
| | | |
| | | @property (nonatomic) id<LCDViewElement> videoCardElementView; |
| | | @end |
| | | |
| | | @implementation RecommendController |
| | |
| | | |
| | | - (void)setupDataConfig { |
| | | self.page = 1; |
| | | _position= self.index ;//_parms[@"Index"]; |
| | | } |
| | | |
| | | - (void)setupViewConfig { |
| | | [self.view addSubview:self.collectionView]; |
| | | LCDVideoCardProvider.sharedProvider.cardType=LCDVideoCardType2_4; |
| | | LCDVideoCardProvider.sharedProvider.shouldShowTitleView=NO; |
| | | LCDVideoCardProvider.sharedProvider.delegate=self; |
| | | LCDVideoCardProvider.sharedProvider.rootViewController=self; |
| | | } |
| | | |
| | | - (void) refreshVideoCard{ |
| | | if(!_videoCardElementView){ |
| | | _videoCardElementView= [LCDVideoCardProvider.sharedProvider buildViewElement]; |
| | | } |
| | | |
| | | [_videoCardElementView loadDataWithCompletion:^(id<LCDViewElement> _Nonnull element, NSError * _Nonnull error) { |
| | | if(!error) |
| | | { |
| | | [self.cellRecommendVideoCard updateWithElement:element]; |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | -(void)getHomeAd{ |
| | | NSLog(@"getHomeAd"); |
| | | [SVProgressHUD show]; |
| | | dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); |
| | | // 创建全局并行 |
| | |
| | | if (isSuccessful) { |
| | | NSDictionary *dic = (NSDictionary *)result; |
| | | self.dictionaryBanaer = dic[@"Data"]; |
| | | // [self.collectionView reloadSections:[NSIndexSet indexSetWithIndex:1]]; |
| | | } |
| | | NSLog(@"recommend - getHomeAdWithUid"); |
| | | dispatch_semaphore_signal(semaphore); |
| | | }]; |
| | | |
| | | }); |
| | | |
| | | |
| | | |
| | | dispatch_group_async(group, queue, ^{ |
| | | [[YTHNetInterface startInterface] getHomeTypeWithUid:[YTHsharedManger startManger].Uid vtid:_parms[@"Id"] withSystem:@"1" DataKey:_parms[@"DataKey"] PageSize:10 Page:_page withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | dispatch_semaphore_signal(semaphore); |
| | | |
| | | }]; |
| | | }); |
| | | |
| | |
| | | [SVProgressHUD dismiss]; |
| | | [self.arrayContent addObjectsFromArray:self.arrayTemp]; |
| | | [self.collectionView reloadData]; |
| | | [self.collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]]; |
| | | // [self.collectionView reloadSections:[NSIndexSet indexSetWithIndex:1]]; |
| | | }); |
| | | }); |
| | | [self refreshVideoCard]; |
| | | } |
| | | |
| | | - (void)loadFooter:(void(^)(void))handel { |
| | |
| | | } |
| | | |
| | | - (void)changeData:(NSString *)vid page:(NSUInteger)page index:(NSInteger)index { |
| | | int offset=1+(_position==0?1:0); |
| | | [[YTHNetInterface startInterface] getVideoRecommendWithUid:vid Page:page WithSystem:@"1" withBlock:^(BOOL isSuccessful, id result, NSString *error) { |
| | | if (isSuccessful) { |
| | | NSMutableDictionary *parms = [[NSMutableDictionary alloc] initWithDictionary:self.arrayContent[index-1]]; |
| | | NSMutableDictionary *parms = [[NSMutableDictionary alloc] initWithDictionary:self.arrayContent[index-offset]]; |
| | | parms[@"page"] = result[@"Data"][@"page"]; |
| | | parms[@"HomeVideoList"] = result[@"Data"][@"list"]; |
| | | self.arrayContent[index-1] = parms; |
| | | self.arrayContent[index-offset] = parms; |
| | | [self.collectionView reloadSections:[NSIndexSet indexSetWithIndex:index]]; |
| | | } |
| | | }]; |
| | |
| | | - (void)setHeaderRefresh { |
| | | self.collectionView.mj_header=[MJRefreshNormalHeader headerWithRefreshingBlock:^{ |
| | | self.page = 1; |
| | | //下拉刷新 |
| | | [self refreshVideoCard]; |
| | | [self loadFooter:^{ |
| | | |
| | | }]; |
| | |
| | | } |
| | | |
| | | - (void)cellClick:(NSIndexPath *)indexPath { |
| | | |
| | | int offset=1+(_position==0?1:0); |
| | | |
| | | if(indexPath.section<offset){ |
| | | return; |
| | | } |
| | | NSDictionary *parms = [NSDictionary new]; |
| | | BOOL BigPicture = [self.arrayContent[indexPath.section-1][@"HomeVideoList"][0][@"BigPicture"] boolValue]; |
| | | BOOL BigPicture = [self.arrayContent[indexPath.section-offset][@"HomeVideoList"][0][@"BigPicture"] boolValue]; |
| | | if (BigPicture) { |
| | | parms = self.arrayContent[indexPath.section-1][@"HomeVideoList"][indexPath.row+1][@"Video"]; |
| | | parms = self.arrayContent[indexPath.section-offset][@"HomeVideoList"][indexPath.row+1][@"Video"]; |
| | | |
| | | } else { |
| | | parms = self.arrayContent[indexPath.section-1][@"HomeVideoList"][indexPath.row][@"Video"]; |
| | | parms = self.arrayContent[indexPath.section-offset][@"HomeVideoList"][indexPath.row][@"Video"]; |
| | | } |
| | | [self onResult:parms]; |
| | | } |
| | | |
| | | - (void)headerClick:(NSIndexPath *)indexPath { |
| | | int offset=1+(_position==0?1:0); |
| | | |
| | | NSDictionary *parms = [NSDictionary new]; |
| | | parms = self.arrayContent[indexPath.section-1][@"HomeVideoList"][0][@"Video"]; |
| | | |
| | | parms = self.arrayContent[indexPath.section-offset][@"HomeVideoList"][0][@"Video"]; |
| | | |
| | | [self onResult:parms]; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { |
| | | return self.arrayContent.count+1; |
| | | //TODO 测试 |
| | | int offset=1+(_position==0?1:0); |
| | | return self.arrayContent.count+offset; |
| | | } |
| | | |
| | | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { |
| | | if (section == 0) { |
| | | int offset=1+(_position==0?1:0); |
| | | if (section <offset) { |
| | | return 1; |
| | | |
| | | } else { |
| | | NSUInteger Columns = [self.arrayContent[section-1][@"Columns"] integerValue]; |
| | | NSUInteger Columns = [self.arrayContent[section-offset][@"Columns"] integerValue]; |
| | | if (Columns == 2 || Columns == 3) { |
| | | if ([self.arrayContent[section-1][@"HomeVideoList"] count] > 0) { |
| | | BOOL BigPicture = [self.arrayContent[section-1][@"HomeVideoList"][0][@"BigPicture"] boolValue]; |
| | | if ([self.arrayContent[section-offset][@"HomeVideoList"] count] > 0) { |
| | | BOOL BigPicture = [self.arrayContent[section-offset][@"HomeVideoList"][0][@"BigPicture"] boolValue]; |
| | | if (BigPicture) { |
| | | return [self.arrayContent[section-1][@"HomeVideoList"] count]-1; |
| | | return [self.arrayContent[section-offset][@"HomeVideoList"] count]-1; |
| | | } |
| | | return [self.arrayContent[section-1][@"HomeVideoList"] count]; |
| | | return [self.arrayContent[section-offset][@"HomeVideoList"] count]; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { |
| | | |
| | | int offset=1+(_position==0?1:0); |
| | | |
| | | if (indexPath.section == 0) { |
| | | if (!self.cellRecommendHeader) { |
| | | self.cellRecommendHeader = [collectionView dequeueReusableCellWithReuseIdentifier:@"RecommendHeaderViewCell" forIndexPath:indexPath]; |
| | |
| | | self.cellRecommendHeader.delegate = self; |
| | | self.cellRecommendHeader.arrayImageData = self.dictionaryBanaer; |
| | | return self.cellRecommendHeader; |
| | | }else if (indexPath.section == 1&&offset==2) { |
| | | if (!self.cellRecommendVideoCard) { |
| | | self.cellRecommendVideoCard = [collectionView dequeueReusableCellWithReuseIdentifier:@"RecommendVideoCardView" forIndexPath:indexPath]; |
| | | } |
| | | //刷新数据 |
| | | |
| | | |
| | | |
| | | return self.cellRecommendVideoCard; |
| | | } else { |
| | | NSUInteger Columns = [self.arrayContent[indexPath.section-1][@"Columns"] integerValue]; |
| | | NSUInteger Columns = [self.arrayContent[indexPath.section-offset][@"Columns"] integerValue]; |
| | | if (Columns > 3) { |
| | | ToDayHotCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ToDayHotCell" forIndexPath:indexPath]; |
| | | cell.delegate = self; |
| | | cell.data = self.arrayContent[indexPath.section-1]; |
| | | cell.data = self.arrayContent[indexPath.section-offset]; |
| | | return cell; |
| | | |
| | | } else if (Columns == 2) { |
| | | if ([self.arrayContent[indexPath.section-1][@"HomeVideoList"] count] > 0) { |
| | | if ([self.arrayContent[indexPath.section-offset][@"HomeVideoList"] count] > 0) { |
| | | RecommendTwoColumnCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"RecommendTwoColumnCell" forIndexPath:indexPath]; |
| | | BOOL BigPicture = [self.arrayContent[indexPath.section-1][@"HomeVideoList"][0][@"BigPicture"] boolValue]; |
| | | BOOL BigPicture = [self.arrayContent[indexPath.section-offset][@"HomeVideoList"][0][@"BigPicture"] boolValue]; |
| | | if (BigPicture) { |
| | | cell.data = self.arrayContent[indexPath.section-1][@"HomeVideoList"][indexPath.row+1][@"Video"]; |
| | | cell.data = self.arrayContent[indexPath.section-offset][@"HomeVideoList"][indexPath.row+1][@"Video"]; |
| | | |
| | | } else { |
| | | cell.data = self.arrayContent[indexPath.section-1][@"HomeVideoList"][indexPath.row][@"Video"]; |
| | | cell.data = self.arrayContent[indexPath.section-offset][@"HomeVideoList"][indexPath.row][@"Video"]; |
| | | } |
| | | return cell; |
| | | |
| | |
| | | } |
| | | |
| | | } else if (Columns == 3) { |
| | | if ([self.arrayContent[indexPath.section-1][@"HomeVideoList"] count] > 0) { |
| | | if ([self.arrayContent[indexPath.section-offset][@"HomeVideoList"] count] > 0) { |
| | | RecommendThreeColumnCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"RecommendThreeColumnCell" forIndexPath:indexPath]; |
| | | BOOL BigPicture = [self.arrayContent[indexPath.section-1][@"HomeVideoList"][0][@"BigPicture"] boolValue]; |
| | | BOOL BigPicture = [self.arrayContent[indexPath.section-offset][@"HomeVideoList"][0][@"BigPicture"] boolValue]; |
| | | if (BigPicture) { |
| | | cell.data = self.arrayContent[indexPath.section-1][@"HomeVideoList"][indexPath.row+1][@"Video"]; |
| | | cell.data = self.arrayContent[indexPath.section-offset][@"HomeVideoList"][indexPath.row+1][@"Video"]; |
| | | |
| | | } else { |
| | | cell.data = self.arrayContent[indexPath.section-1][@"HomeVideoList"][indexPath.row][@"Video"]; |
| | | cell.data = self.arrayContent[indexPath.section-offset][@"HomeVideoList"][indexPath.row][@"Video"]; |
| | | } |
| | | return cell; |
| | | |
| | |
| | | // 定制collectionView的head和foot |
| | | - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath { |
| | | |
| | | int offset=1+(_position==0?1:0); |
| | | |
| | | if (kind == UICollectionElementKindSectionHeader) { |
| | | if (indexPath.section > 0) { |
| | | if (indexPath.section > offset-1) { |
| | | RecpmmendTitleView *view = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"RecpmmendTitleView" forIndexPath:indexPath]; |
| | | view.delegate = self; |
| | | BOOL BigPicture = NO; |
| | | if ([self.arrayContent[indexPath.section-1][@"HomeVideoList"] count] > 0) { |
| | | BigPicture = [self.arrayContent[indexPath.section-1][@"HomeVideoList"][0][@"BigPicture"] boolValue]; |
| | | if ([self.arrayContent[indexPath.section-offset][@"HomeVideoList"] count] > 0) { |
| | | BigPicture = [self.arrayContent[indexPath.section-offset][@"HomeVideoList"][0][@"BigPicture"] boolValue]; |
| | | } |
| | | view.isBanaer = BigPicture; |
| | | view.data = self.arrayContent[indexPath.section-1]; |
| | | view.data = self.arrayContent[indexPath.section-offset]; |
| | | view.index = indexPath.section; |
| | | view.indexPath = indexPath; |
| | | return view; |
| | | }else if(indexPath.section==1&&offset==2){ |
| | | RecpmmendTitleView *view = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"RecpmmendTitleView" forIndexPath:indexPath]; |
| | | view.delegate = self; |
| | | BOOL BigPicture = NO; |
| | | view.isBanaer = BigPicture; |
| | | view.data = @{@"Name":@"今日必看",@"HomeVideoList":@[],@"RefreshPosition":@"0"}; |
| | | view.index = indexPath.section; |
| | | view.indexPath = indexPath; |
| | | return view; |
| | | } |
| | | |
| | | } else if (kind == UICollectionElementKindSectionFooter) { |
| | | if (indexPath.section > 1) { |
| | | NSDictionary *data = self.arrayContent[indexPath.section-1]; |
| | | if (indexPath.section > offset) { |
| | | NSDictionary *data = self.arrayContent[indexPath.section-offset]; |
| | | if ([data[@"RefreshPosition"] integerValue] == 2) { |
| | | RecommendChangeFooterView *view = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"RecommendChangeFooterView" forIndexPath:indexPath]; |
| | | view.delegate = self; |
| | |
| | | return view; |
| | | } |
| | | } |
| | | UICollectionReusableView *view = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"tempFooterView" forIndexPath:indexPath]; |
| | | return view; |
| | | |
| | | } |
| | | |
| | | UICollectionReusableView *view = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"tempHeaderView" forIndexPath:indexPath]; |
| | | return view; |
| | | |
| | | |
| | | } |
| | | |
| | | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section{ |
| | | int offset=1+(_position==0?1:0); |
| | | //宽度随便定,系统会自动取collectionView的宽度 |
| | | //高度为分组头的高度 |
| | | if (section > 0) { |
| | | if ([self.arrayContent[section-1][@"HomeVideoList"] count] > 0) { |
| | | BOOL BigPicture = [self.arrayContent[section-1][@"HomeVideoList"][0][@"BigPicture"] boolValue]; |
| | | if (section > offset-1) { |
| | | if ([self.arrayContent[section-offset][@"HomeVideoList"] count] > 0) { |
| | | BOOL BigPicture = [self.arrayContent[section-offset][@"HomeVideoList"][0][@"BigPicture"] boolValue]; |
| | | if (BigPicture) { |
| | | return CGSizeMake(KScreenW, 216 + 40 + 30); |
| | | } |
| | | } |
| | | return CGSizeMake(KScreenW, 47); |
| | | }else if(section==1){ |
| | | return CGSizeMake(KScreenW, 47); |
| | | } |
| | | return CGSizeMake(CGFLOAT_MIN, CGFLOAT_MIN); |
| | | } |
| | | |
| | | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section { |
| | | if (section == 0) { |
| | | int offset=1+(_position==0?1:0); |
| | | if (section <offset) { |
| | | return CGSizeMake(CGFLOAT_MIN, CGFLOAT_MIN); |
| | | } |
| | | NSUInteger Columns = [self.arrayContent[section-1][@"RefreshPosition"] integerValue]; |
| | | NSUInteger Columns = [self.arrayContent[section-offset][@"RefreshPosition"] integerValue]; |
| | | if (Columns == 2) { |
| | | return CGSizeMake(KScreenW, 41); |
| | | |
| | |
| | | } |
| | | |
| | | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { |
| | | int offset=1+(_position==0?1:0); |
| | | if (indexPath.section == 0) { |
| | | CGFloat bannerSizeRate = [self.dictionaryBanaer[@"bannerSizeRate"] doubleValue]; |
| | | return CGSizeMake(KScreenW, 5 + (KScreenW * bannerSizeRate)); |
| | | |
| | | } else { |
| | | NSUInteger Columns = [self.arrayContent[indexPath.section-1][@"Columns"] integerValue]; |
| | | } else if (indexPath.section == 1&&offset==2) { |
| | | // return CGSizeMake(KScreenW, KScreenW/2.4 * 1.4); |
| | | return CGSizeMake(KScreenW, KScreenW/2.4 * 1.4); |
| | | } else { |
| | | NSUInteger Columns = [self.arrayContent[indexPath.section-offset][@"Columns"] integerValue]; |
| | | if (Columns > 3) { |
| | | return CGSizeMake(KScreenW, 140); |
| | | |
| | | } else if (Columns == 2) { |
| | | if ([self.arrayContent[indexPath.section-1][@"HomeVideoList"] count] > 0) { |
| | | if ([self.arrayContent[indexPath.section-offset][@"HomeVideoList"] count] > 0) { |
| | | return CGSizeMake((KScreenW-9-9-8)/2, 41+(((KScreenW-9-9-8)/2))*0.562); |
| | | |
| | | } else { |
| | |
| | | } |
| | | |
| | | } else if (Columns == 3) { |
| | | if ([self.arrayContent[indexPath.section-1][@"HomeVideoList"] count] > 0) { |
| | | if ([self.arrayContent[indexPath.section-offset][@"HomeVideoList"] count] > 0) { |
| | | return CGSizeMake((KScreenW-9-9-6-6)/3, 41+(((KScreenW-9-9-6-6)/3))*1.39); |
| | | |
| | | } else { |
| | |
| | | |
| | | //协议中的方法,用于返回整个CollectionView上、左、下、右距四边的间距 |
| | | - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section { |
| | | |
| | | if (section == 0) { |
| | | int offset=1+(_position==0?1:0); |
| | | if (section <offset) { |
| | | return UIEdgeInsetsMake(0, 0, 0, 0); |
| | | |
| | | } else { |
| | | NSUInteger Columns = [self.arrayContent[section-1][@"Columns"] integerValue]; |
| | | } else { |
| | | NSUInteger Columns = [self.arrayContent[section-offset][@"Columns"] integerValue]; |
| | | if (Columns == 2 || Columns == 3) { |
| | | return UIEdgeInsetsMake(5, 9, 0, 9); |
| | | |
| | |
| | | |
| | | //两行cell之间的间距 |
| | | - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section { |
| | | if (section == 0) { |
| | | int offset=1+(_position==0?1:0); |
| | | if (section <offset) { |
| | | return 0; |
| | | |
| | | } else { |
| | | NSUInteger Columns = [self.arrayContent[section-1][@"Columns"] integerValue]; |
| | | NSUInteger Columns = [self.arrayContent[section-offset][@"Columns"] integerValue]; |
| | | if (Columns == 2) { |
| | | return 12; |
| | | |
| | |
| | | return 10; |
| | | } |
| | | } |
| | | return 0;; |
| | | return 0; |
| | | } |
| | | |
| | | //同一行两个cell的间距 |
| | | - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section { |
| | | if (section == 0) { |
| | | int offset=1+(_position==0?1:0); |
| | | if (section <offset) { |
| | | return 0; |
| | | |
| | | } else { |
| | | NSUInteger Columns = [self.arrayContent[section-1][@"Columns"] integerValue]; |
| | | NSUInteger Columns = [self.arrayContent[section-offset][@"Columns"] integerValue]; |
| | | if (Columns == 2) { |
| | | return 8; |
| | | |
| | |
| | | [_collectionView registerClass:[RecommendTwoColumnCell class] forCellWithReuseIdentifier:@"RecommendTwoColumnCell"]; |
| | | [_collectionView registerClass:[RecommendThreeColumnCell class] forCellWithReuseIdentifier:@"RecommendThreeColumnCell"]; |
| | | |
| | | [_collectionView registerClass:[RecommendVideoCardView class] forCellWithReuseIdentifier:@"RecommendVideoCardView"]; |
| | | |
| | | [_collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"UICollectionViewCell"]; |
| | | |
| | | [_collectionView registerClass:[RecpmmendTitleView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"RecpmmendTitleView"]; |
| | |
| | | [_collectionView registerClass:[RecommendChangeFooterView class] forSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"RecommendChangeFooterView"]; |
| | | |
| | | [_collectionView registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"tempHeaderView"]; |
| | | |
| | | [_collectionView registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"tempFooterView"]; |
| | | |
| | | [self setHeaderRefresh]; |
| | | } |
| | |
| | | return _arrayContent; |
| | | } |
| | | |
| | | - (void)lcdContentRequestStart:(LCDEvent *)event{ |
| | | NSLog(@"video-card lcdContentRequestStart"); |
| | | } |
| | | |
| | | - (void)lcdContentRequestFail:(LCDEvent *)event{ |
| | | NSLog(@"video-card lcdContentRequestFail"); |
| | | } |
| | | |
| | | - (void)lcdContentRequestSuccess:(NSArray<LCDEvent *> *)events{ |
| | | NSLog(@"video-card lcdContentRequestSuccess"); |
| | | } |
| | | |
| | | @end |