Hacker News new | ask | show | jobs
by bdarnell 3757 days ago
Or while we're sharing, here's mine in Obj-C++ (although I never managed to extract it into a separate package):

https://github.com/viewfinderco/viewfinder/blob/master/clien...

    [self addConstraints:box.anchorWidth == 50];
    [self addConstraints:box.anchorHeight == 50];
    [self addConstraints:box.anchorCenterX == self.view.anchorCenterX];
    [self addConstraints:box.anchorCenterY == self.view.anchorCenterY];