Closed Fight closed 8 years ago
Try Updating 'layoutAttributesForElementsInRect' in swift 2.0 referred from http://stackoverflow.com/questions/32291135/custom-uicollectionviewlayouts-layoutattributesforelementsinrect-does-not-overr
override func layoutAttributesForElementsInRect(rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
var attributes = [UICollectionViewLayoutAttributes]() if self.itemAttributes != nil { for section in self.itemAttributes { let filteredArray = section.filteredArrayUsingPredicate( NSPredicate(block: { (evaluatedObject, bindings) -> Bool in return CGRectIntersectsRect(rect, evaluatedObject.frame) }) ) as! [UICollectionViewLayoutAttributes] attributes.appendContentsOf(filteredArray) } } return attributes }
I you branch the code, make the changes you require and issue a pull request I'll look to merging this back in.
Try Updating 'layoutAttributesForElementsInRect' in swift 2.0 referred from http://stackoverflow.com/questions/32291135/custom-uicollectionviewlayouts-layoutattributesforelementsinrect-does-not-overr
override func layoutAttributesForElementsInRect(rect: CGRect) -> [UICollectionViewLayoutAttributes]? {