Use full width
Bryanx opened this issue · comments
HI @Bryanx , that option is not implemented in the current state. I'll try to implement it for the next version. If you are up for it, I'd be glad if you would like to help.
The feature has been added by d1fc706
(update to 2.0.0 for this to work)
WrappingHStack(1...20, id:\.self, spacing: .dynamic(minSpacing: 8)) {
Text("Item: \($0)")
.padding(.all, 20)
.background(Rectangle().stroke())
}
Hi thanks this is a big improvement, however not exactly what I was looking for. For example when aligning center right now it still sort of aligns horizontally:
WrappingHStack(1...20, id:\.self, alignment: .center) {
Text("Item: \($0)")
.padding(.all, 20)
.background(Rectangle().stroke())
}
Most ideal would be something like CSS flex is capable of:
I will take a look if I can come up with a fork that implements this.
All these options are possible starting with 2.1.0. You can check out the example project to see how it works.
Amazing this is perfect, thank you!