One. Drag 4 UIButton to the interface, arranged according to the desired layout, for the convenience of description, the button named 1, 2, 3, 4.
Two. The three constraints for setting 1 are height 30, 10 from top, and 47 from the left.
Three. The constraint for setting 2 is: 10 from the top. Then press the control key, the mouse click on the 2 pull line point 1, from the pop-up box (such as) Select Equal widths,equal heights,horizontal spaciing, and set horizontal spaciing value of 30.
Four. The constraint for setting 3 is: 10 from the top. Then press the control key, click the mouse 3 to point to 1, from the pop-up box (such as) Select Equal widths,equal Heights, mouse click 3 Pull line point 2 Select horizontal spaciing, and set horizontal The value of spaciing is 30.
Five. The constraint of setting 4 is: Distance from top 10, distance to right 48, then control key, mouse click 4 Pull line pointing to 1, select Equal widths,equal Heights from popup box (e.g.), mouse click 4 Pull line point 3 Select Horizontal Spaciing, and set the value of horizontal spaciing to 30.
Six. Select Update Frames and the button is set!
iOS button auto Layout average arrangement