IOS Xcode6 AutoLayout with size Classes (2)

Source: Internet
Author: User

Let's actually use the AutoLayout.

Create a new xib as follows, drag a text box, and then change its color to red


Our demand is that he will be 30 distance from the top left 10 distance from the bottom 10 (if the traditional write dead so on the different phones will be a particularly bad problem, so we should use automatic layout to constrain it, solve this problem)


First we select the Created text box and click on the button below


Then constrain it to a distance up or down 10


The last Xib will become


And then I'll talk to you about Xcode6 's layout artifact.




And then the view we just created came out.

You can also choose more mobile phone OH


IOS Xcode6 AutoLayout with size Classes (2)

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.