SwiftUI text-alignment

后端 未结 9 1482
逝去的感伤
逝去的感伤 2020-12-29 00:42

Among the many properties of the Text view, I couldn\'t find any related to text alignment. I\'ve seen in a demo that it automatically handles RTL, and when pla

9条回答
  •  伪装坚强ぢ
    2020-12-29 01:31

    You can set alignment for Vertical stackView as leading. Like below

     VStack(alignment: .leading) {
                Text("Turtle Rock")
                    .font(.title)
                Text("Joshua Tree National Park")
                    .font(.subheadline)
            }
    

提交回复
热议问题