Created
January 16, 2013 09:57
-
-
Save drance/4546014 to your computer and use it in GitHub Desktop.
Workaround to vanilla UICollectionView+UICollectionViewFlowLayout using non-integral origins, leading to blurry cells.
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
@implementation BHSCollectionViewFlowLayout | |
- (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect { | |
NSArray *allAttrs = [super layoutAttributesForElementsInRect:rect]; | |
for (UICollectionViewLayoutAttributes *attributes in allAttrs) { | |
attributes.frame = CGRectIntegral(attributes.frame); | |
} | |
return allAttrs; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment