Skip to content

Commit

Permalink
Update YTPivotBarReorder.m
Browse files Browse the repository at this point in the history
  • Loading branch information
aricloverEXALT authored Jan 12, 2025
1 parent 5f6c31a commit f59bc0b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Sources/YTPivotBarReorder.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ - (void)loadActivePivotTabs {
YTIPivotBarRenderer *pivotBarRenderer = [guideRenderers pivotBarRenderer];
for (YTIPivotBarSupportedRenderers *renderer in [pivotBarRenderer itemsArray]) {
YTIPivotBarItemRenderer *itemRenderer = [renderer pivotBarItemRenderer];
NSString *title = itemRenderer.title;
[activeTabs addObject:title];
[activeTabs addObject:itemRenderer];
}
}

Expand All @@ -61,7 +60,7 @@ - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSe
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath];
UILabel *label = [[UILabel alloc] initWithFrame:cell.contentView.bounds];
label.text = self.pivotBarItems[indexPath.row];
label.text = [self.pivotBarItems[indexPath.row] string];
label.textAlignment = NSTextAlignmentCenter;
[cell.contentView addSubview:label];
return cell;
Expand Down

0 comments on commit f59bc0b

Please sign in to comment.