You need to call layoutIfNeeded
on the [[customViewController view] superview]
Is it possible to animate a constraint in iOS 7 custom transition
-
14-06-2023 - |
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];
}];
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow