I’m trying to make an animation for collapsing a view which includes some subviews.
[UIView beginAnimations:@"advancedAnimations" context:nil];
[UIView setAnimationDuration:3.0];
CGRect aFrame = aView.frame;
aView.size.height = 0;
aView.frame = aFrame;
[UIView commitAnimations];
This animation is doing fine, but for the aView only. Subviews doesn’t collapse as expected.
How do I make the subviews collapsing as well? Furthermore, is there a way to recalculate original size after collapsing?
THX
You have probably forgotten to apply some autoresizing mask to your subviews. If you do
it should work.
BUT,
personally I would use, as lamelas said