问题
I'm trying to animate the height of a UICollectionViewCell when the user taps on it.
The basic functionality is working as expected. It collapses and expands when tapped BUT my UICollectionViewCells are customized and have a headerView and a contentView so when I animate the height it collapses the contentView to 0 and only the header is visible vise versa on expanding. The problem is that the contentView is just there/gone and is not animating as the cell (its superview) itself.
See the screenshots for a better understanding:
The animation when I tap on a header (red). The contentView is instantaneously visible but the cell animates behind it:

After the animation has finished everything is fine:

Tapping again collapses the cell as expected but the contentView (blue) is hidden instantaneously:

The implementation is done by performing batch updates on the collectionViewLayout. I think its just a little flag or something but I'm searching for a while now.
EDIT: After disabling auto layout in my custom UICollectionViewCell it's working perfectly BUT this seems more like a workaround to me. So I'll leave this question open.
来源:https://stackoverflow.com/questions/23113129/animate-uicollectionviewcell-collapsing