Commit 2ef8d2735d35a7cd8f5fb91b3b7590e01b166cfe

Authored by 朱林
2 parents 05aa016e 73e31a2d

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

LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLiveListController.m
@@ -27,6 +27,8 @@ static NSString *cellId = @"cellId"; @@ -27,6 +27,8 @@ static NSString *cellId = @"cellId";
27 self.view.backgroundColor = [UIColor whiteColor]; 27 self.view.backgroundColor = [UIColor whiteColor];
28 28
29 [self loadData]; 29 [self loadData];
  30 +
  31 + [self.view addSubview:self.collectionView];
30 } 32 }
31 33
32 - (void)loadData { 34 - (void)loadData {
@@ -69,29 +71,17 @@ static NSString *cellId = @"cellId"; @@ -69,29 +71,17 @@ static NSString *cellId = @"cellId";
69 return cell; 71 return cell;
70 } 72 }
71 73
72 -- (void)scrollViewDidScroll:(UIScrollView *)scrollView {  
73 -  
74 -  
75 -}  
76 -  
77 -- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {  
78 -  
79 - NSLog(@"停止");  
80 -}  
81 -  
82 #pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 74 #pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
83 - (UICollectionView *)collectionView { 75 - (UICollectionView *)collectionView {
84 76
85 if (!_collectionView) { 77 if (!_collectionView) {
86 UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; 78 UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
87 - layout.minimumLineSpacing = 0; 79 + layout.minimumLineSpacing = 10;
88 layout.minimumInteritemSpacing = 0; 80 layout.minimumInteritemSpacing = 0;
89 - layout.itemSize = self.view.bounds.size; 81 + layout.itemSize = CGSizeMake(SCREEN_WIDTH, SCREEN_HEIGHT * 0.6);
90 _collectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:layout]; 82 _collectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:layout];
91 - _collectionView.pagingEnabled = YES;  
92 - _collectionView.contentOffset = CGPointMake(0, 30); 83 + _collectionView.backgroundColor = [UIColor lightGrayColor];
93 _collectionView.showsHorizontalScrollIndicator = NO; 84 _collectionView.showsHorizontalScrollIndicator = NO;
94 - _collectionView.scrollEnabled = NO;  
95 _collectionView.dataSource = self; 85 _collectionView.dataSource = self;
96 _collectionView.delegate = self; 86 _collectionView.delegate = self;
97 [_collectionView registerClass:[LVCUGCLivePlayerCell class] forCellWithReuseIdentifier:cellId]; 87 [_collectionView registerClass:[LVCUGCLivePlayerCell class] forCellWithReuseIdentifier:cellId];
@@ -99,7 +89,6 @@ static NSString *cellId = @"cellId"; @@ -99,7 +89,6 @@ static NSString *cellId = @"cellId";
99 return _collectionView; 89 return _collectionView;
100 } 90 }
101 91
102 -  
103 - (void)didReceiveMemoryWarning { 92 - (void)didReceiveMemoryWarning {
104 [super didReceiveMemoryWarning]; 93 [super didReceiveMemoryWarning];
105 // Dispose of any resources that can be recreated. 94 // Dispose of any resources that can be recreated.
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCUGCLivePlayerCell.m
@@ -28,4 +28,7 @@ @@ -28,4 +28,7 @@
28 } 28 }
29 } 29 }
30 30
  31 +#pragma mark - SetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  32 +
  33 +
31 @end 34 @end