I have the following snippet (but you can see my entire code in GitHub, if you want):
LazyVGrid(columns: columns) {
ForEach(books) { book in
BookView(book: book)
.draggable(Book.BookTransferable(persistanceIdentifier: book.id))
}
}
and BookView is:
VStack {
Image(nsImage: book.image)
.resizable()
.frame(width: 150, height: 200)
.scaledToFill()
Text(book.title)
.lineLimit(1)
.font(.headline)
HStack {
ForEach(book.tags.sorted(), id: \.self) { tag in
TagView(tag: tag, showText: false)
}
}
}
.padding()
This will render each BookView on a different base-line because of the fact that the Text view sometimes takes 1, 2 or even 3 lines (as shown).
How can I have all BookViews alligned at a common base-line (as it would if Text would only take one line, for example)?