Giter Club home page Giter Club logo

Comments (3)

nickynick avatar nickynick commented on July 22, 2024

I thought it'd be worth to point out that for a single edge, you can write like this: make.top.equalTo(@10);. This is identical to make.top.equalTo(view.superview).with.offset(10);.

Perhaps it would be nice be able to do the same with edges/sizes, something like this: make.edges.equalTo([NSValue valueWithUIEdgeInsets:UIEdgeInsetsZero]);. Or, much better, this: make.edges.equalTo(UIEdgeInsetsZero);.

I really like how auto-boxing is implemented in Expecta, and I think we could borrow it for Masonry. Just look how beautiful this would be:

make.height.equalTo(20);
make.size.equalTo(CGSizeMake(50, 100));
make.edges.equalTo(UIEdgeInsetsMake(10, 0, 10, 0));

In fact, I'm willing to give it a shot if it's fine with you @cloudkite :)

from masonry.

erichoracek avatar erichoracek commented on July 22, 2024

@nickynick Seems reasonable as a fix for this issue—it's much more semantic and overall simpler than my suggestion. Especially if it can be done without breaking the API. 👍

from masonry.

cloudkite avatar cloudkite commented on July 22, 2024

@eric-horacek those changes are now in the latest cocoapods release. Closing but if it doesn't cover your use case or you still think its worthwhile please reopen, thanks!

from masonry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.