Skip to content

fillEqually not work when use ForEach in UVStack #31

@EkkoG

Description

@EkkoG

This works well

        view.body {
            UVStack {
                UView().background(.random)
                UView().background(.random)
                UView().background(.random)
            }.edgesToSuperview().alignment(.fill).distribution(.fillEqually)
        }

Simulator Screen Shot - iPhone 11 - 2022-04-19 at 00 41 09

This will not work.

        view.body {
            UVStack {
                UForEach([0, 1, 2]) { i in
                    UText("识别结果, \(i)").background(.random)
                }
            }.edgesToSuperview().alignment(.fill).distribution(.fillEqually)
        }

image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions