I got this message when I added and ran a test project:
UICollectionViewFlowLayout has cached frame mismatch for index path <NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0} - cached value: {{20, 10.083407407407407}, {374, 84}}; expected value: {{20, 10}, {374, 84}}
This is likely occurring because the flow layout subclass Coin.VegaScrollFlowLayout is modifying attributes returned by UICollectionViewFlowLayout without copying them.
Any idea how to fix this? The one solution I found didn't work:
override func finalLayoutAttributesForDisappearingItemAtIndexPath(itemIndexPath: NSIndexPath) -> UICollectionViewLayoutAttributes? {
let attr = self.layoutAttributesForItemAtIndexPath(itemIndexPath)?.copy() as! UICollectionViewLayoutAttributes
// manipulate the attr
return attr
}
I got this message when I added and ran a test project:
UICollectionViewFlowLayout has cached frame mismatch for index path <NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0} - cached value: {{20, 10.083407407407407}, {374, 84}}; expected value: {{20, 10}, {374, 84}} This is likely occurring because the flow layout subclass Coin.VegaScrollFlowLayout is modifying attributes returned by UICollectionViewFlowLayout without copying them.
Any idea how to fix this? The one solution I found didn't work:
override func finalLayoutAttributesForDisappearingItemAtIndexPath(itemIndexPath: NSIndexPath) -> UICollectionViewLayoutAttributes? { let attr = self.layoutAttributesForItemAtIndexPath(itemIndexPath)?.copy() as! UICollectionViewLayoutAttributes // manipulate the attr return attr }