// // customFlowLayout.m // ThePaperHD // // Created by scar1900 on 15/3/4. // Copyright (c) 2015年 scar1900. All rights reserved. // #import "customFlowLayout.h" @implementation customFlowLayout //- (void)prepareLayout { // [super prepareLayout]; //} // //- (NSArray*)layoutAttributesForElementsInRect:(CGRect)rect //{ // NSArray* allAttributesInRect = [super layoutAttributesForElementsInRect:rect]; // for(UICollectionViewLayoutAttributes *attribute in allAttributesInRect) // { // attribute.frame = CGRectMake(attribute.frame.origin.x - self.collectionView.frame.size.width, attribute.frame.origin.y, attribute.frame.size.width, attribute.frame.size.height); // } // return allAttributesInRect; //} //- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath //{ // UICollectionViewLayoutAttributes* allAttributesInRect = [super layoutAttributesForItemAtIndexPath:indexPath]; //// allAttributesInRect.frame = CGRectMake(allAttributesInRect.frame.origin.x - self.collectionView.frame.size.width, allAttributesInRect.frame.origin.y, allAttributesInRect.frame.size.width, allAttributesInRect.frame.size.height); // return allAttributesInRect; //} // //- (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds //{ // return YES; //} // //- (UICollectionViewLayoutAttributes*)initialLayoutAttributesForAppearingItemAtIndexPath:(NSIndexPath*)itemIndexPath //{ // UICollectionViewLayoutAttributes* layoutAttributes = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:itemIndexPath]; // // return layoutAttributes; //} // //- (void)invalidateLayout //{ // //} @end