title: SwiftUI how to align the view‘s leading to the most super view’s leading?
body: <p>I’m new to SwiftUI and I’m making a widget. The default code included a text view which is both x-centered and y-centered in the super view(which I don’t know if there’s the same concept in SwiftUI).
  This is my code:</p>
  <pre><code>struct WidgetEntryView : View {
      var entry: Provider.Entry
  
      var body: some View {
          VStack(alignment: .leading){
              Text(Date(), style: .time)
                  .padding(.leading)
          }
      }
  }
  </code></pre>
  <p>I want to align the view’s leading to the super view’s leading instead of positioning the text in the center. So I tried to add a padding to the text’s leading, strangely, it seems that the text view is not a direct subview of the superview, it is positioned in a invisible centered view instead, since I end up with having a text view that slightly deviate the center, looks like this:</p>
  <p><a href="https://i.stack.imgur.com/mlXcym.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mlXcym.jpg" alt="enter image description here" /></a></p>
  <p>This is what I want:</p>
  <p><a href="https://i.stack.imgur.com/603Ctm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/603Ctm.jpg" alt="enter image description here" /></a></p>
  <p>I tried the position method and it was the only one worked, not perfectly though, since it is based on the center point.</p>
  <p>I’m looking for a better solution.</p>