I’ve got a UILabel and what I want to do is to smoothly change it’s height to 0.
CGRect newFrame = self.label1.frame;
newFrame.size.height = 0;
[UIView animateWithDuration:1.0 animations:^{
self.label1.frame = newFrame;
}];
The problem is that the animation is jamming does some wierd things. I guess that the label is trying to resize and reposition it’s text and that is why it does not work. I’ve tried like every possible combination of properties on the label but without success.
You could enclose your
UILabelinto anotherUIView, set the enclosingUIViewautoresizesSubviews‘ property toNOandclipToBoundstoYES, and then animate the height of the enclosingUIView…