ios--basic knowledge--autolayout and ScrollView

Source: Internet
Author: User
    • Add ScrollView and its child views
      • Parent view. Addsubview (ScrollView)
      • Scrollview.addsubview (Container)--container is a placeholder view
      • Container.addsubviews (true · Want to show the views)
    • Pull (or masturbate) constraints
      • ScrollView. Four sides stick to the parent view. Four edges
      • Container. Four-sided adhesion ScrollView.
      • Container.width = Scrollview.width (if you want to implement horizontal scrolling, it is Container.height = scrollview.height)
      • Container.subviews (Really want to show the views) to enjoy the layout, just remember a little, 拉(或撸)出来的约束要能确定出container的高度(横向滚动则为宽度) .
        The most straightforward layout is the same as in my demo: "v:|-[imageview]-[label]-[label]--[contentview]-[label]-|", sticking one from top to bottom, so that the height can be counted.

Excerpt from: http://www.jianshu.com/p/15277e17f127

ios--basic knowledge--autolayout and ScrollView

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.