mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-21 03:32:08 +00:00
Update YTPivotBarReorder.m
This commit is contained in:
parent
e3aa792f6e
commit
1f341a78f2
1 changed files with 5 additions and 7 deletions
|
|
@ -5,7 +5,6 @@
|
||||||
#import <YouTubeHeader/YTIPivotBarRenderer.h>
|
#import <YouTubeHeader/YTIPivotBarRenderer.h>
|
||||||
#import <YouTubeHeader/YTIPivotBarSupportedRenderers.h>
|
#import <YouTubeHeader/YTIPivotBarSupportedRenderers.h>
|
||||||
#import <YouTubeHeader/YTIPivotBarItemRenderer.h>
|
#import <YouTubeHeader/YTIPivotBarItemRenderer.h>
|
||||||
#import <YouTubeHeader/YTAssetLoader.h>
|
|
||||||
|
|
||||||
@interface YTPivotBarReorder ()
|
@interface YTPivotBarReorder ()
|
||||||
|
|
||||||
|
|
@ -69,12 +68,11 @@
|
||||||
|
|
||||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath];
|
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath];
|
||||||
UIImageView *iconView = [[UIImageView alloc] initWithFrame:cell.contentView.bounds];
|
UILabel *indexLabel = [[UILabel alloc] initWithFrame:cell.contentView.bounds];
|
||||||
YTIPivotBarItemRenderer *itemRenderer = self.pivotBarItems[indexPath.row];
|
indexLabel.text = [NSString stringWithFormat:@"%ld", (long)indexPath.row];
|
||||||
iconView.image = [YTAssetLoader loadImageWithIdentifier:itemRenderer.icon.identifier];
|
indexLabel.textAlignment = NSTextAlignmentCenter;
|
||||||
iconView.tintColor = [UIColor whiteColor];
|
indexLabel.textColor = [UIColor whiteColor];
|
||||||
iconView.contentMode = UIViewContentModeScaleAspectFit;
|
[cell.contentView addSubview:indexLabel];
|
||||||
[cell.contentView addSubview:iconView];
|
|
||||||
return cell;
|
return cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue