I'm trying to align the first line of texts with .firstTextBaseline
however doesn't seem to work with LazyHStack. Similarly using AlignmentGuide also doesn't seem to be working. Am i missing something with understanding LazyHStacks?
Sample code:
struct ContentView: View {
var body: some View {
LazyHStack(alignment: .firstTextBaseline) {
VStack {
Color.green
.frame(width: 100, height: 100)
Text("blah blah")
}
// .alignmentGuide(VerticalAlignment.firstTextBaseline) { d in // this also has no effect
// d[.top]
// }
Text("---- Center Line ----")
VStack {
Color.green
.frame(width: 100, height: 100)
Text("blah blah blah \nblah")
.fixedSize()
}
}
.background {
Color.blue
}
}
}