IOS AutoLayout Automatic Layout Intermediate Development tutorial (7)-bottom top baseline baseline alignment

Source: Internet
Author: User

How do I add a similar alignment constraint to multiple view or button bottom-aligned top alignments, and so on? The simplest way to use storyboard is to use the code implementation in a subsequent tutorial.

For example, how do you add bottom alignment for these two or more views?

(or top aligned, left aligned, right justified, baseline baseline aligned?)

First explain the essence of alignment: top or bottom alignment: Essentially, the y-coordinate of a view is defined to the left or right: Essentially, the x-coordinate of a view is centerx/y aligned: determine Y/



Note that the premise of alignment is to have one of the top (or bottom, and so on) constraints already determined, for example, after determining the constraints of the button1 we select the other buttons and then we can add alignment constraints!


To add the alignment steps:

1. Set the constraint of any button, preferably to determine its position, to prevent it from disappearing from the screen:

2. Press and hold the CMD key + mouse/Click to select the 3 buttons that you need to align all of the visual Turu

3. Adding constraints

Steps such as:

Select the view control that you want to align


Add alignment constraints, there are many, specific meanings I've already labeled


The final effect, bottom alignment, and other alignment methods are similar and are not mentioned here.



Originally from: Http://blog.csdn.net/yangbingbinga


IOS AutoLayout Automatic Layout Intermediate Development tutorial (7)-bottom top baseline baseline alignment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.