قالب وردپرس درنا توس
Home / IOS Development / UICollectionViewCell does not match the setup properties of * initial * load. : iOSProgramming

UICollectionViewCell does not match the setup properties of * initial * load. : iOSProgramming



I created a custom layout, and I make a simple transformation in layoutAttributesForElements. There is nothing in vc for layout (only create UIViewController with a collected view.) At first load, layoutAttributesForElements is sometimes called – while contentOffset is updated by the layout engine. The first 2 times the process results in my vertical scale value for the transformation being 0.0. The final pass on the initial load value is expected to be 1.0; but the cell has no height – confirmed through the layout debugger. I must literally just make the pan pan view 1pt and the cell straightens itself.

I'm lost on how to troubleshoot this. I can't explain how it looks to me that the latest layoutAttributes are not being used ̵

1; even if asked for? The setup is invalidated (through a basic shouldInvalidateLayout impl) just before the last call to layoutAttributesForElements.


Source link