是否可以在iOS 7自定义转换中设置约束动画

Sea*_*son 6 autolayout ios7 custom-transition

在示例中我似乎只能使用变换或正在修改帧.我错过了一些明显的事吗?目前其他动画(淡入淡出)都工作正常,但约束仍然锁定在位.

一个快速的代码片段:

[[customViewController view] layoutIfNeeded];
[UIView animateWithDuration:2 animations:^{

    [[customViewController constraintToAnimate] setConstant:1024];
    [[customViewController view] layoutIfNeeded];

} completion:^(BOOL finished) {
    [transitionContext completeTransition:YES];
}];
Run Code Online (Sandbox Code Playgroud)

Zig*_*nis 0

您需要layoutIfNeeded致电[[customViewController view] superview]