title: Top alignment/position of text in SwiftUI
body: <p>I am using <code>SwiftUI</code> and want to position a <code>Text</code> element at the top of the screen.</p>
  <p>My code looks like as follows and the output is below. As you can see it is in the middle of the screen. Can anyone advise how to update the position? I have tried to add <code>alignment</code> properties with little or no success.</p>
  <pre><code>import SwiftUI
  
  struct ContentView: View {
      var body: some View {
          Text(&quot;Hello World!&quot;)
      }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/G0Tqn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G0Tqn.png" alt="enter image description here" /></a></p>