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; }