From 1f341a78f25f2b0dc71ee8d04e188e0df30de7dc Mon Sep 17 00:00:00 2001 From: aricloverEXALT <157071384+aricloverEXALT@users.noreply.github.com> Date: Sun, 12 Jan 2025 15:49:03 -0600 Subject: [PATCH] Update YTPivotBarReorder.m --- Sources/YTPivotBarReorder.m | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Sources/YTPivotBarReorder.m b/Sources/YTPivotBarReorder.m index 35da147..248b4fc 100644 --- a/Sources/YTPivotBarReorder.m +++ b/Sources/YTPivotBarReorder.m @@ -5,7 +5,6 @@ #import #import #import -#import @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; }