title: SwiftUI: Adjusting position of Image in a TabView
body: <p>I use the following code to create a <code>TabView</code> with <code>SwiftUI</code>:</p>
  
  <pre><code>struct TabbedView: View {
      @State private var selected = 0
  
      var body: some View {
          TabView(selection: $selected) {
              View1().tabItem {
                  Image("Tab1")
              }.tag(1)
  
              View2().tabItem {
                  Image("Tab2")
                  .offset(y: 20) //&lt;--- has no effect
                  }.tag(2)
  
              View3().tabItem {
                  Image("Tab3")
              }.tag(3)
          }
      }
  }
  </code></pre>
  
  <p>I use only <code>Image</code> views for the tab items with no text, the result is as follows:</p>
  
  <p><a href="https://i.stack.imgur.com/JrtMZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JrtMZ.png" alt="enter image description here"></a></p>
  
  <p>I need to position (or vertical-align) the <code>Image</code> views down to the center of the <code>TabView</code> but couldn't find a straightforward way to do so.</p>