Learn Courses My Dashboard

iOS Foundations LearningApp M5L6 alignment issue

Hello!

There is an alignment bug in Xcode13:

It was left aligned when Chris made the video. I use Xcode 13 and it is totally the same for me too as on the picture. But with the same code it seems good in the previous Xcode version.
I tried with different alignments in different places in the code but it is always the same.

Any solution?

@takipeti90

Add the modifier .multilineTextAlignment(.leading) to the Text() view.

(edit)
ie, like this in HomeViewRow()

                    Text(description)
                        .font(.system(size: 14))
                        .padding(.bottom, 20)
                        .multilineTextAlignment(.leading)