Created
December 2, 2014 17:26
-
-
Save thomasdegry/e88bdc5f1d40c29363e6 to your computer and use it in GitHub Desktop.
Delegate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { | |
NSLog(@"fucked up collectionview is messing with me, width %f, two wide cells are %f, inner cells should be %f", self.collectionView.bounds.size.width, self.collectionView.bounds.size.width * 0.173333333, self.collectionView.bounds.size.width * 0.130666667); | |
if(indexPath.row % 7 == 0) { | |
NSLog(@"left"); | |
return CGSizeMake(self.collectionView.bounds.size.width*0.173333333, 54); | |
} else if(indexPath.row % 7 == 6) { | |
NSLog(@"right"); | |
return CGSizeMake(self.collectionView.bounds.size.width*0.173333333, 54); | |
} else { | |
NSLog(@"mid"); | |
return CGSizeMake(self.collectionView.bounds.size.width*0.130666667, 54); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment