Q:

How to move other uiobjects relatevely when a new view is shown in the main view

I am developing an iPhone app,which contain a page consisting of three UISwitch. When the the UISwitch is in On state the app displays a small view below the switch. This works for all three switches. But the problem is that the small views displayed will overlaps if I switch on two switches at a time. Is there a way to shift all the other view relatevely when those views are displayed..
Thanx in advance....

A:

This sort of problem is exactly what auto layout is good for. When you add a new object, remove and regenerate your constraints (you may only need to change a couple, depending on what it currently in place), then call layoutIfNeeded on the superview. If you do that inside an animation block, it will even animate into the new layout for you. 

