IOS 6 AutoLayout Scale and Cast Animation

My goal is to reduce 3 images, grow and move along the horizontal axis depending on the choice. Using auto-layout seems to cause the images to come closer when they try to execute top view space / bottom space for supervisor restrictions.

To combat this, I put all the images in their own UIView. UIView has a maximum image size that can be increased, it is centered on the horizontal axis. So, now all the images should be concentrated inside the corresponding UIView. This fixed my problem as UIViews perform horizontal translation while images are compressed / growing inside while staying centered. My question is the right way to do this? This seems to be very long, and as I may be abusing the auto-linking ability. I have to perform similar tasks with lots of images, and so any advice is welcome! Thank you

+7
source share
1 answer

I just wrote a short essay on this topic:

How to adjust CALayer anchor point when auto layout is used?

In principle, autostart does not play well with any kind of conversion. The simplest solution is to completely exclude your view from the startup control, but as an alternative, you can give it only restrictions that will not resist the specific type of conversion that you intend to apply. This second solution is similar to what you are doing.

+8
source

All Articles