iOS Development Basics--all enumerated values in the added constraints

Source: Internet
Author: User

/** Add a constraint to the enumeration value * code in the Nslayoutconstraint class
*
* @param item:view1: Controls to constrain
* @param attribute:attr1: type of constraint (how to constrain)
* @param relatedby:relation: Relationship to the reference control
* @param toitem:view2: Referenced controls
* @param attribute:attr2: type of constraint (how to constrain) * @param multiplier:multiplier: Multiplier * @param constant:c: constant (fixed value) */Word That's who's where the position is equal to whose position multiply by a factor + last correction value (leftmost right correction is positive, rightmost left correction is negative)/** constraint type options
Nslayoutattributeleft = 1,//left
Nslayoutattributeright,//Right
Nslayoutattributetop,//Top
Nslayoutattributebottom,//Bottom
Nslayoutattributeleading,//left
Nslayoutattributetrailing,//Right
Nslayoutattributewidth,//width
Nslayoutattributeheight,//height
Nslayoutattributecenterx,//center x value
Nslayoutattributecentery,//Center Y value
Nslayoutattributebaseline,//baseline
Nslayoutattributelastbaseline = Nslayoutattributebaseline,
Nslayoutattributefirstbaseline Ns_enum_available_ios (8_0),

Margin margin
Nslayoutattributeleftmargin Ns_enum_available_ios (8_0),
Nslayoutattributerightmargin Ns_enum_available_ios (8_0),
Nslayoutattributetopmargin Ns_enum_available_ios (8_0),
Nslayoutattributebottommargin Ns_enum_available_ios (8_0),
Nslayoutattributeleadingmargin Ns_enum_available_ios (8_0),
Nslayoutattributetrailingmargin Ns_enum_available_ios (8_0),
Nslayoutattributecenterxwithinmargins Ns_enum_available_ios (8_0),
Nslayoutattributecenterywithinmargins Ns_enum_available_ios (8_0),

Nslayoutattributenotanattribute = 0
*/

/** relationship to the reference control
Nslayoutrelationlessthanorequal =-1, less than or equal to
nslayoutrelationequal = 0, equals
Nslayoutrelationgreaterthanorequal = 1, greater than equals */code: Masonry third-party framework/**
Type of constraint:
1. Size: width\height\size
2. Boundary: Left\leading\right\trailing\top\bottom
3. Center point: center\centerx\centery 4. Boundary: Edges//This method will delete all previous constraints and add new constraints
[Blueview mas_remakeconstraints:^ (Masconstraintmaker *make) {
}]; This method will overwrite some of the previous specific constraints
[Blueview mas_updateconstraints:^ (Masconstraintmaker *make) {

}];     The following one is greater than or equal to/less than or equal to (I can't remember, when using the translation software look good) Greaterthanorequalto Equalto equals Lessthanorequalto Mas_equalto: This method will wrap the parameters Equalto: This method does not wrap the parameters mas_equalto the function is stronger than > Equalto Add the above macro there is no difference, a detailed look at ppt*/

iOS Development Basics--all enumerated values in the added constraints

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.