Comments (4)
Hi @pikanezi,
Thank you for choosing code over XML :p
layout()
is the preferred way of laying things out vertically but it's totally fine having things outside of a layout block :)
In your case you need image.fillContainer()
, which is the equivalent of :
layout(
0,
|image|,
0
)
Hope it helps ;)
from stevia.
Thank you @s4cha,
What if I want to add something on top of this image?
Thank you for your help and time, I really appreciate it :)
Vincent
from stevia.
Just make sure the views in sv()
are in the right order to make sure your background is at the back.
And then layout things the way you would normally do :)
sv(
backgroundImage,
label,
separator
)
backgroundImage.fillContainer()
layout(
label,
13,
|separator| ~ 2,
0
)
from stevia.
Oh I see! Thank you for your help :)
from stevia.
Related Issues (20)
- Help, layout constraints like SnapKit HOT 2
- 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
- Working with Safe Area Layout Guide and Operators HOT 5
- 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
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.