user10291 Published in September 19, 2018, 7:20 pm
I'm trying to scroll to a specific item in a collection view and it seems to happening properly about 90 % of the time. I basically have a collection view whose frame I change via auto layout and then I want my cell be the size of the all of the new frame, so I set a new size. When I put a breakpoint on the scrollToItemAtIndexPath, it seems when it works works the item size have taken effect, but the times it doesn't work, the cell still have the old size. How can I make sure the itemSize has changed before scrolling?