方法一:
[self.view layoutIfNeeded];
[UIView animateWithDuration:0.3
animations:^{
self.textlayout.constant = 0;
[self.view layoutIfNeeded]; // Called on parent view
}];
原文:https://blog.csdn.net/chaokuzc/article/details/46458809
方法二:
self.textlayout.constant = 0;
[UIView animateWithDuration:0.3
animations:^{
[self.view layoutIfNeeded]; // Called on parent view
}];