Month: June 2015

New NSLayoutAnchor class

I was reading through iOS 9’s API diffs, and found this gem: NSLayoutAnchor. Instead of creating an NSLayoutConstraint objects directly, you start with one of the UIView, NSView, or UILayoutGuide objects you wish to constrain, and select one of that object’s anchor properties. // Creating constraints using NSLayoutConstraint [NSLayoutConstraint constraintWithItem:subview attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeadingMargin multiplier:1.0…

Read the full article