-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add Forbearance #358
Add Forbearance #358
Conversation
Excuse me, I don't know how to add it to you example😋, Not found file "MASConstraintMaker+Forbearance.h" |
@iStarEternal looks good, I'm on holiday until August so I'll try and merge it up then if that's ok with you. |
@robertjpayne The Citizen have never been such a long holiday in China🙊🙊🙊 |
@robertjpayne Yes! It's Sudoku! Now, You just need to write a method that can layout Sudoku~~~ |
I want my outcome is used by people all over the world. 😄 |
@iStarEternal I've looked at this again, I think we've overthought this a lot and as per #88 I think there are some valid points about not including this API in the maker. In saying that I do think that it's a bit annoying right now to set, even more so in Objective-C but I think the API should still come from the view itself rather than the constraint maker. We really only need four properties:
I don't think we gain much by splitting the API up too much, we currently don't split margins into
This simplifies the code a lot and reduces a ton of user errors that may crop up if someone tries something silly like I know you've put a lot of work into this and I appreciate it, but I'm just mindful it adds an API that can result in a lot of undefined behaviour. |
Very simple implementation, but this didn't realize I expected style unification. Look at the NSArray+MASAdditions.m, I wrote two very good Sudoku layout
|
Closing this, feel free to open a new PR updated against my recommendations, Again mostly do not feel this API is appropriate in the maker API. |
It fix the issues #344
It's able to write elegant syntax:
make.horizontal.hugging.priorityRequired()
to replace the redundant syntax[view setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]
.Hope you like it.