I've been stuck with this problem for quite some time now. When developing iOS applications in objective-c, how can we programmatically change the position (location) of UIViews when Autolayout is enabled? It's so easy without Autolayout since we just specify a new center for the UIView as such:
UIView.center = CGPointMake(x,y);
However, the above no longer works because of Autolayout. Ultimately, I'm trying to animate a certain UIView by using the translation transform from left to right. In order to do that though, I need to move the UIViews around programmatically, which I'm currently unable to do. The below is what I'm trying to essentially do (but it does not work because of autolayout):
_loginTextLabel.center = CGPointMake(1,1);
[UIView animateWithDuration:0.5 delay:0.5 options:nil animations:^{
_loginTextLabel.center= CGPointMake(5, 1);
} completion:nil
];
}