I'm trying to align some content inside a ScrollView
.
I would like to get part of this content centered and another part aligned to the leading of my screen.
I can't understand why my following code isn't working, it seems that my content is centered and doesn't take the whole width.
I did try to set the width, but none has worked.
Any idea on how I could keep my Text("center")
centered and get my hello's
list to the left ?
Here is my current code :
struct ReportView: View {
var body: some View {
NavigationView {
ScrollView(.vertical) {
VStack(alignment: .center) {
Text("centered")
}
VStack(alignment: .leading) {
ForEach(1...10, id: \.self) { value in
Text("hello \(value)")
}
}
}
.navigationTitle(L10n.Tab.Reports.item)
}
}
}