Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the default animation duration for UICollectionView layout changes?

Say I do this:

[self.collectionView setCollectionViewLayout:myNewLayout animated:YES];

What is the duration of the animation that happens?

My application of this is that I'm animating layer properties inside the cells when this changes, and because layer animations don't get caught by UIView's block-based animations, I have to do it separately with my own animation block.

like image 929
Tom Hamming Avatar asked Jan 29 '15 22:01

Tom Hamming


1 Answers

It you know you're inside a UIView animation, then [CATransaction animationDuration] will give you what you need.

like image 98
Nicolas B. Avatar answered Sep 30 '22 17:09

Nicolas B.