New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setting trailing edge to inset has opposite of expected (and previous) behavior #316
Comments
@colinta for edges (left/right/top/bottom) Are you saying when doing like: |
Interesting, so it sounds like they're supposed to work how I would expect. I just updated an app to use SnapKit 3, and one of my views was placed incorrectly. Here's the relevant code:
What I expected (and this was the case in 0.22) was for the left and right edges to be 20pt from the I haven't tried the usage |
@colinta the issue is probably leading/trailing are broken as a regression! |
Ok, I'll see if I can help! I'll take a look at
I see that |
@colinta yea so this is tricky… It should probably be inverted for both if trailing edge? |
e.g. UIEdgeInsets(left: 10, right: 10) in both cases the constant for the right edge should be -10 |
@colinta should be fixed in 3.0.1 release that just went out. Let me know if it persists! |
Verified working! Thanks, Robert. |
New Issue Checklist
Issue Info
Issue Description
This might be because
But the example that immediately follows that warning uses all positive values
make.edges.equalTo(UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)).inset()
, which leads me to believe that I should continue to use positive values. Plus that makes sense, given thatUIEdgeInsets
use positive values to make rects smaller than their enclosing rect.So given all that - should I be using negative values here? I hope that's not the case, I am re-using this
UIEdgeInset
in other calculations in my app, which all assume that positive values make the rect smaller.The text was updated successfully, but these errors were encountered: