IOS Automatic layouts (auto layout)

Source: Internet
Author: User

The layout of iOS is not the same as the layout of Android:

The main use of Android is nine layouts: linear layout, frame layout and so on.

The layout constraints are used for IOS.

At the same time, the old auto resize can still be used (will be turned into constraints).

If a view does not add any constraints to the xib, then the system will automatically constrain the view.

Learn the automatic layout, mainly through so and iOS guide, as well as various blogs.

view1.attribute1 = multiplier × view2.attribute2 + constant

Keep this formula in mind, assuming that you are the system, how coordinates are calculated.

ScrollView is a special view in the layout, divided into two parts.

One is the view window, and you can see the size by looking at the frame property.

One is the size of the content, and by looking at the Contentsize property, you can see the size of the content.

Scrolling is only possible if the size of the content exceeds the size of the view.

IOS Automatic layouts (auto layout)

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.