Pregunta

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];
}];
¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top