Animate NSCollectionView on bounds change?

Hi,


I recently posted this question to the cocoa-dev list but didn't get an answer; maybe someone here can help!


I have a 10.11+ NSCollectionView and a custom layout, and I’d like to animate the items in the collection when the bounds change. This does not involve inserting or deleting items or changing the layout, just repositioning them when the view changes size. It’s exactly this question:


https://stackoverflow.com/questions/52091074/how-to-animate-a-relayout-of-nscollectionviewlayout-on-bounds-change


I see the code belongs in


- (void)prepareForAnimatedBoundsChange:(NSRect)oldBounds;
- (void)finalizeAnimatedBoundsChange;


but it’s not clear to me what to put in these methods.


Thanks,

Demitri