Document of constraintEqualToAnchor:constant: is confusing or wrong

Originator:an00na
Number:rdar://22351435 Date Originated:19-Aug-2015 05:15 PM
Status:Resolved Resolved:16-Sep-2015 06:15 PM
Product:Documentation Product Version:
Classification:Other Bug Reproducible:Not Applicable
 
The document of constant c uses “first attribute” and “second attribute” to refer to the anchors:
The constant offset for this relationship.
For NSLayoutXAxisAnchor objects, this is the number of points the second attribute is after the first attribute. When using leading or trailing attributes, this will move the second attribute in the current language’s reading direction. For English, this moves the second attribute to the right. For left and right attributes, it always moves the second attribute to the right.
For NSLayoutYAxisAnchor objects, this is the number of points the second attribute is below the first attribute.
For NSLayoutDimension objects, this is the number of points that the second attribute is larger than the first attribute.


It is not clear which is which. In fact, in the point view of a method, “first” usually means “self” and “second” means the other. In this paring, the document is totally wrong because the constant is added to the other anchor but should be added to the “self” anchor.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!