Commit 23f01cdd088db74d614ef7fc49eb6490863ba0c8
1 parent
0238ea09
扩大文字展示空间
Showing
5 changed files
with
11 additions
and
4 deletions
CNLiveCServiceModule.podspec
CNLiveCServiceModule/Classes/Present/CNLiveServicePresent.m
| ... | ... | @@ -52,7 +52,7 @@ static const CGFloat margin = 15; |
| 52 | 52 | { |
| 53 | 53 | CNLiveSearchHotsModel *model1 = nil; |
| 54 | 54 | if (hots && hots.count > 0) { |
| 55 | - model1 = [CNLiveServicePresent dealDataSource:hots title:@"热度推荐" subtitle:@"" cellHeight:0 itemSize:CGSizeMake((SCREEN_WIDTH-4*margin-3*margin)/4.0, 80)showNum:0]; | |
| 55 | + model1 = [CNLiveServicePresent dealDataSource:hots title:@"热度推荐" subtitle:@"" cellHeight:0 itemSize:CGSizeMake((SCREEN_WIDTH-2*margin)/4.0, 80)showNum:0]; | |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | NSMutableArray *array2 = [NSMutableArray array]; |
| ... | ... | @@ -350,7 +350,7 @@ static const CGFloat margin = 15; |
| 350 | 350 | @"title":dict[@"title"], |
| 351 | 351 | @"lists":dict[@"list"], |
| 352 | 352 | @"layout":@{ |
| 353 | - @"width":@((SCREEN_WIDTH-4*margin-3*margin)/4.0), | |
| 353 | + @"width":@((SCREEN_WIDTH-2*margin)/4.0), | |
| 354 | 354 | @"height":@(70) |
| 355 | 355 | } |
| 356 | 356 | }; | ... | ... |
CNLiveCServiceModule/Classes/ViewController/CNLiveAllServiceVC.m
| ... | ... | @@ -182,6 +182,9 @@ static NSString *HistoryFootID = @"UICollectionFooterView"; |
| 182 | 182 | - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section{ |
| 183 | 183 | return UIEdgeInsetsMake(5, 15, 10, 15); |
| 184 | 184 | } |
| 185 | +- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section{ | |
| 186 | + return 0; | |
| 187 | +} | |
| 185 | 188 | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section{ |
| 186 | 189 | return CGSizeMake(collectionView.width, 60); |
| 187 | 190 | } | ... | ... |
CNLiveCServiceModule/Classes/ViewController/CNLiveMyServicesVC.m
| ... | ... | @@ -138,8 +138,9 @@ static NSString *HotListCellID = @"HotListCellID"; |
| 138 | 138 | { |
| 139 | 139 | if (!_listCollectionView) { |
| 140 | 140 | UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; |
| 141 | - layout.itemSize = CGSizeMake((SCREEN_WIDTH-4*15-3*15)/4.0, 80); | |
| 141 | + layout.itemSize = CGSizeMake((SCREEN_WIDTH-2*15)/4.0, 80); | |
| 142 | 142 | layout.sectionInset = UIEdgeInsetsMake(15, 15, 15, 15); |
| 143 | + layout.minimumInteritemSpacing = 0; | |
| 143 | 144 | _listCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; |
| 144 | 145 | _listCollectionView.backgroundColor = kWhiteColor; |
| 145 | 146 | _listCollectionView.collectionViewLayout = layout; | ... | ... |
CNLiveCServiceModule/Classes/ViewController/CNLiveServiceSearchVC.m
| ... | ... | @@ -262,6 +262,9 @@ static NSString *HistoryFootID = @"HistoryFootID"; |
| 262 | 262 | - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section{ |
| 263 | 263 | return UIEdgeInsetsMake(10, 15, 10, 15); |
| 264 | 264 | } |
| 265 | +- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section{ | |
| 266 | + return 0; | |
| 267 | +} | |
| 265 | 268 | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section{ |
| 266 | 269 | return CGSizeMake(collectionView.width, 40); |
| 267 | 270 | } | ... | ... |