title: SwiftUI background image moves when keyboard shows
body: <p>I have an image background, which should stay in place when the keyboard shows, but instead it moves up together with everything on the screen. I saw someone recommend using <code>ignoresSafeArea(.keyboard)</code>, and this question <a href="https://stackoverflow.com/questions/64028845/simple-swiftui-background-image-keeps-moving-when-keyboard-appears">Simple SwiftUI Background Image keeps moving when keyboard appears</a>, but neither works for me. Here is my super simplified code sample. Please keep in mind that while the background should remain unchanged, the content itself should still avoid the keyboard as usual.</p>
  <pre><code>struct ProfileAbout: View {
  
      @State var text: String = &quot;&quot;
  
      var body: some View {
          VStack {
              TextField(&quot;write something&quot;, text: $text)
              Spacer()
              Button(&quot;SomeButton&quot;) {}
          }
          .background(
              Image(&quot;BackgroundName&quot;)
                  .resizable()
                  .aspectRatio(contentMode: .fill)
                  .ignoresSafeArea(.keyboard)
          )
      }
  }
  </code></pre>