Hacker News new | ask | show | jobs
by thought_alarm 3752 days ago
Or use NSLayoutAnchor, which was added in iOS 9 and OS X 10.10;

    [box.widthAnchor constraintEqualToConstant:50].active = YES;
    [box.centerAnchor constrantEqualToAnchor:self.view.centerAnchor].active = YES;