Learn Courses My Dashboard

iOS Foundations LearningApp M5L6 alignment issue


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?


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

ie, like this in HomeViewRow()

                        .font(.system(size: 14))
                        .padding(.bottom, 20)