mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 17:15:32 +00:00
Update YTPivotBarReorder.m
This commit is contained in:
parent
1f341a78f2
commit
7f632008c5
1 changed files with 11 additions and 1 deletions
|
|
@ -68,11 +68,21 @@
|
|||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath];
|
||||
UILabel *indexLabel = [[UILabel alloc] initWithFrame:cell.contentView.bounds];
|
||||
YTIPivotBarItemRenderer *itemRenderer = self.pivotBarItems[indexPath.row];
|
||||
|
||||
UILabel *indexLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, cell.contentView.bounds.size.width, cell.contentView.bounds.size.height/2)];
|
||||
indexLabel.text = [NSString stringWithFormat:@"%ld", (long)indexPath.row];
|
||||
indexLabel.textAlignment = NSTextAlignmentCenter;
|
||||
indexLabel.textColor = [UIColor whiteColor];
|
||||
|
||||
UILabel *identifierLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, cell.contentView.bounds.size.height/2, cell.contentView.bounds.size.width, cell.contentView.bounds.size.height/2)];
|
||||
identifierLabel.text = itemRenderer.pivotIdentifier;
|
||||
identifierLabel.textAlignment = NSTextAlignmentCenter;
|
||||
identifierLabel.textColor = [UIColor whiteColor];
|
||||
identifierLabel.font = [UIFont systemFontOfSize:10];
|
||||
|
||||
[cell.contentView addSubview:indexLabel];
|
||||
[cell.contentView addSubview:identifierLabel];
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue