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
DSL for PlasticView Anchors and Values #76
Merged
Merged
Changes from 16 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
ba74bf9
Add offset property to Anchor
m4tbat b5c634a
Add ability to add an offset to an anchor through `+` and `-` operators
m4tbat 0438cb7
Support anchor's new offset property in PlasticView setters
m4tbat 480c2cf
Add missing operators to Value for completeness
m4tbat 16a8918
Make Value conform to ExpressibleByIntegerLiteral and ExpressibleByFl…
m4tbat 2e04d17
Add `scaled` and `fixed` properties to `CGFloat`, `Double` and `Int` …
m4tbat 599fdb9
Merge remote-tracking branch 'BendingSpoons/master' into anchor-dsl
m4tbat 2948814
Merge remote-tracking branch 'BendingSpoons/master' into anchor-dsl
m4tbat dde411e
Add tests for laying out plastic views with anchors with offsets
m4tbat f590924
Merge remote-tracking branch 'BendingSpoons/master' into anchor-dsl
m4tbat 80a408e
Add offset to anchor's coordinate
m4tbat 51ae831
Remove setTop/Bottom/Left/Right/CenterX/CenterY/Width/Height methods …
m4tbat 486eab4
Merge remote-tracking branch 'BendingSpoons/master' into anchor-dsl
m4tbat 7b90a30
Use new anchor + offset setters in Plastic convenience methods
m4tbat 3254e6a
Update tests to match changes to PlasticView anchor setters
m4tbat 762a493
Remove Value initializer `init(_ scalable: CGFloat)`
m4tbat b9c5287
Improve Anchor.coordinate
m4tbat cf6aa33
Remove ambiguous initializers from Size
m4tbat c8109b4
Remove ambiguous inizializers from EdgeInsets
m4tbat c2c279b
Update Size- and EdgeInsets-related tests
m4tbat af88c63
Remove Value conformance to ExpressibleByIntegerLiteral and Expressib…
m4tbat 17aad30
Remove extensions to CGFloat, Double and Float to add Value-returning…
m4tbat eaea787
Add overloads to + and - operators operating on Anchor and CGFloat va…
m4tbat 7791124
Add tests for creation of Anchors through the + operator taking a CGF…
m4tbat File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd change this in
return coord + view.scaleValue(offset)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍