Oddly enough, I am looking now, I know that adding restrictions to AutoLayout IB is simple. But I really could not understand why my simple limitations do not work when I resize (ZoomIn Animation) UIView.
The view I aimed at zoomIn works fine, but there is no proper presentation in it. It seems that the restrictions do not work.
From this setting, where in the yellow boxes are UIViews and the green boxes are UIImageViews. When I tapped the yellow box, it should zoom in, as shown in the photo below.

These are the limitations:

This should be the expected result when animating ZoomIn. But I’m out of luck, the yellow box is zoomIn, but the green box is turned back and has not been resized.
, , topSpace bottomSpace Yellow Box Green Box .
:
- (void) resizeViewWithZoomInAnimation: (UIView*)view duration:(float)secs option:(UIViewAnimationOptions) option {
float newWidth = view.superview.frame.size.width - 20;
float newHeight = view.superview.frame.size.height - 20;
[UIView animateWithDuration:secs delay:0.0 options:option
animations: ^{
switch ([view tag]) {
case 1:
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, newWidth, newHeight)];
break;
case 2:
[view setFrame:CGRectMake(CGRectGetMaxX(view.frame),CGRectGetMinY(view.frame), -newWidth , newHeight)];
break;
case 3:
[view setFrame:CGRectMake(CGRectGetMinX(view.frame),CGRectGetMaxY(view.frame), newWidth , -newHeight)];
break;
case 4:
[view setFrame:CGRectMake(CGRectGetMaxX(view.frame),CGRectGetMaxY(view.frame), -newWidth, -newHeight)];
break;
}
}
completion:nil];
}
zoomIn Animation:
