VideoCoverViewC.m 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // VideoCoverViewC.m
  3. // BuguLive
  4. //
  5. // Created by 岳克奎 on 17/4/19.
  6. // Copyright © 2017年 xfg. All rights reserved.
  7. //
  8. #import "VideoCoverViewC.h"
  9. #import "STCollectionPhotoCell.h"
  10. @interface VideoCoverViewC ()
  11. @end
  12. @implementation VideoCoverViewC
  13. - (void)viewDidLoad {
  14. [super viewDidLoad];
  15. // Do any additional setup after loading the view from its nib.
  16. }
  17. - (void)didReceiveMemoryWarning {
  18. [super didReceiveMemoryWarning];
  19. // Dispose of any resources that can be recreated.
  20. }
  21. #pragma **************************** Getter 区域 ***************************
  22. #pragma mark -- VideoDynamicView
  23. -(VideoCoverView *)videoCoverView{
  24. if (!_videoCoverView) {
  25. _videoCoverView = (VideoCoverView *)[VideoCoverView showSTBaseViewOnSuperView:self.view
  26. loadNibNamedStr:@"VideoCoverView"
  27. andFrameRect:CGRectMake(0, 0, kScreenW, kScreenH)
  28. andComplete:^(BOOL finished,
  29. STBaseView *stBaseView) {
  30. }];
  31. //[_videoCoverView setDelegate:self];
  32. [_videoCoverView setBaseDelegate:self];
  33. }
  34. return _videoCoverView;
  35. }
  36. #pragma ************************* Delegate 代理 ***************************
  37. #pragma mark ---点击cell事件
  38. -(void)showSTCollectionView:(STCollectionBaseView *)stCollectionView
  39. andCollectionView:(UICollectionView *)collectionView
  40. didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
  41. STCollectionPhotoCell *cell = (STCollectionPhotoCell *)[collectionView cellForItemAtIndexPath:indexPath];
  42. cell.isSelectedState = YES;
  43. self.videoCoverView.selectIndexRow = indexPath.row;
  44. [collectionView reloadData];
  45. [self.videoCoverView.showSelectedImgView setImage:self.videoCoverView.dataSourceMArray[self.videoCoverView.selectIndexRow]];
  46. [self.videoCoverView.showSelectedImgView setNeedsDisplay];
  47. //回调
  48. if (_selectImgInMarrayblock) {
  49. _selectImgInMarrayblock(indexPath.row);
  50. }
  51. }
  52. @end