I have a very simple application. It contains a red view and a green label inside it. There is also a button that runs animation. I animate the red view by changing its width constraint constant's value.
[self.view layoutIfNeeded];
[UIView animateWithDuration:0.4 animations:^{
self.widthConstraint.constant = width;
[self.view layoutIfNeeded];
}];
The red view animates as expected, but the green label inside changes its width instantly. I played with different animation flags, tried several tips from SO but did not bring it work.
Please find the sources here.
TIA
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…