Question

All I can seem to find in examples are using transforms or are modifying frames. Have I missed something obvious? Currently the other animations (fades) are all working fine, however the constraint stays locked in position.

A quick code snippet:

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

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

} completion:^(BOOL finished) {
    [transitionContext completeTransition:YES];
}];
Was it helpful?

Solution

You need to call layoutIfNeeded on the [[customViewController view] superview]

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top