March 2014
Intermediate to advanced
672 pages
40h 11m
English
The NSLayoutConstraint’s class method constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant: (gesundheit!) creates a single constraint at a time. These constraints relate one item to another.
The creation method produces a strict view.attribute R view.attribute * multiplier + constant relation, where R is an equal-to (==), a greater-than-or-equal-to (>=), or a less-than-or-equal-to (<=) relation.
Consider the following example:
[self.view addConstraint: [NSLayoutConstraint constraintWithItem:textfield attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeCenterX ...
Read now
Unlock full access