Comments (5)
Hey @s4cha, thanks for the reply. Nice... Would you be open to receive a PR that implements Int
and CGFloat
operators? I can definitely do that if it helps to unburden you guys.
from stevia.
Hi @edulpn, Thanks for reporting this.
This looks like an issue on our side, SteviaLayoutYAxisAnchor
operators work with a Double
value. The others happen to have Int
and CGFloat
variants as well.
@available(iOS 9.0, *)
@discardableResult
public func + (left: SteviaLayoutYAxisAnchor, right: Double) -> SteviaLayoutYAxisAnchor {
return SteviaLayoutYAxisAnchor(anchor: left.anchor, constant: right)
}
For now you could cast them to Double
or just use a plain value, for example
viewA == safeAreaLayoutGuide.Top + 60
would work fine as the compiler would turn 60 as a Double
.
This is definitely something we want to fix in a future release though.
Hope it helps,
from stevia.
I have forked the repo and implemented the extra operators, but I'm not sure about the tests. Guess I could open the PR and we communicate there?
from stevia.
@edulpn of course, feel free to open the PR this is a great idea, nevermind if tests are not in there we'll work them out for you.
from stevia.
@s4cha cool! I created the PR, let me know what file the tests should be and I can also add them.
from stevia.
Related Issues (20)
- Stick two views with space between HOT 4
- Example for UIScrollView HOT 1
- Can't add the Stevia from swift package manager HOT 2
- Set left, right edges space to more than safe area HOT 2
- Additional operators for LayoutAnchors? HOT 2
- Swift Package Manager dependency resolution fails HOT 3
- UICollectionViewCell & UITableViewCell iOS 13. Add subviews in contentView.
- Value of type 'Button' has no member 'style'
- SteviaLayoutX/YAxisAnchor doesn't support inequality operators? HOT 1
- LastBaseline crash
- @_functionBuilder
- Version compatibility issue in 5.1.1 with swift 5.5 Xcode 13.1 HOT 4
- Height equal height with multiplier. HOT 1
- using layout with safeAreaLayoutGuide
- SwiftUI preview fails with error: could not find module 'Stevia' for target 'x86_64-apple-ios-simulator'; found: arm64-apple-ios-simulator
- Support for cornerRadius
- Multiplier in Constraints
- Different behaviour with same constraint
- [Privacy Manifest] Implementation HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stevia.