I am trying to align an image in the top of an HStack, but when the text is multiple lines the image gets centered. How can I align the second image with the top of the text?
var infoView: some View {
VStack(alignment: .leading, spacing: 16) {
HStack(alignment: .top) {
Image("rocket")
.frame(alignment: .top)
Text("pqosejfr")
.font(.body).fontWeight(.bold)
}
HStack {
Image("bank")
Text("qwoijqoiwjoijweijqwoiejqoiwjefoiqwjefoiqjwefijqwoiejfqoiwjefoiqwjefpoiqjweoifjqpwoiejfpqoiwejfoiqwejfoiqjwefpoiqjwepoifjqpwoiejfqpoiwejfpoqiwejfpoiqwjefpoiqwjefpoiqjweofijqwepoifjpqwoiejfoij")
.font(.body).fontWeight(.bold)
}
}
}