mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 21:26:04 +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/YTIPivotBarSupportedRenderers.h>
|
||||
#import <YouTubeHeader/YTIPivotBarItemRenderer.h>
|
||||
#import <YouTubeHeader/YTAssetLoader.h>
|
||||
|
||||
@interface YTPivotBarReorder ()
|
||||
|
||||
|
|
@ -69,12 +68,11 @@
|
|||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath];
|
||||
UIImageView *iconView = [[UIImageView alloc] initWithFrame:cell.contentView.bounds];
|
||||
YTIPivotBarItemRenderer *itemRenderer = self.pivotBarItems[indexPath.row];
|
||||
iconView.image = [YTAssetLoader loadImageWithIdentifier:itemRenderer.icon.identifier];
|
||||
iconView.tintColor = [UIColor whiteColor];
|
||||
iconView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[cell.contentView addSubview:iconView];
|
||||
UILabel *indexLabel = [[UILabel alloc] initWithFrame:cell.contentView.bounds];
|
||||
indexLabel.text = [NSString stringWithFormat:@"%ld", (long)indexPath.row];
|
||||
indexLabel.textAlignment = NSTextAlignmentCenter;
|
||||
indexLabel.textColor = [UIColor whiteColor];
|
||||
[cell.contentView addSubview:indexLabel];
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue