I want to create a multiline text
view with bullet points indented to the right. The text following these bullet points is long and is looping to the next row, which I want. However, the part that is being looped is not keeping the original indentation that I gave the line.
This is my code:
Text("""
Moving piece
• To move pieces, click on the piece you want to move
• Then click on the square you want to move the piece to
• To unselect a piece, simply click it again
""")
Here is a screenshot:
The word "piece" is not receiving the indent that the beginning of that sentence was given. How can I fix this?
I do not know a direct solution to do it.
But this provided what you asked for (even though a bit convoluted):
VStack(alignment: .leading) {
Text("Moving piece")
Text("""
• To move pieces, click on the piece you want to move
• Then click on the square you want to move the piece to
• To unselect a piece, simply click it again
""")
.padding(.leading, 20)
}