1. Adaptation of controls
Let the following view (green section) emulator, which requires a human constraint (constraints)
1, first make a top constraint, select View (Be sure to select the control you want to adjust)--editor--pin--top Space to Superview
2. Next, set the Contant value to 0, meaning that the view control is 0 from the top of the simulator and set to 0, and that the left side will not change, the constraint will work at compile time and will not respond in real time in development
Next, add the left constraint (leading space to Superview), the right constraint (trailling space to Superview), the bottom constraint (Bottom space to Superview), Set their contant all to 10,command+s save it.
Look at the effect, like this, the top constraint is 0, left, right, bottom constrained to 10 of a view (but we develop the panel does not change, in order to facilitate development can be manually adjusted to display, easy to develop)
2. The distance between the two controls
Quick Fit 1.2.3 steps with a detailed picture ...
Update 2015-04-09
Click the GIF image to see the dynamic operation! 1) How is the view centered?
2) 2 views always keep a distance between them?
3) ...
Recommendation: Directly use control+ left mouse button, select a view of the Tula line to the other side of the selection, very convenient!
Summary: Just simple constraints, suitable for the screen more convenient, less write code. For how to use Storyborad (GitHub to find a simple demo, very simple) do not demonstrate, if you do not understand can Weibo contact, research study, thank you ^_^
3. Set the control to percent screen
Xcode6 above control layout in iOS, distance between two controls, percentage of controls