我在示例中似乎只能找到使用变换或正在修改框架。我错过了什么明显的东西吗?目前其他动画(淡入淡出)都工作正常,但是约束保持锁定在位置。
一个快速的代码片段:
[[customViewController view] layoutIfNeeded];
[UIView animateWithDuration:2 animations:^{
[[customViewController constraintToAnimate] setConstant:1024];
[[customViewController view] layoutIfNeeded];
} completion:^(BOOL finished) {
[transitionContext completeTransition:YES];
}];