Learning sdautolayout Summary of usage of third-party libraries

Source: Internet
Author: User

---restore content starts---

I think the sdautolayout layout is the best use of the third-party library, here to learn sdautolayout usage summarize

1 Usage Description:2 1.1> Leftspacetoview (Self.view,Ten)3 A method with "Spacetoview" in the method name represents the spacing of a reference view, which requires passing 2 parameters: (UIView) referring to the View and (cgfloat) spacing values4 1.2> Widthratiotoview (Self.view,1)5 Methods with "Ratiotoview" in the method name indicate that the width or height of the view is proportional to the corresponding property value of the reference view, and 2 parameters are passed: (UIView) refer to view and (cgfloat) multiples6 1.3>Topequaltoview (view)7 A method with "Equaltoview" in the method name means that a property of view is equal to the corresponding property value of the reference view, and 1 parameters need to be passed: (UIView) Reference View8 1.4> Widthis ( -)9 A method with "is" in the method name means that a property value of view is equal to the parameter value, and 1 parameters need to be passed: (cgfloat) valueTen 1.5> Autoheightratio (0) One Autoheightratio () 0 automatically calculates the height according to the text (a value greater than 0 sets the ratio of height to width based on this value) A 1.6>The Cell is highly adaptive (just the following line of code) -[Self Setupautoheightwithbottomview:bottomview bottommargin: the]; - //Bottomview bottom view; distance from cell at bottom of BottomMargin

---restore content ends---

Learning sdautolayout Summary of usage of third-party libraries

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.