zepojo / UPCarouselFlowLayout

A fancy carousel flow layout for UICollectionView on iOS.
MIT License
1.66k stars 236 forks source link

Thread 1: EXC_BAD_ACCESS (code=2, address=0x16ba93fe0) #61

Open NourMustafa9 opened 4 years ago

NourMustafa9 commented 4 years ago

Thread 1: EXC_BAD_ACCESS (code=2, address=0x16ba93fe0)

override open func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { guard let superAttributes = super.layoutAttributesForElements(in: rect), let attributes = NSArray(array: superAttributes, copyItems: true) as? [UICollectionViewLayoutAttributes] else { return nil }

    return attributes.map({ self.transformLayoutAttributes($0) })
}